1. Christophe Poulin
  2. Valentina Database ADK
  3. Friday, May 29 2020, 04:23 PM
  4.  Subscribe via email
Hi, I have tried to install "ADK for PHP" on MacOS by following the instructions on the website. All goes well until I try to start PHP on my Mac when I get the following error. What am I doing wrong? Thanks

PHP Warning: PHP Startup: Unable to load dynamic library 'php_73_valentina_fat_x64.so' (tried: /Users/Shared/VPHP_x64_10/php_73_valentina_fat_x64.so
(dlopen(/Users/Shared/VPHP_x64_10/php_73_valentina_fat_x64.so, 0x0009): code signature in (/Users/Shared/VPHP_x64_10/php_73_valentina_fat_x64.so)
not valid for use in process: mapping process is a platform binary, but mapped file is not),
/Users/Shared/VPHP_x64_10/php_73_valentina_fat_x64.so.so (dlopen(/Users/Shared/VPHP_x64_10/php_73_valentina_fat_x64.so.so, 0x0009): dlopen():
file not found: /Users/Shared/VPHP_x64_10/php_73_valentina_fat_x64.so.so)) in Unknown on line 0
PHP 7.3.11 (cli) (built: Feb 29 2020 02:50:36) ( NTS )
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Hello Christophe,

There is something wrong with signature, I'll check it now
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 1
Sergey Pashkov Accepted Answer
If I run php from the terminal - yes, I can see such errors. I found the same errors for other types of plugins (https://forums.developer.apple.com/thread/110705), it is something related to System Integrity Protection.

But running it from Apache works, the extension is loaded, a connection to Valentina Server can be established.

Do you need to use it from the command line?
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 2
Christophe Poulin Accepted Answer
Thanks for getting back to me. I am fairly new to that topic so my knowledge is quite limited :( . How would you "run it from Apache"? If you can explain that to me then I am more than happy to avoid using Terminal ;-)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 3
Christophe Poulin Accepted Answer
Thanks for getting back to me. I am fairly new to that topic so my knowledge is quite limited :( . How would you "run it from Apache"? If you can explain that to me then I am more than happy to avoid using Terminal ;)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 4
Sergey Pashkov Accepted Answer
1. sudo nano /private/etc/apache2/httpd.conf

2. Uncomment and save
LoadModule php7_module libexec/apache2/libphp7.so

3. Restart Apache:
sudo /usr/sbin/apachectl

4. Check if extension is loaded with <?php phpinfo(); ?> code placed in PHP script:
sudo nano /Library/WebServer/Documents/index.php

Now you can go to http://localhost/index.php and check if Valentina extension is loaded (like on my screenshot)

If everything is correct you can start adding valentina_ functions.

For example, establishing a new connection to local Valentina Server.

<?php

$connect = valentina_connect( '127.0.0.1', 'sa', 'sa' );

valentina_close( $connect );

?>


You can check the log files of the Valentina Server to see the connection confirmation
/Library/VServer_x64/vlogs

2020-05-30 00:29:54.379956 (TID 123145324019712): (UID 21) vClient-connection established. ( vClient-connections count: '1'. Available: '0')
2020-05-30 00:29:54.380514 (TID 123145324019712): (UID 21) User: sa. Connection encoding: UTF-8 - LittleEndian.
2020-05-30 00:29:54.381698 (TID 123145325092864): (UID 21) Closing vClient-connection. ( vClient-connections count: '0'. Available: '1')
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 5
Christophe Poulin Accepted Answer
Thanks a lot Sergey! Yes using this way it does work.
However I am having issues with the actual database connection but I think I need to investigate first and if needed I will post a separate question on the forum.
Thanks again for the quick support :)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 6
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories