This worked OK aside from a couple obvious differences. I had the most troube getting MySQL configured with PHP and had to do some searching to find the answer. Here is what I had to do to get it working.
In the Apache httpd.conf File at 'C:\Program Files\Apache Group\Apache2\conf\httpd.conf' You have to add these lines for PHP5
In addition to installing MySQL etc. I had to do this to get MySQL to work:
1. Make sure that you have a valid php.ini in your windows directory.
OR (Per the tut the 'php.ini' can be installed in the 'C:\Program Files\Apache Group\Apache2' folder. This works fine.) 2. copy libmysql.dll to the system32 directory (php_mysql.dll would not load without doing this) 3. set the extension_dir in php.ini to the ext directory of your PHP installation directory (like e.g. extension_dir=C:\php5\ext) 4. enable the MySQL extension in php.ini by uncommenting the line extension=php_mysql.dll
5. Restart Apache Server
Technophobes : Try www.xampp.de
Click the British flag for English language.
This software gracefully installs recent versions of PHP5, Apache 2 and MySQL (with admin tools e.g. phpMyAdmin + much more) under Windows XP.
The only thing to be careful of is that you follow the instructions for configuring your firewall (which would otherwise block Apache and MySQL of course), remembering that MySQL uses an unusual port number (3306).
Hello Ive recently installed Apache 2, PHP 5.02 and MYSQL 4.1 on Windows XP.
I am now tyring to connect to a database called bloomdb i have created in comman prompt mySQL.
The error i get is: Call to undefined function mysql_connect() on line 4 of temp_con.
Now i have searched the net for this problem and found it is that mysql is not enabled?. Not with PHP 5 by default, I think i have done what you said in this guide correctly but not too sure.
When you say uncomment what does that mean?, can any of you nice people explain how to enable it in very SIMPLE SIMPLE terms please.
1. check the setup process again follow the steps and notes I've written.
Part of the process tells you to copy files from the PHP setup folder, where you installed PHP to the 'Program Files/Apache Group/Apache2/' folder.
One of these files is the PHP.ini file. Open the PHP.ini file in a plain text editor (like 'Note Pad') search or find the line "extension=php_mysql.dll" If there's a ';' semi-colon in front of this line it means it's commented and has no effect of the php settings. Remove the ';' from the line and it is 'uncommneted'. Changes in the PHP.ini have no effect until the Apache server is 'bounced' or restarted. Use the Apache tray icon 'Restart' command for this.
to check your settings copy this code into a file save it as 'test.php' in your htdocs folder ./apache/htdocs/test.php Then open the file in the browser 'http://loacalhost/test.php' to check your PHP settings.
echo 'PHP is working.<br>';
i followed the instructions and found them to be very helpfull.
i needed to one more step though because it gave me the following error:
Client does not support authentication protocol requested
by server; consider upgrading MySQL client
i looked it up on google and found this link: <a href=http://dev.mysql.com/doc/mysql/en/old-client.html>link</a>
basically it says that the new version of mysql uses a new type of password. i went into the command prompt and changed my account's password using the command they suggest: mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
this fixed the problem for the mysqli functions, but its weird because i'm using php 5.0.0 and shouldn't it be compatable? the mysql version i'm using is 4.1.9
the weird thing is though i've got all the mysqli functions working, but the regular mysql ones don't seem to work. also, i've been trying to get the PEAR ones to work too. i ran that go-pear thing, accepted all the defaults and ran the thing thats supposed to put stuff in the registry. is there anything else i gotta do? i thought i saw something about adding something to the path in environmental variables. what would i have to add?
so my problems are the regular mysql functions don't work, and i'm not sure if i have to do anything else to get the PEAR database stuff working
I followed the Tut Installing PHP under Windows by Matthew Phillips,installed Apache server on windows xp,PHP and MySQl,i tested apache it is working,also wrote test.php file and everything went fine,messagle PHP is working and lot information,but the problem is i can see all this ony through another computer,i mean when i try localhost i get message connection was refused....
I am using netgear router, i configure port forwarding for apache and MySQL ports, i even try to turn it off,but still can not access my page through localhostWhen i try this through my friend computer everything is fine??
i'm a total n00b when it comes to this stuff, but maybe it's something with the mysql account. i think when you create it you're able to set from which host it connects from, maybe it's a problem with something like that.
i might be talking out of my ass though, but maybe that could be something to look at
hope it helps
Have followed all the instructions, all applications work when tested on their own (webserver, php test page and can log into and create mysql databases etc) but when i try and get php and my sql to talk i end up with a blank webpage using the following code.
$db_host = "localhost";
$db_user = "root";
$db_password = "password i used whe installing and connecting to MYSQL in command prompt";
$db_name = "panthro";