471,049 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,049 software developers and data experts.

HELP! Mysql / PHP won't run ?

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
Jul 17 '05 #1
5 2106
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
Jul 17 '05 #2
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" <x3****@westerterp.com> wrote in message
news:41***********************@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

Jul 17 '05 #3
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" <x3****@westerterp.com> wrote in message
news:41***********************@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


Jul 17 '05 #4
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

Jul 17 '05 #5
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" <x3****@westerterp.com> wrote in message
news:41***********************@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

Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Tom | last post: by
4 posts views Thread by Sarir Khamsi | last post: by
6 posts views Thread by wukexin | last post: by
3 posts views Thread by Colin J. Williams | last post: by
5 posts views Thread by Steve | last post: by
8 posts views Thread by Mark | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.