brian wrote:
I'm setting up a site and am having loads of problems with MySQL (which
i don't use much, being a Postgres fan). The server is not controlled by
myself and I'm waiting on a reply from the admin. In the meantime:
PHP 4.3.9
Mysql 4.1.10a (server) 3.23.49 (client)
The database has been set up along with PHPMyAdmin (i also rarely use
this). I have been provided with a user & pass for PHPMyAdmin, as well
as a user & pass for the DB. Using the former, i have created the tables
and copied in my data. Within that interface, i can make any query i'd
like.
However, from within a PHP script (and using the second user & pass), i
seem to be SOL. Even the most basic queries return empty results.
Debugging has been a royal pain because interfaces such as MDB2, DB,
etc. are also not available. That means relying on mysql_error() which
is frustrating.
After much dicking around, i've come to the conclusion that the problem
must be that the user does not have permission to select from the DB. A
comment on the mysql_error() manual page [1] says that, in the case of
"Access denied ..." mysql_error() returns the empty string.
I feel like i've taken crazy pills! Please, someone tell me this isn't
true! How does one debug a problem like this? How can i know if i have
SELECT rights to the table?
[1] http://ca3.php.net/manual/en/function.mysql-error.php#44168
First, if you are having an access denied problem, you will get a PHP
error message. Perhaps you have errors turned off in your PHP script.
Turn them on until you get it working.
Second, you should be able to use phpMyAdmin to see what the permissions
are for the account you are using.
Janet
brian
--
Janet Valade -- janet.valade.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php