mysql_connect fails from cmd line but works through browser
Posted 01 August 2006 - 11:41 PM
On command line
>> php script.php
<b>Fatal error</b>: Call to undefined function: mysql_connect() in <b>/home/somepath/lib/opendb.php</b> on line <b>2</b><br>
and the script doesn't make any database changes.
if I try from a browser
I get the expected output, and I get back data from tables the script uses and the tables that are expected to update some value do get updated.
I created a scrip with phpinfo() in it, I get few mysql entries. I'm sure the connection to db is working since i can read/update tables.
what gives? running on linux, php4.0.6, mysql 3.x
Posted 02 August 2006 - 01:24 AM
Posted 02 August 2006 - 05:46 AM
Walla! is this possible! i wanna have such a computer too!, sorry i was not trying to insult, just really too much surprised. i don't think its possible at all, even try re-installing to contacting the MySQL bug report.
Posted 02 August 2006 - 05:58 AM
i really have no idea what's happening. Then why do you ahve to use it from prompt, can't you just use the script?
sorry, turns out i'm running mysql 4.0.24-standard
Posted 02 August 2006 - 07:22 AM
regardless, it's baffling me why the script works through the browser, but generates the mentioned error on command line. I'm wondering, what's the plumbing difference between the two?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users