Find the answer to your Linux question:
Results 1 to 9 of 9
Hi 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2004
    Posts
    5

    Apache + MySQL + PHP


    Hi

    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 (

    Tirgondil

  2. #2
    Linux Newbie
    Join Date
    May 2004
    Location
    Chennai, India
    Posts
    116

    Re: Apache + MySQL + PHP

    What do you exactly mean by "NOT WORKING".?
    Can you paste the logs?
    Please Describe the Error you are facing.
    NEVER stop/pause Journey of Learning -Travelling Soldier ( Me )

  3. #3
    Just Joined!
    Join Date
    Jun 2004
    Posts
    5
    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

    thanks
    Tirgondil

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    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.

    Jason

  6. #5
    Just Joined!
    Join Date
    Jun 2004
    Posts
    5
    Thanks
    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

    Tirgond

  7. #6
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    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.

  8. #7
    Just Joined!
    Join Date
    Jun 2004
    Posts
    5
    Thanks

    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?

    Tirgondil

  9. #8
    Linux User Muser's Avatar
    Join Date
    May 2004
    Location
    Maryland
    Posts
    363
    ok u check whether you are using mysql or mysql4, i'll guess just mysql

    input fields:

    Host: localhost
    User: root
    Password: (root passoword or maybe just leave it blank, which mine does)
    Database Name: name
    Database Prefix: _prefix

    try that

  10. #9
    Just Joined!
    Join Date
    Jun 2004
    Posts
    5
    Thanks

    It worked.
    Had to give away and change some rights too, but it is working now.

    Tirgond

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •