Results 1 to 7 of 7

Thread: SOLVED apache upgrade to 2.4 has knocked out my .php extension pages

  1. #1
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default SOLVED apache upgrade to 2.4 has knocked out my .php extension pages

    Hi

    I have 2 webservers in my local openSUSE (tumbleweed but this isn't a Tumbleweed issue).

    I can see one website (with .html extensions) so Apache is running OK. I can't see the php website. I can see the files if I turn on +Indexes in .htaccess so the virtual host config is still working OK. It was visible yesterday before the upgrade from apache 2.2 to 2.4.

    Where do in look to turn php back on?

    Thanks
    John
    Last edited by swerdna; 01-Jun-2015 at 06:52.
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,853

    Default Re: apache upgrade to 2.4 has knocked out my .php extension pages

    There s another thread here with a different problem after the update. In that thread jetchisel pointed to this info:
    Code:
    http://localhost/manual/upgrading.html
    Henk van Velden

  3. #3
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: apache upgrade to 2.4 has knocked out my .php extension pages

    Thanks hcvv.

    However I'd already seen that. The essence of this problem is that the upgrade moved aside some files in /etc/apache2 and replaced them. Somewhere in those files there is a "line" with a parameter that turn on the ability to see files with the extension .php as web pages and proceed to read them and serve them to web browsers. I can't find where that happens and what it says. I've googled my fingers red and must be putting the wrong search in google. It will be a simple thiong, this turning on of php, but I can't find it.

    On the other hand, because I don't know much about this, it might be something completely different that's the problem.
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  4. #4
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: apache upgrade to 2.4 has knocked out my .php extension pages

    Here's a clue:

    When I set up this in a file called phpinfo.php:
    Code:
    <?php
        phpinfo();
    ?>
    And I enter this in the browser:
    Code:
    http://urllink/php.info
    .it simply downloads the file. Same with index.php.


    ??
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,488
    Blog Entries
    15

    Default Re: apache upgrade to 2.4 has knocked out my .php extension pages

    Hi
    You need the 'loadmodule' for php in your conf file, it can be enabled with the a2enmod command.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  6. #6
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: apache upgrade to 2.4 has knocked out my .php extension pages

    Thanks Malcolm. I ran then with php and then with php5 as arguments. I checked with this afterwards:
    Code:
    Tumbleweed132:/home/john # a2enmod php
    "php" already present
    Tumbleweed132:/home/john # a2enmod php5
    "php5" already present
    Then I ran apache2ctl:
    Code:
    Tumbleweed132:/home/john # apache2ctl -M                                                                                                                   
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/default-server.conf:7
    Loaded Modules:
     core_module (static)
     so_module (static)
     http_module (static)
     mpm_prefork_module (static)
     unixd_module (static)
     systemd_module (static)
     actions_module (shared)
     alias_module (shared)
     auth_basic_module (shared)
     authn_file_module (shared)
     authz_host_module (shared)
     authz_groupfile_module (shared)
     authz_user_module (shared)
     autoindex_module (shared)
     cgi_module (shared)
     dir_module (shared)
     env_module (shared)
     expires_module (shared)
     include_module (shared)
     log_config_module (shared)
     mime_module (shared)
     negotiation_module (shared)
     setenvif_module (shared)
     ssl_module (shared)
     socache_shmcb_module (shared)
     userdir_module (shared)
     reqtimeout_module (shared)
     authn_core_module (shared)
     authz_core_module (shared)
    The response I get in both chrome and internet explorer is this:
    Code:
    Access forbidden!
    
    You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
    
    If you think this is a server error, please contact the webmaster.
    
    Error 403
    If I address the file index.php it still downloads

    ?? any thoughts?
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  7. #7
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: apache upgrade to 2.4 has knocked out my .php extension pages

    OK it works. I did this: rebooted! And then it worked and I checked the modules again and got this:

    Tumbleweed132:/home/john # apache2ctl -M
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/default-server.conf:7
    Loaded Modules:
    core_module (static)
    so_module (static)
    http_module (static)
    ---------------------------SNIP-----------
    authz_core_module (shared)
    php5_module (shared)
    Thanks Malcolm
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

Posting Permissions

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