Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Firefox can't open php file from apache2 server on localhost

  1. #11
    Join Date
    May 2009
    Beans
    121
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Firefox can't open php file from apache2 server on localhost

    Dont think you should reinstall yet.
    When you upgraded to lucid, you also upgraded php to version 5.3.
    Look at this page about migrating from 5.2 to 5.3 http://www.php.net/manual/en/migration53.php
    One of the changes is to the php.ini files. http://www.php.net/manual/en/migration53.ini.php

    I am runnning 5.2 in Karmic, so I cant help you with specifics of the php.ini files.
    but look around in /etc/php5/apache2/ for the php.ini files
    In the .ini files kook for this or similar
    Code:
    ; Enable the PHP scripting language engine under Apache.
    engine = On
    engine needs to be On to work.
    This directive can be set from 'anywhere' so look in httpd.conf, .htaccess files for this php_flag engine off

  2. #12
    Join Date
    Nov 2006
    Beans
    37

    Re: Firefox can't open php file from apache2 server on localhost

    NOW WORKS: deleting cache, history solved the issue
    I have the same problem and only happens on Firefox, I've tried with Konqueror and works fine, why?

    EDITED: FIXED
    Last edited by Fenix-TX; April 9th, 2010 at 08:42 PM.

  3. #13
    Join Date
    Mar 2010
    Beans
    5

    Re: Firefox can't open php file from apache2 server on localhost

    I do have this exact same issue.. I installed lamp using tasksel.. and apache doesnt parse php files on my public_html dir..

    BUT if I place the files on /var/www it works..

    and phpmyadmin woks too.... any ideas?

    Quote Originally Posted by Fenix-TX View Post
    NOW WORKS: deleting cache, history solved the issue
    I have the same problem and only happens on Firefox, I've tried with Konqueror and works fine, why?

    EDITED: FIXED
    Are you the OP?

    cleaning the cache did not solve the issue for me. I tried with a clean profile, same issue.

  4. #14
    Join Date
    Mar 2010
    Beans
    5

    Re: Firefox can't open php file from apache2 server on localhost

    Quote Originally Posted by s_ø View Post
    try to comment out the bold lines. (I think the syntax has changed to the semicolon ; for comments.

    # To re-enable php in user directories comment the following lines
    # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
    # prevents .htaccess files from disabling it.

    <IfModule mod_userdir.c>
    <Directory /home/*/public_html>
    php_admin_value engine Off
    </Directory>
    </IfModule>
    this solved the issue

  5. #15
    Join Date
    Mar 2008
    Beans
    104

    Re: Firefox can't open php file from apache2 server on localhost

    I've had a similar problem - try replacing localhost with 127.0.0.1
    it seems everytime you upgrade the localhost mapping gets lost....

  6. #16
    Join Date
    May 2010
    Beans
    1

    Re: Firefox can't open php file from apache2 server on localhost

    Hi Makrie, comment all lines with # or replace these lines in mods-available/php5.conf, and adds these last two lines:

    sudo nano /etc/apache2/mods-available/php5.conf

    <IfModule mod_php5.c>
    # <FilesMatch "\.ph(p3?|tml)$">
    # SetHandler application/x-httpd-php
    # </FilesMatch>
    # <FilesMatch "\.phps$">
    # SetHandler application/x-httpd-php-source
    # </FilesMatch>
    # To re-enable php in user directories comment the following lines
    # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
    # prevents .htaccess files from disabling it.
    # <IfModule mod_userdir.c>
    # <Directory /home/ruso/public_html>
    # php_admin_value engine OFF
    # </Directory>
    # </IfModule>
    AddType application/x-httpd-php .php .phtml .php3 .html .xhtml
    AddType application/x-httpd-php-source .phps
    </IfModule>

    sudo /etc/init.d/apache2 restart

    It worked for me!

  7. #17
    Join Date
    Aug 2005
    Location
    Wales
    Beans
    Hidden!
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Firefox can't open php file from apache2 server on localhost

    This worked perfectly for me!
    Much obliged.

    Quote Originally Posted by FRuso View Post
    Hi Makrie, comment all lines with # or replace these lines in mods-available/php5.conf, and adds these last two lines:

    sudo nano /etc/apache2/mods-available/php5.conf

    <IfModule mod_php5.c>
    # <FilesMatch "\.ph(p3?|tml)$">
    # SetHandler application/x-httpd-php
    # </FilesMatch>
    # <FilesMatch "\.phps$">
    # SetHandler application/x-httpd-php-source
    # </FilesMatch>
    # To re-enable php in user directories comment the following lines
    # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
    # prevents .htaccess files from disabling it.
    # <IfModule mod_userdir.c>
    # <Directory /home/ruso/public_html>
    # php_admin_value engine OFF
    # </Directory>
    # </IfModule>
    AddType application/x-httpd-php .php .phtml .php3 .html .xhtml
    AddType application/x-httpd-php-source .phps
    </IfModule>

    sudo /etc/init.d/apache2 restart

    It worked for me!

  8. #18
    Join Date
    Jul 2010
    Beans
    3

    Re: Firefox can't open php file from apache2 server on localhost

    Hi,

    It's funny. I have spent many days to figure out why I can't used localhost while using 127.0.0.1 and hostname can work nicely.....

    Anyone can have an explanation on this?

    Thanks a lot.

  9. #19
    Join Date
    Oct 2010
    Beans
    17

    Re: Firefox can't open php file from apache2-Solved

    I also had this problem. I reloaded Apache2 and it was still there. Tried clearing the Firefox Cache as suggested in another post. This did not work for the tools menu. My profile was on an NT file system. After I emptied the Cache directory in my profile using normal file system access the problem was gone.

Page 2 of 2 FirstFirst 12

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
  •