Results 1 to 8 of 8

Thread: Apache+PHP Nightmare

  1. #1
    Join Date
    Jun 2006
    Location
    New Jersey
    Beans
    310
    Distro
    Ubuntu 7.04 Feisty Fawn

    Angry Apache+PHP Nightmare

    I've searched the net for an hour and a half now. I'm turning to you guys for help...

    Sounds simple, XAMPP. I've installed this without issue on a windows box. But windows doesn't have the permissions system linux does. So when I installed it on my Ubuntu box i wasn't able to access anything on local host but what came with xampp. 403 forbidden errors.. lots of them.

    Yes I searched the net to fix this. Nothing seemed to work, nothing seemed to be worded for a simpleton like myself. I gave up after an hour...

    So i found a lamp how to and decided to give it a go.

    Now I have apache running however localhost still points to localhost/xampp and i don't know how to change that. its still working though... localhost/test.html ran without issue.

    So i continued the steps for php...

    installed find restarted apache and got this...

    Code:
    sudo /etc/init.d/apache2 restart
     * Restarting web server apache2
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    but it was still working for html and read that its not an issue if im not setting this up for all on a network so i continued and decided to test the php..

    guess yet?

    yea no go. firefox wants to download the php file because it doesn't know what to do with it.

    I need so help guys... Anything would be nice.

  2. #2
    Join Date
    Jun 2006
    Location
    New Jersey
    Beans
    310
    Distro
    Ubuntu 7.04 Feisty Fawn

  3. #3
    Join Date
    May 2008
    Location
    Birmingham, UK
    Beans
    283
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Apache+PHP Nightmare

    If you haven't already done so, have a look at https://help.ubuntu.com/community/ApacheMySQLPHP. The section on virtual hosts may help in changing where "localhost" points to.

    There is also a section on "troubleshooting" (immediately following "installing php 5") which deals with the problem of firefox wanting to download the php script.
    Last edited by cpetercarter; June 30th, 2008 at 11:40 AM.

  4. #4
    Join Date
    Jun 2006
    Location
    Switzerland
    Beans
    Hidden!
    Distro
    Kubuntu Jaunty Jackalope (testing)

    Re: Apache+PHP Nightmare

    http://www.howtoforge.com --> there are perfect howtos that you can follow to setup a complete webserver.

  5. #5
    Join Date
    Jun 2006
    Location
    New Jersey
    Beans
    310
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Apache+PHP Nightmare

    Quote Originally Posted by cpetercarter View Post
    If you haven't already done so, have a look at https://help.ubuntu.com/community/ApacheMySQLPHP. The section on virtual hosts may help in changing where "localhost" points to.

    There is also a section on "troubleshooting" (immediately following "installing php 5") which deals with the problem of firefox wanting to download the php script.
    I don't know what I would do without you guys... seriously Worked like a charm. No more testing my sites on an actual godaddy server

    Should I be worried about security?

  6. #6
    Join Date
    May 2008
    Location
    Birmingham, UK
    Beans
    283
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Apache+PHP Nightmare

    I do not think you need to worry that your apache etc installation will cause security risks, unless you have set up your firewall so as to permit connections from other computers. (Firestarter > Policy > Inbound Traffic Policy will tell you whether you have set up any such permissions. By default, there are none.)

  7. #7
    Join Date
    Apr 2006
    Location
    Fresno CA
    Beans
    2,790
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Apache+PHP Nightmare

    With LAMP (Apache2, MySQL & PHP) installed you still need to tell Apache2 that it can run PHP. /etc/apache2/httpd.conf is probably empty and need to have the following three lines added:

    LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
    AddType application/x-httpd-php .php .phtml
    AddType application/x-httpd-php-source .phps
    Thank a veteran -- George 8)
    Internet Coach & Writer
    Personal Blog -- 3 Joes' Blog

  8. #8
    Join Date
    Jun 2006
    Location
    Switzerland
    Beans
    Hidden!
    Distro
    Kubuntu Jaunty Jackalope (testing)

    Re: Apache+PHP Nightmare

    better to use
    Code:
    sudo a2enmod php5 && sudo /etc/init.d/apache restart
    than adding those manually

Tags for this Thread

Bookmarks

Posting Permissions

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