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 -> Other Software View previous topic :: View next topic
Reply to topic   Topic: My PHP doesn't recognize my MySQL commands
Author
punppis



Joined: 16 Dec 2006
Posts: 3
Location: finland

PostPosted: Sat 16 Dec '06 1:02    Post subject: Reply with quote

Hi. I have recently downloaded and installed Apache 2.2.3 and PHP 5.2.0 on my Windows computer. I installed them and got Apache and PHP working almost perfectly. I tested PHP workingness with simple echo-script, which worked just fine. Then i started to learn MySQL, now the problem comes in picture. My PHP doesn't recognize my MySQL commands, such as mysql_connect() gives back an error, which says that function is not defined.

I have:
- changed ;extension=php_mysql.dll to same without ";" (in php.ini)
- replaced my libmysql.dll with one in MySQL directory (c:\progfiles\mysql...)

but still it won't work damn it Sad Any idea how i could get this fixed?
Back to top
James Blond
Moderator


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

PostPosted: Sat 16 Dec '06 12:57    Post subject: Reply with quote

Is your php.ini in C:\Windows ? If not, set in httpd.conf where your php.ini you use is located

e.g.
Code:

PHPIniDir "C:/php5"
Back to top
punppis



Joined: 16 Dec 2006
Posts: 3
Location: finland

PostPosted: Sat 16 Dec '06 20:09    Post subject: Reply with quote

my php works perfectly, problem is in MySQL, http.conf includes right path for my php.ini
Back to top
James Blond
Moderator


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

PostPosted: Sat 16 Dec '06 20:19    Post subject: Reply with quote

Please download the mysql test from apachelounge and run it. So that you can see if mysql extension is right installed and mysql server is running.

http://www.apachelounge.com/download/mysqlinfo.zip
Back to top
punppis



Joined: 16 Dec 2006
Posts: 3
Location: finland

PostPosted: Sat 16 Dec '06 22:14    Post subject: Reply with quote

php MySQL extension not loaded !!...

so what did i make wrong?

I installed MySQL with windows installer, then i opened php.ini and found line extension=php_mysql.dll and removed ";" before it. then i found line expression_dir (or something) and changed it to "c:\php5\ext\" where my extension files are located. after that, i have copied libmysql.dll from my MySQL folder to c:\php5. i have also copied php.ini and libmysql.dll to c:\windows.. so... could you please tell my how i'm being stupid..

Code:
extension_dir = "c:\php5\ext\"
...
extension=php_mysql.dll
Back to top


Reply to topic   Topic: My PHP doesn't recognize my MySQL commands View previous topic :: View next topic
Post new topic   Forum Index -> Other Software