Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hello,
I've tried to set small test platform up and I'm new to it:
WinXPPro
Apache 2.0.55
PHP 5.0.5
MySQL 5.0.15
MySQL Admin 1.1.4
All software is running on the same standalone box: HP Compaq
Apache 2 is configured and able to phpinfo on screen without any problems.
Problem is in the second line of my short script. However, the PHP editor doesn't give me any parse errors. It looks like there is a problem connecting to my MySQL. My experiment indicates that if the MySQL server service is stopped there would be the same error response on my script as soon as service up and running.
The error after i run this script:Code: Select all
Fatal error:
Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\index.php on line 2Code: Select all
<?php
$con = mysql_connect('127.0.0.1:3306', 'root', '1111');
if (!$con) {
die("Unable to connect: " . mysql_error());
}
echo 'Connected OK!';
mysql_close($con);
?>I've done the following:
1. installed PHP to C:\php
2. coppied mysql dlls to C:\PHP diretory
3. renamed php.ini-default to php.ini and left in in C:\PHP directory
4. enabled c:\php path in XP system Variables
5. enabled mysql extensions in php.ini (php_mysql.dll, mysqli.dll)
6. left libmsql.dll in C:\PHP as advised by PHP doc!
7. enabled path include_path = ".;c:\php"
I can start and stop MySQL, create tables and manipulate them.
At the moment I can't move any further with this persistent error, as the mysql_connect cant connect!
I have searched through all possible links and sites for this error, checked my config against suggestions and I can't find any conflicts. Tried to reinstall MySQL, restart PC, Apache...nothing changes.
Guys pls assist me not to avoid this excellent experience in PHP programming! Apologise for a long message but this is all could help you to understand the situation.
Any advise is welcome!
feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]