Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: opensuse 13.1 php5 issue

  1. #1

    Default opensuse 13.1 php5 issue

    Hi,

    I'm having problem with php5. I've already installed php5 on my system verified by these

    Code:
    VMSUSE:/srv/www/htdocs/ # php -v
    PHP 5.4.20 (cli)
    Copyright (c) 1997-2013 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    but when I view info.php (that has this <?php phpinfo(); ?> ) under /srv/www/htdocs/ the file is being download.

    output of apache2ctl -M

    Code:
    VMSUSE:/srv/www/htdocs # apache2ctl -MAH00557: httpd2: apr_sockaddr_info_get() failed for VMSUSE
    AH00558: httpd2: 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)
     access_compat_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)
     userdir_module (shared)
     reqtimeout_module (shared)
     authn_core_module (shared)
     authz_core_module (shared)
    which php5_module (shared) is not included my other server has this one

  2. #2

    Default Re: opensuse 13.1 php5 issue

    Quote Originally Posted by rapbondoc View Post
    which php5_module (shared) is not included my other server has this one
    The php5 module is in the package apache2-mod_php5, did you install that?

    And you might have to tell Apache to load that module.
    So add "php5" to the "APACHE_MODULES=" line in /etc/sysconfig/apache2, if it is not there already.

  3. #3

    Default Re: opensuse 13.1 php5 issue

    I installed php5 using "zypper in php5" but for some reason this extension php5-sockets is not being installed when I do that command.

    Was able to solve the issue when I installed php5-sockets. Thanks to cacti as cacti needed this extension in php5

    Maybe Opensuse could automatically add php5-sockets when user uses the command "zypper in php5"

  4. #4

    Default AW: Re: opensuse 13.1 php5 issue

    Quote Originally Posted by rapbondoc View Post
    I installed php5 using "zypper in php5" but for some reason this extension php5-sockets is not being installed when I do that command.

    Was able to solve the issue when I installed php5-sockets. Thanks to cacti as cacti needed this extension in php5

    Maybe Opensuse could automatically add php5-sockets when user uses the command "zypper in php5"
    Why?
    You don't need php5-sockets for using php5. PHP still works fine here in Apache when I uninstall php5-sockets.

    Of course your particular php script might need it, but that's no reason to require _everybody_ to install it.
    But even in that case, php5 should have been shown in the list of loaded modules.

    I think it's more likely that installing php5-sockets pulled in some other necessary package, like apache2-mod_php5.
    Or maybe you just didn't restart Apache after installing php5...

  5. #5

    Default Re: opensuse 13.1 php5 issue

    i have apache2-mod_php5 and did service apache2 restart but no luck.

    I found a solution by issuing this command
    a2enmod php5 to load php5 module manually.

    Code:
    linux-78rl:~ # apache2ctl -MLoaded Modules:
     core_module (static)
     access_compat_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)
     userdir_module (shared)
     reqtimeout_module (shared)
     authn_core_module (shared)
     authz_core_module (shared)
     php5_module (shared)

  6. #6

    Default Re: opensuse 13.1 php5 issue

    Quote Originally Posted by rapbondoc View Post
    I found a solution by issuing this command a2enmod php5 to load php5 module manually.
    Right.
    Adding "php5" to the "APACHE_MODULES=" line in /etc/sysconfig/apache2 (as I wrote) has the same effect though. That's what a2enmod actually does (it's just a shell script).
    Last edited by wolfi323; 04-Jun-2014 at 08:39.

  7. #7
    Join Date
    Aug 2008
    Location
    USA: [GMT -5]
    Posts
    74

    Default Re: opensuse 13.1 php5 issue

    Quote Originally Posted by rapbondoc View Post
    i have apache2-mod_php5 and did service apache2 restart but no luck.

    I found a solution by issuing this command
    a2enmod php5 to load php5 module manually.

    Code:
    linux-78rl:~ # apache2ctl -MLoaded Modules:
     core_module (static)
    ....<snip....>
     php5_module (shared)
    Hi! would you please share where you get the a2enmod command from? I see many references
    to it in forums threads re: apache2 and php5, but I don't have it on my system 13.1-x86_64.
    Kernel:
    3.11.10-21-desktop #1 SMP PREEMPT Mon Jul 21 15:28:46 UTC 2014 (9a9565d) x86_64 x86_64 x86_64 GNU/Linux
    Thanks.
    ---rob
    Have A Healthy, Prosperous Day! Leap-42.3_x86_64 -- KDE Plasma 5.12.8 / Lenovo M78-ThinkCentre / 12gb / 500gb / Radeon 8570D
    Kernel: linux 4.4.180-102-default / Linux User #3567324

  8. #8
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: opensuse 13.1 php5 issue

    Quote Originally Posted by robhwill View Post
    Hi! would you please share where you get the a2enmod command from?
    a2enmod is part of the Apache2 package.

    You need to be root to be able to run it, naturally.
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  9. #9
    Join Date
    Aug 2008
    Location
    USA: [GMT -5]
    Posts
    74

    Default Re: opensuse 13.1 php5 issue

    Thanks for reply! This is what I suspected. However, even with apache2 running and verified
    with the "It Works!" default page, I get error: "
    Code:
    a2enmod: command not found
    Also:
    using the which command I get:
    Code:
    #which a2enmod 
    which: no a2enmod in (/home/rob/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin)
    . Loading 127.0.0.1, 127.0.0.2, and 'localhost' into browser all bring up "It Works!" default apache2 index page.
    Again, I have version apache2-2.4.6-6.33.1.x86_64 installed and running properly. All advice appreciated.
    Thanks.
    ----rob
    Have A Healthy, Prosperous Day! Leap-42.3_x86_64 -- KDE Plasma 5.12.8 / Lenovo M78-ThinkCentre / 12gb / 500gb / Radeon 8570D
    Kernel: linux 4.4.180-102-default / Linux User #3567324

  10. #10

    Default Re: opensuse 13.1 php5 issue

    Quote Originally Posted by robhwill View Post
    Twhich: no a2enmod in (/home/rob/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin)
    [/CODE]. Loading 127.0.0.1, 127.0.0.2, and 'localhost' into browser all bring up "It Works!" default apache2 index page.
    a2enmod is in /usr/sbin, which is not in the _user_'s path by default. This should work though:
    Code:
    sudo /usr/sbin/a2enmod php5
    Or use "su" to switch to root, /usr/sbin should be in the path then.

    Or add "php5" to /etc/sysconfig/apache2 with a text editor, as I already wrote in comment#2, 5 months ago.
    Last edited by wolfi323; 02-Nov-2014 at 03:14.

Page 1 of 2 12 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
  •