well .. as a long shot I can give one tip ..
when troubleshooting such issues (in windows) I sometimes use utilities from sysinternals.com
in Windows I use FILEMON and PROCEXP ..
FILEMON picks up failed paths ..
PROCEXP picks up all dll's used in Apache.exe
...
but only FILEMON is available in Linux .. try that .. FILEMON Linux version
setup the filters ..
exclude field .. define all running processes you wish to exclude from the monitor window
include field .. insert keywords to be monitored .. like php;mysql
then clear the monitor window and stop/restart the Apache server
you might find some failed path or other problem in your configuration or when running the script.
If nothing else, it gives a useful insight .. perhaps some clues.
...
another useful troubleshooting tool is .. dependency walker .. but unfortunately not available for Linux.
p.s. .. this site .. suggests use mysql_query instead ..
and perhaps read the note in this page .. what version MySQL do you have ??
Warning This function will not be available if the MySQL extension was built against a MySQL 4.x client library.
p.p.s.
here is another thought
in PHP4 the path to extensions is C:\PHP\extensions\
in PHP5 this path is C:\PHP\ext\
so .. check extension_dir in php.ini ..