introduction screenshots faq forum blog modules components download
Please use the search function and/or read the FAQ first.
-->

Executing as a command line 2.01b, getting a fatal error



Posted by: pacctono
January 23, 2009 04:49PM
I installed easyphp 2.0b1, on \EasyPHP2.01b. If I executed it I can see scripts (connecting to MySQL from Firefox. But if I try to run a script as a command line I got:

Fatal error: Call to undefined function mysql_connect() .......

This should be because I need the CLI, but I do not know how to install it. This is the script:

<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>

Can i get any help?
Posted by: Amour
February 07, 2009 09:43PM
With CLI, you must tell php where is php.ini ;)