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

PHP, Apache, MySql Intermittent errors

Any Clues anyone?

I am using a potato installation. I have apt/dselect installed apache, PHP4 and
am running mysqld on another networked machine.

I have updated the etc/php4/apache/php.ini file to include the mysql.so

I have also included a default mysqlserver, username and password in php.ini,
to allow others to write pages that access some read only database tables
without needing to know this data.

I find that my code will SOMETIMES fail if I use mysql_connect() or
mysql_pconnect() without arguments relying on the values in php.ini. I see an
error message of the form 
   Access denied for user: '@localhost' to database 'databasename'
where 'databasename is passed to mysql_db_query().

It fails perhaps once out of four tries.

If I supply the hostname, username and password to mysql_pconnect() then it
seems to work correctly. (I have tried tens of times without a failure.)

Any Ideas anyone?

Dave Whiteley

E-Mail: Dave Whiteley <eendlw@eenlnx4.leeds.ac.uk>
Date: 24-Nov-2000
Time: 11:17:13
Phone: 0113 233 2059

This message has been disinfected. 

It does not contain the Linux .sig virus.

Reply to: