akelabanda
Programmer
Hello Guys
I'm a newbie with php and mysql. I found a couple of tutorials on the web and got a small test script which confirms that php connects to mysql server correctly.
Here's the test script -
-------------------
<?php
mysql_connect("localhost","root","tester") or die(mysql_error());
echo "Connected to MySQL<br />";
?>
-------------------
I ran this script on command line using php -l option. There are no syntax errors. But when I run with -f option it errors as below -
-------------------
C:\Apache2.2\htdocs\test>php -f mysql_test.php
PHP Fatal error: Call to undefined function mysql_connect() in C:\Apache2.2\htdocs\test\mysql_test.
php on line 2
-------------------
I'm wondering if additinal configuration's required on php for mysql.
Please help. I'm able to run php and mysql individually all by themselves.
Thanks
Rajeev
UK's best mobile deals online
I'm a newbie with php and mysql. I found a couple of tutorials on the web and got a small test script which confirms that php connects to mysql server correctly.
Here's the test script -
-------------------
<?php
mysql_connect("localhost","root","tester") or die(mysql_error());
echo "Connected to MySQL<br />";
?>
-------------------
I ran this script on command line using php -l option. There are no syntax errors. But when I run with -f option it errors as below -
-------------------
C:\Apache2.2\htdocs\test>php -f mysql_test.php
PHP Fatal error: Call to undefined function mysql_connect() in C:\Apache2.2\htdocs\test\mysql_test.
php on line 2
-------------------
I'm wondering if additinal configuration's required on php for mysql.
Please help. I'm able to run php and mysql individually all by themselves.
Thanks
Rajeev
UK's best mobile deals online