Tommy Peterson escreveu:
I have installed Apache 2.2 and PHP 5.0.1 on Windows and am trying to
get MySQL 5.0 installed with them. However, I can't seem to get it
working. I keep getting the *Fatal error*: Call to undefined function
mysql_connect() in *C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\processex.php* on line *15 error *when I try
to connect to my MySQL database from a PHP script, even though I can
connect directly to MySQL with an MS-DOS prompt.
I did the following:
1) Installed Apache, PHP, and MySQL
2) Ensure that I can run a PHP with built-in functions and display it in
my browser with Apache serving it up.
3) Log into MySQL and create a database.
4) Located the extensions path my php.ini file and ensured that my .dlls
were in it
5) Located the mysql extension statements in the php.ini file and
uncommented them (removed the semicolon before each of them)
6) Restarted the server
7) Even restarted my computer.
I got the same error. I looked at the phpinfo() and
get_loaded_extensions() function output not seeing mysql installed.
Then I did what the documentation in several places on the internet said
to do:
I deleted all the libmysql.dll and php_mysql.dll files except the ones
in the php directory and then copied them to the windows/system32
directory and restarted my computer. I still get the same error message.
Still do not see mysql installed with the phpinfo() or
get_loaded_extensions().
I then did the following, which is what another user suggested:
Download the PHP zip distribution and copy the .dlls out of that into my
php directory that the installer installed. No luck. I still get the
same error message.Still do not see mysql installed with the phpinfo()
or get_loaded_extensions().
I also tried to load php_mysql.dll with the dl() function but no luck as
I am using a multi-threaded server.
Someone on the internet said to try deleting the php_mysql.dll and
libmysql.dll and using the ones from MySQL. I just checked and mysql is
only offering mysqli and a replacement for libmysql which I do not want
to get into just yet.
I have even added the mysql/bin and php directories to my system path.
Restrated. No luck.
I can get this installed (WAMP) and working if I use, for example,
xampp. However, I want to install these and set them up myself.
Can someone help me out here?
---------------------------------------------------------
http://www.educar.pro.br/i_en/php/v5/
http://www.educar.pro.br/i_en/apache/v22/
http://www.educar.pro.br/i_en/mysql/v50/
--
zerof
http://www.educar.pro.br/
Apache - PHP - MySQL - Boolean Logics - Project Management
----------------------------------------------------------
You must hear, always, one second opinion! In all cases.
----------------------------------------------------------
Let the people know if this info was useful for you!
----------------------------------------------------------
[Index of Archives]
[PHP Users]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[Postgresql]
[PHP Books]
[PHP Databases]
[PHP SOAP]