|
Posted by Hendri Kurniawan on 03/04/07 22:50
brett wrote:
> I'm running PHP5 on Windows Vista with mysql 5.2. I have a simple php
> file with
>
> <?
> $dbc = mysql_connect ();
> ?>
>
> When I run the file, I get this error:
> Fatal error: Call to undefined function mysql_connect() in E:\www
> \mysite\connecttest.php on line 2
>
> PHP seems to be installed correctly. What could I be doing wrong?
>
Brett,
Your MySQL extension is not configured correctly.
Form what I gather from the replies on this thread, you managed to
download the extension and modify php.ini file (to load and mysql
extension). So I assume those steps are complete.
If you are running IIS, PHP is configured to search for php.ini in (as I
recall, CMIIW) your windows directory and your php installation dir.
Again, from what I gather your current installation uses php.ini from
c:\PHP5 dir. You should modify that file instead. Restart your IIS
If you are running apache however, you need to add
PHPIniDir "C:\php5"
to your apache config file (where c:\php5 is where you put your php.ini)
Restart Apache.
If you don't see any result (ie. mysql still not loaded), then your php
is still not configured correctly.
Hope that helps,
Hendri Kurniawan
Navigation:
[Reply to this message]
|