MySQL Forums
Forum List  »  PHP

Re: PHP extension=php_mysql.dll not loading; cannot
Posted by: Newbie2 lee
Date: January 01, 2006 12:19AM

I have a similar problem too!

1) From command line I don't have any problem
C:\Apache2\htdocs>php mysql-test.php
<html><head>
<title>Test PHP and MySQL</title>
</head><body>
<p>Databases at the local MySQL server<p>
<p><br><i>mysql</i>
<br><i>test</i>
<p> </body></html>

2) From the browser
http://localhost/mysql-test.php

I get
Fatal error: Call to undefined function mysql_connect() in C:\Apache2\htdocs\mysql-test.php on line 9

3) My php.ini are similar to those mentioned earlier. I've tried other permutations like c:\php\ext but it does not seem to make any difference

; Directory in which the loadable extensions (modules) reside.
extension_dir = "./"
;extension_dir = "C:\PHP\ext"[fixed]
extension=php_msql.dll
extension=php_mysql.dll
extension=php_mysqli.dll


4) httpd.conf has
ServerRoot "C:/Apache2"
LoadModule php5_module c:/php/php5apache2.dll
AddType application/x-httpd-php .php

Not sure about PHPIniDir parameter. It is NOT defined by default
I am using Apache 2, PHP 5.11, MySQL 4.0.26 on Win XP

Would appreciate some comments why PHP script would work in the command line but not the
browser. From the browser phpinfo() works so it would seem apache and PHP is configured correctly but not PHP and MySQL ????. Pretty frustrating. Any comments is appreciated. TIA

Options: ReplyQuote


Subject
Written By
Posted
September 13, 2005 03:53AM
October 06, 2005 12:37PM
October 06, 2005 12:59PM
November 26, 2005 07:15AM
December 25, 2005 12:13PM
Re: PHP extension=php_mysql.dll not loading; cannot
January 01, 2006 12:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.