hi,
i have something wierd php cli stuff happaning. i have installed php 4.3.0 from the same source on 2 different machines one is bsd the other one rh8. the cli on the bsd works fine the one one rh8 doesn't.
i just rebuild php on the rh8 from the 4.3.3 source. the /usr/local/bin/php -v is still giving me PHP 4.3.0 (cli)... how do i find the 4.3.3 one?!
the problem is that the php scripts on the rh8 machine are not working. they work fine on the bsd one. an example:
#!/usr/local/bin/php -q
<?
$db = mysql_connect("localhost", "user", "pass");
mysql_select_db("mydb",$db);
$result = mysql_query("SELECT * FROM exits",$db);
printf("l1: %s\n", mysql_result($result,0,"content");
?>
when executed on the command line this script returns this:
./ra.php
./ra.php: line 2: ?: No such file or directory
./ra.php: line 3: syntax error near unexpected token ('
./ra.php: line 3: $db = mysql_connect("localhost", "user", "pass");'
#
i know that the /usr/local/bin/php is only a shell script that passes the php scripts to sed and then to the system....
where should look? how can i solve this...
thanks