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')