logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: mysql do not load in PHP
Author
wappy



Joined: 30 Jul 2007
Posts: 5
Location: Bucharest

PostPosted: Mon 30 Jul '07 15:34    Post subject: mysql do not load in PHP Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Mon 30 Jul '07 17:40    Post subject: Reply with quote

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

PostPosted: Tue 31 Jul '07 9:29    Post subject: Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 31 Jul '07 9:39    Post subject: Reply with quote

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

PostPosted: Tue 31 Jul '07 9:59    Post subject: Reply with quote

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

PostPosted: Tue 31 Jul '07 10:35    Post subject: Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 31 Jul '07 10:50    Post subject: Reply with quote

you have to use a user, normaly you have to use root without a password using command line.

e.g.
Code:

mysql -u root


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

PostPosted: Tue 31 Jul '07 10:52    Post subject: Reply with quote

Ok.. thank you for your answer!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 31 Jul '07 11:06    Post subject: Reply with quote

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


Reply to topic   Topic: mysql do not load in PHP View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules