Hi,
I am using PHP Version 5.2.5 in my server. when i run this code in browser its working fine but when i tried to run this from terminal its shows error.
$dbhost='localhost';
$dbusername='username';
$dbuserpass='paswordl';
$dbname='dbname';
// connect to the mysql database server.
$link_id = mysql_connect($dbhost, $dbusername, $dbuserpass);
Error shown in terminal when do this : php /opt/lampp/htdocs/test.php
X-Powered-By: PHP/4.2.2
Content-type: text/html
<br />
<b>Fatal error</b>: Call to undefined function: mysql_connect() in <b>/opt/lampp/htdocs/test.php</b> on line <b>9</b><br />
Please give your idea to overcome this,,