This is a discussion on HELP! Mysql / PHP won't run ? within the PHP Language forums, part of the PHP Programming Forums category; I have Apache 2.0.50 and PHP5 on a Xp test machine (not going live) I also have installed ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have Apache 2.0.50 and PHP5 on a Xp test machine (not going live)
I also have installed MySQL 4.0.20 Modiefied php.ini, changed the extensions_dir to 10 different things in a row, none helped. copied all the dlls all over the place, no dice. Uncommented the extension = php_mysql.dll and got an error starting apache. Commented it out again, no error ,but still the undefined function mysql_connect in PHP The script runs perfectly in my PHPEdit IDE environment, so that and MySQL isn't the issue (the console works too). checked google, found some reports of similar stuff, but none of the suggestions seems to be applicable. HELP, I'm going ape over this. TIA Pjotr |
|
|||
|
Pjotr Wedersteers wrote:
> I have Apache 2.0.50 and PHP5 on a Xp test machine (not going live) > I also have installed MySQL 4.0.20 > > Modiefied php.ini, changed the extensions_dir to 10 different things > in a row, none helped. > copied all the dlls all over the place, no dice. > > Uncommented the extension = php_mysql.dll and got an error starting > apache. Commented it out again, no error ,but still the undefined > function mysql_connect in PHP > > The script runs perfectly in my PHPEdit IDE environment, so that and > MySQL isn't the issue (the console works too). > checked google, found some reports of similar stuff, but none of the > suggestions seems to be applicable. > > HELP, I'm going ape over this. > TIA > Pjotr For those also busy with this, I already tried all combinations of the different versions of libmysql and php_mysql |
|
|||
|
I am also running Apache 2.0.50 and PHP 5 on a Windows XP box. I had it
running with MySQL 4.0.20 but I have recently upgraded to 4.1.3 (what fun). In the PHP 5 zip file all the php_???.dll files are in the 'ext' folder not the 'extensions' folder. There is also no 'dlls' folder as all the files are in the main 'php' folder. You must copy file php_mysql.dll into your windows/system or windows/system32 folder. Remember also to change your Apache httpd.conf file so that the entry LoadModule php4_module f:/php4/sapi/php4apache2.dll is changed to LoadModule php5_module f:/php5/php5apache2.dll Hope this helps. -- Tony Marston http://www.tonymarston.net "Pjotr Wedersteers" <x33159@westerterp.com> wrote in message news:411a3e43$0$34762$e4fe514c@news.xs4all.nl... > Pjotr Wedersteers wrote: >> I have Apache 2.0.50 and PHP5 on a Xp test machine (not going live) >> I also have installed MySQL 4.0.20 >> >> Modiefied php.ini, changed the extensions_dir to 10 different things >> in a row, none helped. >> copied all the dlls all over the place, no dice. >> >> Uncommented the extension = php_mysql.dll and got an error starting >> apache. Commented it out again, no error ,but still the undefined >> function mysql_connect in PHP >> >> The script runs perfectly in my PHPEdit IDE environment, so that and >> MySQL isn't the issue (the console works too). >> checked google, found some reports of similar stuff, but none of the >> suggestions seems to be applicable. >> >> HELP, I'm going ape over this. >> TIA >> Pjotr > > For those also busy with this, I already tried all combinations of the > different versions of libmysql and php_mysql > > |
|
|||
|
Whoops. I should have said 'libmysql.dll' instead of 'php_mysql.dll' is the
file that needs to be copied to the windows/system folder. I am also running Apache 2.0.50 and PHP 5 on a Windows XP box. I had it running with MySQL 4.0.20 but I have recently upgraded to 4.1.3 (what fun). In the PHP 5 zip file all the php_???.dll files are in the 'ext' folder not the 'extensions' folder. There is also no 'dlls' folder as all the files are in the main 'php' folder. You must copy file libmysql.dll into your windows/system or windows/system32 folder. Remember also to change your Apache httpd.conf file so that the entry LoadModule php4_module f:/php4/sapi/php4apache2.dll is changed to LoadModule php5_module f:/php5/php5apache2.dll Hope this helps. -- Tony Marston http://www.tonymarston.net "Pjotr Wedersteers" <x33159@westerterp.com> wrote in message news:411a3e43$0$34762$e4fe514c@news.xs4all.nl... > Pjotr Wedersteers wrote: >> I have Apache 2.0.50 and PHP5 on a Xp test machine (not going live) >> I also have installed MySQL 4.0.20 >> >> Modiefied php.ini, changed the extensions_dir to 10 different things >> in a row, none helped. >> copied all the dlls all over the place, no dice. >> >> Uncommented the extension = php_mysql.dll and got an error starting >> apache. Commented it out again, no error ,but still the undefined >> function mysql_connect in PHP >> >> The script runs perfectly in my PHPEdit IDE environment, so that and >> MySQL isn't the issue (the console works too). >> checked google, found some reports of similar stuff, but none of the >> suggestions seems to be applicable. >> >> HELP, I'm going ape over this. >> TIA >> Pjotr > > For those also busy with this, I already tried all combinations of the > different versions of libmysql and php_mysql > > |
|
|||
|
Tony Marston wrote:
> Whoops. I should have said 'libmysql.dll' instead of 'php_mysql.dll' > is the file that needs to be copied to the windows/system folder. > > I am also running Apache 2.0.50 and PHP 5 on a Windows XP box. I had > it running with MySQL 4.0.20 but I have recently upgraded to 4.1.3 > (what fun). > > In the PHP 5 zip file all the php_???.dll files are in the 'ext' > folder not the 'extensions' folder. There is also no 'dlls' folder as > all the files are in the main 'php' folder. You must copy file > libmysql.dll into your windows/system or windows/system32 folder. > > Remember also to change your Apache httpd.conf file so that the entry > > LoadModule php4_module f:/php4/sapi/php4apache2.dll > > is changed to > > LoadModule php5_module f:/php5/php5apache2.dll > > Hope this helps. > Tony, thanks for sharing your experience, showing it can work. So something may be wrong here I have overlooked. In all my anxious and haphazard attacks of the problem I may have copied the wrong versions of some libs in directories the server checks before looking in c:\windows\system for them. I have temporarily switched back to PHP4.3.8, removed all the potential kill-joys and aim to redo the entire install of PHP 5 again later today. Hopefully that will produce good results. If not I'm sticking with 4.3.8 for now. The other suggestions you made were not the problem. I am aware of the \ext directory in PHP5 and it ran like a charm with apache alreay apart from mysql support. I'll see if I can get it all back in order. Later! Pjotr |
|
|||
|
Another problem I had with PHP 5 and MySQL support was that I had copies of
the files in the php/dlls folder in both my windows/system AND windows/system32 folder, so when I deleted the ones out of windows/system it was the ones in windows/system32 that were giving me trouble. I have found with PHP 5 that the only files that need to be moved out of the php folder into windows/system (or windows/system32) are libmysql.dll and libmysqli.dll Note that you may have to close down MysqlAdmin.exe when you attempt to replace libmysql.dll in windows/system otherwise you may hit a "file still in use" error. HTH -- Tony Marston http://www.tonymarston.net "Pjotr Wedersteers" <x33159@westerterp.com> wrote in message news:411a5cdf$0$48933$e4fe514c@news.xs4all.nl... > Tony Marston wrote: >> Whoops. I should have said 'libmysql.dll' instead of 'php_mysql.dll' >> is the file that needs to be copied to the windows/system folder. >> >> I am also running Apache 2.0.50 and PHP 5 on a Windows XP box. I had >> it running with MySQL 4.0.20 but I have recently upgraded to 4.1.3 >> (what fun). >> >> In the PHP 5 zip file all the php_???.dll files are in the 'ext' >> folder not the 'extensions' folder. There is also no 'dlls' folder as >> all the files are in the main 'php' folder. You must copy file >> libmysql.dll into your windows/system or windows/system32 folder. >> >> Remember also to change your Apache httpd.conf file so that the entry >> >> LoadModule php4_module f:/php4/sapi/php4apache2.dll >> >> is changed to >> >> LoadModule php5_module f:/php5/php5apache2.dll >> >> Hope this helps. >> > Tony, thanks for sharing your experience, showing it can work. So > something > may be wrong here I have overlooked. > In all my anxious and haphazard attacks of the problem I may have copied > the > wrong versions of some libs in directories the server checks before > looking > in c:\windows\system for them. > I have temporarily switched back to PHP4.3.8, removed all the potential > kill-joys and aim to redo the entire install of PHP 5 again later today. > Hopefully that will produce good results. If not I'm sticking with 4.3.8 > for > now. > The other suggestions you made were not the problem. I am aware of the > \ext > directory in PHP5 and it ran like a charm with apache alreay apart from > mysql support. > > I'll see if I can get it all back in order. > Later! > Pjotr > > > |