Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
Take a look at this for yourself... www.bublades.com/test.php For me, it keeps asking if I want to download the file instead of displaying it as a webpage. I've been searching ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2005
    Posts
    19

    Question Debian/Apache/PHP problems


    Take a look at this for yourself... www.bublades.com/test.php

    For me, it keeps asking if I want to download the file instead of displaying it as a webpage. I've been searching the internet and typing in 'apt-get install' commands all night long for Apache and php4 and MySQL. I have added the line my httpd.conf file for the php4 module. I have commented out a few other things. What am I missing? Should I post anything on here (such as my httpd.conf file)?

  2. #2
    Just Joined!
    Join Date
    Oct 2005
    Location
    North Carolina, USA
    Posts
    45
    Does your httpd config have these lines? (These are from the Slackware apache package and reside in a file named mod_php.conf -- your distribution might be different.)

    LoadModule php4_module libexec/apache/libphp4.so

    AddType application/x-httpd-php .php

  3. #3
    Just Joined!
    Join Date
    Jun 2005
    Location
    Canada, Halifax
    Posts
    86
    take a look at your error log file (/var/log/apache/error.log) and you may gain additional insights there. I had a similar problem with a cgi form script I wrote a while back and it was due to a syntax error in my file.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User yourname3232's Avatar
    Join Date
    Aug 2005
    Location
    Pacific Northwest, USA
    Posts
    262
    You need this libapache2-mod-php4

    Type:

    apt-get install libapache2-mod-php4

    assuming that you have apache 2 and PHP4

    If you have apache and PHP4 then do

    apt-get install libapache-mod-php4
    Registered GNU/Linux User #399198
    'Experience is something you don't get until just after you need it.' -Steven Wright

  6. #5
    Just Joined!
    Join Date
    May 2005
    Posts
    19
    OK, I've done everything that you guys said. I also found something else that said I had to copy the php.ini file (from /etc/php/apache) to /usr/local/lib or /usr/lib and I did that. I restarted my server, but PHP still isn't working.

    I looked at my error log, and I'm getting this...

    [error] Cannot remove module mod-php4.c: not found in module list
    [warn] module php4-module is already loaded, skipping

    What do you think?

  7. #6
    Linux User yourname3232's Avatar
    Join Date
    Aug 2005
    Location
    Pacific Northwest, USA
    Posts
    262
    look through yout httpd.conf file, there should be 2 lines commented out that say something like "application-x\php" un comment those.
    Registered GNU/Linux User #399198
    'Experience is something you don't get until just after you need it.' -Steven Wright

  8. #7
    Just Joined!
    Join Date
    May 2005
    Posts
    19
    Done... still nothing.

  9. #8
    Linux User yourname3232's Avatar
    Join Date
    Aug 2005
    Location
    Pacific Northwest, USA
    Posts
    262
    This is a stupid question, but did you restart apache after you made the changes?
    Registered GNU/Linux User #399198
    'Experience is something you don't get until just after you need it.' -Steven Wright

  10. #9
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    /etc/init.d/httpd restart

  11. #10
    Just Joined!
    Join Date
    May 2005
    Posts
    19
    Haha, yeah. Mine is actually /etc/init.d/apache

    I've been doing that each time. I've also been using this command:

    /usr/sbin/apache-modconf apache

    It gives me some options like "Use the package maintainer's version" or "Use the currently installed version". I've tried both.

Page 1 of 2 1 2 LastLast

Posting Permissions

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