Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: My PHP doesn't recognize my MySQL commands |
|
Author |
|
punppis
Joined: 16 Dec 2006 Posts: 3 Location: finland
|
Posted: Sat 16 Dec '06 1:02 Post subject: |
|
|
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 Any idea how i could get this fixed? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 16 Dec '06 12:57 Post subject: |
|
|
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
|
Posted: Sat 16 Dec '06 20:09 Post subject: |
|
|
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: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
punppis
Joined: 16 Dec 2006 Posts: 3 Location: finland
|
Posted: Sat 16 Dec '06 22:14 Post subject: |
|
|
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 |
|
|
|
|
|
|