Author |
|
wappy
Joined: 30 Jul 2007 Posts: 5 Location: Bucharest
|
Posted: Mon 30 Jul '07 15:34 Post subject: mysql do not load in PHP |
|
|
First of all thank you for the tutorial. I installed Apache 2.0 with PHP Version 5.2.3 and everything works fine. The problem is with the mySQL server. I downloaded and installed version 5.0 and overwrite LIBMYSQL.DLL. Unfortunately the mysql functions from php aren't recognized.
For example:
Code: | <?
mysql_connect("localhost","root","") or die ("Error: ".mysql_error());
mysql_select_db("stoc") or die ("Error: ".mysql_error());
?> |
I get: Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\stoc\connect.php on line 2
thank you for your answers!
Modnote: split from the proven setup topic |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 30 Jul '07 17:40 Post subject: |
|
|
Did you enable it in php.ini? Loaded the right php.ini in httpd.conf? Is the extension path the right one in php.ini? |
|
Back to top |
|
wappy
Joined: 30 Jul 2007 Posts: 5 Location: Bucharest
|
Posted: Tue 31 Jul '07 9:29 Post subject: |
|
|
James Blond wrote: | Did you enable it in php.ini? Loaded the right php.ini in httpd.conf? Is the extension path the right one in php.ini? |
Unfortunately yes |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 31 Jul '07 9:39 Post subject: |
|
|
Maybe you have to copy libmysql.dll to apache\bin folder Or where did you replace that dll? |
|
Back to top |
|
wappy
Joined: 30 Jul 2007 Posts: 5 Location: Bucharest
|
Posted: Tue 31 Jul '07 9:59 Post subject: |
|
|
James Blond wrote: | Maybe you have to copy libmysql.dll to apache\bin folder Or where did you replace that dll? |
From C:\Program Files\MySQL\MySQL Server 5.0\bin to C:\php5... now i put it on apache\bin too, restart the server and nothing |
|
Back to top |
|
wappy
Joined: 30 Jul 2007 Posts: 5 Location: Bucharest
|
Posted: Tue 31 Jul '07 10:35 Post subject: |
|
|
and another thing: when i try to connect to the mysql server from the comand prompt i get this error: ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 31 Jul '07 10:50 Post subject: |
|
|
you have to use a user, normaly you have to use root without a password using command line.
e.g.
Without getting more information about your config files I can't see there any option to help you. |
|
Back to top |
|
wappy
Joined: 30 Jul 2007 Posts: 5 Location: Bucharest
|
Posted: Tue 31 Jul '07 10:52 Post subject: |
|
|
Ok.. thank you for your answer! |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 31 Jul '07 11:06 Post subject: |
|
|
James Blond wrote: |
Without getting more information about your config files I can't see there any option to help you. |
So won't you post your parts from httpd.conf and PHP.ini??? |
|
Back to top |
|