thanks for replying....

still notworking but i figured something out...
apache is using the php under /usr/local/bin/php
which is 4.3.0...

so i changed my code to this:

#!/usr/local/bin/php -q

mysql_connect(localhost, 'user', 'pass');

_________________________________________________________

just this....
now i get this:

# ./meLoop.php
./meLoop.php: line 5: syntax error near unexpected token `localhost,'
./meLoop.php: line 5: `mysql_connect(localhost, 'user', 'pass');'


please help....

thanks...


On Sun, 7 Sep 2003, Sean Estabrooks wrote:

> 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