Results 1 to 10 of 10

Thread: php error: download info.php instead of see it

  1. #1
    Join Date
    Apr 2011
    Location
    loading ...
    Posts
    53

    Default php error: download info.php instead of see it

    I am installing phpvirtualbox on OpenSUSE 42.1 trying to installing it I came from this error:



    So I try to check my php configuration creating this page info.php:

    Code:
    <?php
    phpinfo();
    ?>
    But I'm getting the info.php page to download.

    I installed php5 of course!

    Code:
    sudo zypper in php5
    then I try to check if it's loaded

    Code:
    > sudo apache2ctl -M
    AH00557: httpd-prefork: apr_sockaddr_info_get() failed for linux-rza6
    AH00558: httpd-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
    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_core_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)
    But I'm not see any php5 module loaded.

    I'm not sure what to edit on php.ini to fix this... ¿Any one?

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,235
    Blog Entries
    15

    Default Re: php error: download info.php instead of see it

    Hi
    Use a2enmod command to list and enable;
    Code:
    a2enmod: enable/disable an apache module in APACHE_MODULES in /etc/sysconfig/apache2
    
    usage: a2enmod [-d] module
           a2enmod -l                    list modules
           a2enmod -q module             query if module is installed
    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!

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,394

    Default Re: php error: download info.php instead of see it

    I guess that you have a Apache2 server running on a system where that PHP script is and that you try to browse it from another or the same machine (you do explain much).

    IIRC you have to configure apache that it should use PHP. Did you do that?
    Henk van Velden

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,394

    Default Re: php error: download info.php instead of see it

    I looked in my 13.1 apache config. I found
    Code:
    boven:/etc/apache2/sysconfig.d # grep php  *
    loadmodule.conf:LoadModule php5_module                    /usr/lib64/apache2/mod_php5.so
    boven:/etc/apache2/sysconfig.d #
    Looks that malcolm has a better solution.
    Last edited by hcvv; 20-Jun-2016 at 12:00.
    Henk van Velden

  5. #5
    Join Date
    Apr 2011
    Location
    loading ...
    Posts
    53

    Default Re: php error: download info.php instead of see it

    Quote Originally Posted by hcvv View Post
    I guess that you have a Apache2 server running on a system where that PHP script is and that you try to browse it from another or the same machine (you do explain much).

    IIRC you have to configure apache that it should use PHP. Did you do that?
    yes i have php + apache on same server..

    Reaally lost here what should I do?

    I thought that I have to install the mod and php5 + apache will handle it...



    (sorry my english)

    Code:
    /etc/apache2/sysconfig.d> grep php *
    /etc/apache2/sysconfig.d>

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,235
    Blog Entries
    15

    Default Re: php error: download info.php instead of see it

    Quote Originally Posted by maniat1k View Post
    yes i have php + apache on same server..

    Reaally lost here what should I do?

    I thought that I have to install the mod and php5 + apache will handle it...



    (sorry my english)

    Code:
    /etc/apache2/sysconfig.d> grep php *
    /etc/apache2/sysconfig.d>
    Hi
    Is apache2-mod_php5 installed?
    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!

  7. #7
    Join Date
    Apr 2011
    Location
    loading ...
    Posts
    53

    Default Re: php error: download info.php instead of see it

    yes it is:

    Code:
    ~> zypper search php5 | grep mod
    i | apache2-mod_php5                     | Módulo PHP5 para Apache 2.0.                                                  | package

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,235
    Blog Entries
    15

    Default Re: php error: download info.php instead of see it

    Quote Originally Posted by maniat1k View Post
    yes it is:

    Code:
    ~> zypper search php5 | grep mod
    i | apache2-mod_php5                     | Módulo PHP5 para Apache 2.0.                                                  | package
    Hi
    So does it show up in;
    Code:
    a2enmod -l
    If so, then query it with the q option.
    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!

  9. #9
    Join Date
    Apr 2011
    Location
    loading ...
    Posts
    53

    Default Re: php error: download info.php instead of see it

    Quote Originally Posted by malcolmlewis View Post
    Hi
    So does it show up in;
    Code:
    a2enmod -l
    If so, then query it with the q option.
    nope it does not show up:

    Code:
    @linux-rza6:~> sudo a2enmod -l
    root's password:
    actions alias auth_basic authn_file authz_host authz_groupfile authz_core authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl socache_shmcb userdir reqtimeout authn_core

  10. #10
    Join Date
    Apr 2011
    Location
    loading ...
    Posts
    53

    Default Re: php error: download info.php instead of see it

    Ok found a workaround in the google+ group:

    Eik M.
    Yesterday 6:46 PM

    what i do is... installing yast http-server. then start it over yast and follow the setup and activate php scripting language over yast. after this start apache2 on boot over yast service manager. last thing open firewall ports 80 and 443 over yast. ready.... or reboot and then ready.... this requires php5 and apache php5_mod are installed already...
    So I installed yast http-server open the port that phpvirtualbox needed restart apache and that it.

    https://plus.google.com/103908896366...ts/8c9uAiS9hUw

    this just make it work... moving on.

    thanks!
    regards
    maniat1k

Tags for this Thread

Posting Permissions

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