php-install Digest 31 Jan 2003 12:21:11 -0000 Issue 1227

Topics (messages 9892 through 9898):

dont do anything..
        9892 by: carlos perez

PHP w/ MySQL
        9893 by: Nick Gianakas
        9894 by: Matt Schroebel
        9895 by: Nick Gianakas
        9896 by: Matt Schroebel
        9897 by: Nick Gianakas

sessions
        9898 by: jacusy

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
hello guys, i am having so much trouble puting php to work with apache 2.44
and w2000....
when i call a php, the browser shows a page sayng cacelled action maybe the
page has tecnical problems.... now, the message is in spanish because i have
the w2000 in spanish, althoug normally the message related with the server
come in english.....
what can it be? if someone can help me i would appreciate....
it is ok if i send my config file and somebody discuss in the forum it?

thanks in advance...
carlos


--- End Message ---
--- Begin Message ---
Hi All,

I've been struggling w/ this problem for several months now on and off. 
I've exhausted my capabilities and would appreciate any help.

The problem I'm having is using PHP to access a MySQL database through
the web page.

Version Info:
PHP     4.3
Apache  1.3.24
MySQL   3.23.49a-1.
Red Hat 7.2 (default 2.4.7-10 kernel)

Although RedHat installed Apache, PHP, and MySQL, I removed them and
installed newer versions.

I configured Apache to use PHP, and it seems to work (I created a few
simple scripts and viewed them across the internet).

I also setup MySQL w/ a user who has access from the local loopback as
well as external addresses.  I tested the new user on the local machine
with:
   > mysql -h localhost -u dbuser01 -p testpwd
Everything works fine.  The user can access the database, and perform
operations.

So far, so good.

Now I setup a PHP script to access the database.  The pertinent lines
are:

   phpinfo();
   $link = mysql_connect("localhost", "dbuser01", "testpwd")
           or die ("Could not connect to database");


But I get an error:
  Warning: Access denied for user: 'dbuser01@nimble' (Using password:
YES) in /home/.../index.php on line 7

Warning: MySQL Connection Failed: Access denied for user:
'dbuser01@nimble' (Using password: YES) in /home/.../index.php on line 7
Could not connect to database


If the output of phpinfo() will help, you can find it at:
   http://www.wheeloyum.com/index2.php


I appreciate any and all help.

Regards,
Nick

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Nick Gianakas [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 30, 2003 9:49 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-INST] PHP w/ MySQL
> 
> 
> Hi All,
> 
> I've been struggling w/ this problem for several months now 
> on and off. 
> I've exhausted my capabilities and would appreciate any help.
> 
> The problem I'm having is using PHP to access a MySQL database through
> the web page.
> 
> Version Info:
> PHP     4.3
> Apache  1.3.24
> MySQL   3.23.49a-1.
> Red Hat 7.2 (default 2.4.7-10 kernel)

You really ought to upgrade and patch apache and mysql.  Both those
versions have holes.

> But I get an error:
>   Warning: Access denied for user: 'dbuser01@nimble' (Using password:
> YES) in /home/.../index.php on line 7

Now, I don't know the answer, but where is mysql getting 'nimble' from?
Shouldn't that be localhost as you show you provided?   Do you have a
host entry for localhost? Quick & Dirty you could add rights to nimble
your user.
--- End Message ---
--- Begin Message ---
On Thu, 2003-01-30 at 11:05, Matt Schroebel wrote:
> > 
> > The problem I'm having is using PHP to access a MySQL database through
> > the web page.
> > 
> > Version Info:
> > PHP     4.3
> > Apache  1.3.24
> > MySQL   3.23.49a-1.
> > Red Hat 7.2 (default 2.4.7-10 kernel)
> 
> You really ought to upgrade and patch apache and mysql.  Both those
> versions have holes.
You are right, I should upgrade.  I would like to get Apache-PHP-MySQL
working first, unless it's the cause of my problem.

> Now, I don't know the answer, but where is mysql getting 'nimble' from?
nimble is the name of my machine.

> Shouldn't that be localhost as you show you provided?

> Do you have a host entry for localhost?
If you're referring to /etc/hosts, yes I do.
These are the contents of my hosts file:
127.0.0.1       nimble  localhost.localdomain   localhost
192.168.1.5     nimble

> Quick & Dirty you could add rights to nimble your user.
I don't follow.  Add rights for my database user in MySQL explicitly for
nimble?

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Nick Gianakas [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 30, 2003 11:17 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-INST] PHP w/ MySQL
> > Do you have a host entry for localhost?
> If you're referring to /etc/hosts, yes I do.
> These are the contents of my hosts file:
> 127.0.0.1       nimble  localhost.localdomain   localhost

Change that to 
127.0.0.1 localhost localhost.localdomain  nimble
And you should be fine

> 192.168.1.5     nimble
>  
> > Quick & Dirty you could add rights to nimble your user.
> I don't follow.  Add rights for my database user in MySQL 
> explicitly for
> nimble?

If you need to, add the rights to your user at nimble, but the above
should fix it:
Grant all privileges on database_name.* to user_name@nimble identified
by 'my_secret';
Flush privileges;

That example is pretty un-restrictive, so you may only want to grant
insert,update,delete,etc rights
--- End Message ---
--- Begin Message ---
Hi Matt,

> Change that to 
> 127.0.0.1 localhost localhost.localdomain  nimble
That's it!  Thank you very much--I really appreciate it!

Thanks to all for your help and suggestions.

Regards,
Nick


On Thu, 2003-01-30 at 11:22, Matt Schroebel wrote:
> > -----Original Message-----
> > > Do you have a host entry for localhost?
> > If you're referring to /etc/hosts, yes I do.
> > These are the contents of my hosts file:
> > 127.0.0.1       nimble  localhost.localdomain   localhost
> 
> Change that to 
> 127.0.0.1 localhost localhost.localdomain  nimble
> And you should be fine
> 

--- End Message ---
--- Begin Message ---
Hi there!

How can I verify that the sessions in php are working correctly?

The problem is that I'd like to install a forum on my server but it
doesn't work. There are some session-errors.

session.save-path = /tmp
should be ok, right?

jacusy


--- End Message ---

Reply via email to