On Sun, 7 Sep 2003 13:33:15 -0400 (EDT)
Kalin Mintchev <[EMAIL PROTECTED]> wrote:

> i have a redhat 8.0 with php and mysql.
> all the mysql functions that php uses run fine when called with a browser
> but when i try to run a script on the command line i get:
> 
> # ./meLoop.php
> <br />
> <b>Fatal error</b>: Call to undefined function: mysql_connect() in
> <b>~/meLoop.php</b> on line <b>4</b><br />
> 

Pretty hard to help without seeing an example script you're
trying to run.   Please post the smallest script you can
write that demonstrates the problem.

For instance, the following works properly here:

#!/usr/bin/php -q
<?
$db = mysql_connect("localhost", "test", "password");
mysql_select_db("zorum",$db);
$result = mysql_query("SELECT * FROM box_zorum",$db);
printf("l1: %s\n", mysql_result($result,0,"content"));
?>

prints:   l1: DB_test_content1

Also please post the output of these two commands:

php -v
php -i | grep -i "mysql support"

Cheers,
Sean


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to