Hello ,
I am running PHP 4.0.4 and Mysql on Linux Server
I create php scripts with mysql connection strings as usual
$conn = mysql_connect("hostname","username","password");
mysql_select_db("dbname", $conn);
My scripts connect to Mysql and work fine when accessed through web or browser...
But same php scripts if try to run from linux console mode giving command
php <filename.php>;
i get the following error :
X-Powered-By: PHP/4.0.4pl1
Content-type: text/html
<br>
<b>Fatal error</b>: Call to undefined function: mysql_connect() in <b>greetings.php</b> on line <b>2</b><br>
How is that it is giving me PHP error of mysql_connect function undefined when it is working fine from browser..
Mysql.so extension is also loaded properly ;-)
Please help me...
Regards,
Amit