I have the SQLAnywhere PHP extension installed and it's working fine, right up until Apache restarts.
After Apache has restarted, any attempt to access any website on the server generates the following error in the Apache error log and throws a 500 internal server error on the page:
AH01215: PHP Warning: request_startup() for sqlanywhere module failed in Unknown on line 0: /usr/local/cpanel/cgi-sys/ea-php56
To resolve it, I can explicitly stop and start Apache, but restarting Apache (apachectl restart) doesn't.
This is generally fine until an automated process (such as a cPanel update) causes Apache to restart.
The SQLAnywhere PHP extension was configured as follows:
- Install the SQLAnywhere client
- Download the PHP extension to the extensions directory
- Add LD_LIBRARY_PATH=[sqlanywhere/lib64] to /etc/environment
- Log out and back in for the LD_LIBRARY_PATH to take effect
- Add the extension to the php.ini (or sqlanywhere.ini in php.d folder)
- Stop then start Apache
My current thinking for a workaround is to modify the cPanel update script to perform an Apache restart by explicitly doing a stop then a start as this would cover the immediate issue, but I'm hoping that somebody might know of an actual fix for this to avoid any other automated restarts causing problems.
The stack I'm running is:
- CentOS Linux release 7.3.1611 (Core)
- cPanel 60.0 (build 28)
- Apache/2.4.23 (cPanel)
- PHP 5.6 (using cPanel's MultiPHP and EasyApache4)
- SQLAnywhere12 Client
Thanks in advance for any suggestions!