Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    php does not work in Slackware 10.1

    I am using Slackware 10.1. PHP will not load, and will not serve up any HTML, even when I put

    Include /etc/apache/mod_php.conf

    LoadModule php4_module libexec/
    AddType application/x-httpd-php .php .phtml

    Any ideas?


  2. #2
    Linux Newbie
    Join Date
    Dec 2004
    Barrie, Ontario
    tail -f /path/to/apache/error_log
    while you restart apache and see what (if any) errors it spits out...
    Blog - KB5UMQ - Linux User #272983
    3 Rules:
    1) "It doesn't work..." is simply not useful information.
    2) Don't cross post!
    3) If you are asking for help, start by telling us your distro/os and version.

  3. #3
    Just Joined!
    Join Date
    Mar 2005
    If you did the standard install you will have to edit /etc/httpd.conf and uncomment the line near the bottom (like 80% down) so that apache will realize that php files are special and get sent to the php executable. Otherwise it will treat them as plaintext and html.

  4. $spacer_open
  5. #4
    Linux Newbie deek's Avatar
    Join Date
    Mar 2005
    Fort Wayne, IN
    I had to make sure three things were in my httpd.conf file.

    There was a .so file that needed to be loaded as a module.
    There was also a .c file in the section below the default config.
    Had to uncomment the file types .php .phps

    If you just did a default install of apache and a default install of php, all you really need to do is copy the php.ini file over to /etc/apache and use the default httpd.conf file, make those three changes/confirm I described above, and you should be set.

    Thas is all I did with my Slack 10.1 install, and everything worked fine!

  6. #5
    which .so file needs to be loaded as a module? and what do I do about that .c file?

  7. #6
    Linux Newbie deek's Avatar
    Join Date
    Mar 2005
    Fort Wayne, IN
    This is what I have in my httpd.conf file:

    With the LoadModules:
    LoadModule php4_module libexec/apache/

    With the AddModules:
    AddModule mod_php4.c

    And finally:
    # This next section adds handlers for .php file.
    <IfModule mod_php4.c>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .phtml
    AddType application/x-httpd-php-source .phps

    That is all I needed to do. And this is slack 10.1, nothing fancy.

Posting Permissions

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