MySQL Forums
Forum List  »  PHP

Re: Fatal error: Call to undefined function mysql_connect()
Posted by: Denise McGrath
Date: September 22, 2007 11:28AM

Hi,

I am still getting the undefined function mysql_connect() message.
I have tried multiple combinations of suggestions, but am still unable to connect?
I am able to run Apache with PHP, and MySql works well on its own (I created db's etc.), but I just cannot get Apache to connect to the MySql db with PHP. Below is what I have done so far:

1) Installed Apache

2) Installed PHP (php-5.2.3-Win32.zip)
a) copied all files to c:\php
b) moved c:\php\php5ts.dll to c:\windows\php5ts.dll
c) renamed the file c:\php\php.ini-dist to c:\php\php.ini

3) In c:\php\php.ini
a) doc_root = "c:\webs"
b) extension_dir = "c:\php\ext"

4) In C:\Program Files\Apache Group\Apache2\conf\httpd.conf
a) changed the DocumentRoot entry to: DocumentRoot "C:/webs"
b) changed the Directory entry to: "C:/webs"
c) after the Add Type lines under Media Types I added the lines:

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .php5
Action application/x-httpd-php "/php/php-cgi.exe"
SetEnv PHPRC "C:/php"

d) changed the DirectoryIndex entry to: index.htm index.html index.php

5) Installed MySQL 5 (mysql-essential 5.0.41-win32.msi) to C:\Program Files\MySQL\MySQL Server 5.0

6) In c:\php\php.ini

a)uncommented extension=php_mysql.dll
b)uncommented extension=php_mysqli.dll
c)uncommented extension=php_pdo_mysql.dll

7) libmySQL.dll is located in C:\Program Files\MySQL\MySQL Server 5.0\bin and in C:\Program Files\Apache Group\Apache2\bin

8) php_mysql.dll and php_mysqli.dll are located in C:\PHP\ext

Please can someone help me with what may be happening? Thanks so much!



Edited 2 time(s). Last edit at 09/22/2007 11:37AM by Denise McGrath.

Options: ReplyQuote


Subject
Written By
Posted
Re: Fatal error: Call to undefined function mysql_connect()
September 22, 2007 11:28AM


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.