Today, while I am trying to access the webcalendar from browser, nothing shows up, no error message. why would it suddenly stop functioning? my first instinct is to look for some clue from the log /var/log/httpd/ssl_error_log, ha, I see a PHP Fatal error: "Call to undefined function: mysql_pconnect() in /usr/share/webcalendar/includes/php-dbi.php on line 97" , looks like php failed to connect to mysql database. why it would suddenly failed, since upraded mysql to newer version in the previous upgrade, I haven't done any change to php setup, and it worked fine since the upgrade.
Something happened after the upgrade and I didn't notice? what about restarting mysql? I restarted mysql, no difference. how about restarting httpd, restarted httpd,and I noticed an error "PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/mysql.so' - libmysqlclient.so.10: cannot open shared object file: No such file or directory in Unknown on line 0", seems Apache does not load php mysql library correctly, ah, I remembered that since the previous mysql upgrade, I symbolic linked the /usr/lib/mysql to my new mysql library /usr/local/mysql/lib/mysql. I deleted the symbolic link, changed it back to my old mysql library and restarted httpd, the error message is gone and the webcalendar worked again. I think while I upgraded the mysql, and linked the new mysql library to /usr/lib/mysql, the apache were still calling the old mysql library from memory, once apache restarted itself when finishing the weekly log rotation, it begins to call the new mysql library and failed to load PHP mysql library. the problem solved, but question still remains: why apache could not load PHP mysql library by calling the new mysql library from /usr/local/mysql/lib/mysql? do I have to recompile PHP with the new mysql library? probably
Something happened after the upgrade and I didn't notice? what about restarting mysql? I restarted mysql, no difference. how about restarting httpd, restarted httpd,and I noticed an error "PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/mysql.so' - libmysqlclient.so.10: cannot open shared object file: No such file or directory in Unknown on line 0", seems Apache does not load php mysql library correctly, ah, I remembered that since the previous mysql upgrade, I symbolic linked the /usr/lib/mysql to my new mysql library /usr/local/mysql/lib/mysql. I deleted the symbolic link, changed it back to my old mysql library and restarted httpd, the error message is gone and the webcalendar worked again. I think while I upgraded the mysql, and linked the new mysql library to /usr/lib/mysql, the apache were still calling the old mysql library from memory, once apache restarted itself when finishing the weekly log rotation, it begins to call the new mysql library and failed to load PHP mysql library. the problem solved, but question still remains: why apache could not load PHP mysql library by calling the new mysql library from /usr/local/mysql/lib/mysql? do I have to recompile PHP with the new mysql library? probably