I use Plesk 7.5 to do most of the maintenance on my web server (red hat fedora core 2 w/ Apache server). I also SSH into the server to do stuff that Plesk won't let me, although my Linux/Apache knowledge is limited (I'm learning though!) First, I made a fairly simple mail form script in PHP that runs perfectly.
After this I wanted to implement a database to store emails of people that sign up for a newsletter. I created the DB using the PHPMyAdmin and set up a user and password for it.
Then I created a PHP script to insert a name and email into a MySQL database. I finally got it to do *something* and got this error message:
This baffled me as I don't use a 'apache' user to log in to the database, so I'm thinking its the webserver (i.e. php) trying to access the database as itself. Is there a permission somewhere I need to set in order to access the database via the script?
Thanks all!
Jason
After this I wanted to implement a database to store emails of people that sign up for a newsletter. I created the DB using the PHPMyAdmin and set up a user and password for it.
Then I created a PHP script to insert a name and email into a MySQL database. I finally got it to do *something* and got this error message:
Code:
Access denied for user: 'apache@localhost' (Using password: NO)
This baffled me as I don't use a 'apache' user to log in to the database, so I'm thinking its the webserver (i.e. php) trying to access the database as itself. Is there a permission somewhere I need to set in order to access the database via the script?
Thanks all!
Jason