Re: strange errors from command line vs. web

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



blackwater dev wrote:

> Ok, dumb question but how do I do that?  I know how to re-compile the
> standard php.  My code also uses mssql via freetds, does that somehow
> need
> to be enabled as it doesn't seem to fail there.
>
> Thanks!
>
>> >
>> > echo "about to connect";
>> > $this->connectionID= @mysql_connect($this->host, $this->user,
>> > $this->password);
>> > echo "after connect";
>> >
>
Just to verify that this is in fact the problem you should remove the
'@' sign from mysql_connect.  '@' is a way of supressing errors, you
specifically WANT that error.  Is there a reason you have the '@' there?

If the error is 'Undefined function mysql_connect' then you do need to
get MySQL support compiled in...  If it is available on the apache
module it should be available to the CLI as well.

If there is no 'undefined function' error then you should also be
calling 'echo mysql_error()' to see what the error is after connecting. 
That error is going to give you more info than any of us can.

Travis

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux