Apache + MySQL + PHP
I am trying to set up a forum, using Slackware Linux.
I have put up some Linux servers before - but now I am lost.
Whenever I get the PHP and Apache to work - the MySQL won't cooperate. And if I get MySQL, the PHP will not be nice.
I have installed from Slack 8.1 and 9.1, but from both this install - MySQL doesn't work. If I install MySQL it works fine - but I can't get the PHP to work?
Does anyone out there know anything about this - and have a solution or and advice?
My hair would be ever gratefull to any replie - as it starts to be less and less for every hour :((
Re: Apache + MySQL + PHP
What do you exactly mean by "NOT WORKING".?
Can you paste the logs?
Please Describe the Error you are facing.
What I mean with "NOT WORKING", is that I can't access any database - as there is non installed (thought that the installation from the Slackware Installation would do that). Or I get a fault on the mysql.sock.
With PHP it is easy - when accessing a php page - I get a question of which program I want to open it in .)) Well...
I know I have to write in the httpd.conf, and add LoadModule xxx, AddModule xxx and AddType.
The log is home - as I am work no.
But they say the same as here - no database found, or wrong socket :((
Hope this cleared out a little :)
in your php.ini file, you can specify the path the the mysql.sock file in the "mysql.default_socket" option.
Usually this is blank by default, but to solve the cannot connect to sock error (i assume this is what you are getting, but you havent been specific!), you must specify the path to mysql.sock.
oK, i'll do that.
Do you have any idea why the apache won't deal with php files?
I got it up once, but the MySQL wouldn't cooperate, so I reinstalled XX times. I followed the same procedure at a later point, when MySQL worked - but then I couldn't see php files.
As I sit in Ireland - I think Murphy's law is stronger :)
you REALLY need to be more specific. Unless we know exactly what is happening, we cannot offer accurate troubleshooting advice and we could be going round in circles for ever.
I think I found the main error. At the startup of the computer and all deamons, I think that the start-up of mysql bein done with wrong user.
mysqld_safe --user=mysql -> got that it coulde find ./mysql/host.frm
mysqld_safe --user=root -> no problems
Apache is also showing the PHP content.
I am trying to install a PHPBB forum (as this one for a friend), but as I run the install.php I get an error
"Couldn't connect to the database".
OK, do I have to create a specific user for this, or is there some configuration in php.ini or another file?
ok u check whether you are using mysql or mysql4, i'll guess just mysql
Password: (root passoword or maybe just leave it blank, which mine does)
Database Name: name
Database Prefix: _prefix
Had to give away and change some rights too, but it is working now.