[PHP] Mysql Authentication problem
Hi I am having problems using php to access a Mysql database as an authecitcated user. Environment: Solaris 8, apache 1.3.28, php 4.3.1, mysql 3.23.43 My php scripts can connect to the test database using null user and password. However, when I attempt to connect from a php script as user foo password bar I get an "Access denied for user [EMAIL PROTECTED] using password=YES". However, this user/password combo is acceptable to the mysql command line client. I assume php is talking to mysql because i can connect as an unauthenticated user to the test database, however when php tries to connect, from localhost, as a valid user, it is not authenticating. The user has both localhost and % host privileges in the mysql permission schema. Where do I look next? Cheers James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mysql Authentication problem
> > [snip] > > The user has both localhost and % host privileges in the mysql > > permission > > schema. > > [/snip] > > > > Add the same user with 127.0.0.1 as the host. Make sure you reload > > ("flush") the users table > > > > Any other thoughts? > [/snip] > > What is your connection string? (code) > > current testing code: $link = mysql_connect("localhost", "user", "pass" ) or die("Could not connect : " . mysql_error()); print "Connected successfully"; mysql_select_db("name") or die("Could not select database"); print "connected"; with user = null && pass=null && name=test then I can access the test db with no probs JH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mysql Authentication problem
On Thu, 11 Sep 2003, CPT John W. Holmes wrote: > > current testing code: > > > > $link = mysql_connect("localhost", "user", "pass" ) > > or die("Could not connect : " . mysql_error()); > > print "Connected successfully"; > > mysql_select_db("name") or die("Could not select database"); > > print "connected"; > > > > with user = null && pass=null && name=test then I can access the test db > > with no probs > > How did you create this new user? Using mysql grant statements: originally: grant all privilges on name.* to [EMAIL PROTECTED] identified by 'pass'; grant all privileges on name.* to user@'%' identified by 'pass; and just now grant all privileges on name.* to user@'127.0.0.1'... also tried expanding name.* to *.* JH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mysql Authentication problem
> > How did you create this new user? > > Using mysql grant statements: > > originally: > > grant all privilges on name.* to [EMAIL PROTECTED] identified by 'pass'; > grant all privileges on name.* to user@'%' identified by 'pass; > and just now > grant all privileges on name.* to user@'127.0.0.1'... > [/snip] > > And then you flushed (just double checking)? Yup. Double checked again (just to make sure) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with cgi-binary
Hi Setup is RH7 on intel running php4.01pl1 as a cgi binary. virtual server apache conf file includes Action php-script /cgi-bin/php AddHandler php-script .php when php script is called, the following error occurs: Parse error: parse error in /www/hosted/(Server name)/cgi-bin/php on line 598 However, on another virtual host on the same physical server, with an identical .conf file (except for file paths of course), php works fine. There is a copy of the php binary in each cgi-bin. I know that this has been reported before in the list, but a search did not bring up an answer. Can anyone help? James Hamilton [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Script to interpret ssi include calls
Hi I am developing pages for a site that has been constructed using nested apache ssi virtual include calls to build each page. Each included page may contain calls to other pages etc This means that if I call page elements into a php page (using include()/require() ) the calls arent parsed by php. Does anyone have script that reads pages for server side includes and calls them in through php? Cheers james [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]