PinkeyNBrain
IS-IT--Management
Not 100% sure just where the source of the problem is here:
Setup:
- OS: WinXP SP3
- Loaded apache http server 2.2 - appears to test ok
- Loaded MySQL - generated tables - all is ok
- Loaded php - generic 'hello world' works (hello.php) under command prompt
- hello.php works as web page under apache
So far so good. Next I generated a simple mysql_connect / mysql_select_db / mysql_query sequence under php. The program works as expected under the command prompt. If I try to run it under apache, output stops as soon as I use the mysql_connect. Consider
The very first time I open a browser and attempt to load the page, I'll get a HTML 500 error. If I press reload, I'll see the 'pre connect' but not the 'post connect'.
Found one example of a user who corrected a similar issue by ensuring "$user" was in the administrators group for the PC. Tried that but it didn't help. Also found references stating to dump phpinfo() and make sure the mysql extensions are loaded. Not being a heavey hitter in this, I wasn't sure what to look for that indicated these extensions were loaded. Not sure if the fact that this works under the cmd prompt has any relevence on this.
If this belongs under another forum, sorry and let me know.
Setup:
- OS: WinXP SP3
- Loaded apache http server 2.2 - appears to test ok
- Loaded MySQL - generated tables - all is ok
- Loaded php - generic 'hello world' works (hello.php) under command prompt
- hello.php works as web page under apache
So far so good. Next I generated a simple mysql_connect / mysql_select_db / mysql_query sequence under php. The program works as expected under the command prompt. If I try to run it under apache, output stops as soon as I use the mysql_connect. Consider
Code:
print "pre connect\n"; // prints normally
mysql_connect($host, $user, $passwd) ;
print "post connect\n" ; // This prints under cmd but not under apache
Found one example of a user who corrected a similar issue by ensuring "$user" was in the administrators group for the PC. Tried that but it didn't help. Also found references stating to dump phpinfo() and make sure the mysql extensions are loaded. Not being a heavey hitter in this, I wasn't sure what to look for that indicated these extensions were loaded. Not sure if the fact that this works under the cmd prompt has any relevence on this.
If this belongs under another forum, sorry and let me know.