Re: Apache2+PHP5+MySQL4 --> mysql_connect fails, PHP5+MySQL4+CLI --> mysql_connect works

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixed: For some reason Apache wanted a php.ini in the windows directory rather than in the PHP install directory. Explicitly set the PhpIniDir in the httpd.conf and fixed it.

-Jim

----- Original Message ----- From: "Steven James Samuel Stapleton" <stapleton@xxxxxxxxxxxxxxxxxx>
Cc: <php-windows@xxxxxxxxxxxxx>
Sent: Wednesday, November 10, 2004 7:00 PM
Subject: Apache2+PHP5+MySQL4 --> mysql_connect fails, PHP5+MySQL4+CLI --> mysql_connect works



Relevant information:
Windows XP Pro SP2
PHP 5.0.2
MySQL 4.0.21-nt
Apache 2

PATH:
C:\WINDOWS\system32
C:\c\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WBP\php               //PHP bin dir
C:\WBP\Apache2\bin  //Apache bin dir

MySQL's bin dir is not in path

I have tried calling
mysql_connect(...) with PHP's php_mysql.dll in and not-in the path.


CLI works great, database gets put through hoops, lots of changes, all is good.


In Apache, it fails at the connect:
Fatal error: Call to undefined function mysql_connect() in C:\WBP\WBP\lib\db_capsule_mysql.php on line 124


both classes are using the same conect routine through the db_capsule wrapper call the same mysql_connect function.

I have tried this with and without the php\ and Apache2\bin dirs in the path.


Suggestions? -Jim Stapleton -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux