Results 1 to 7 of 7

Thread: How to install Apache 2.4 and PHP 5.4/5.5?

  1. #1

    Question How to install Apache 2.4 and PHP 5.4/5.5?

    Hello,
    please, can somebody help me with installation of Apache 2.4 and PHP 5.4 or in better case in 5.5? I tried 2 "manuals" how to do it, but first didn't work a second has errors with which I don't know what to do.
    Now server throws error 500 and doesn't write anything in logs.

    Thank you all

    P.S. Sorry for potential errors in my English

  2. #2

    Default Re: How to install Apache 2.4 and PHP 5.4/5.5?

    A few questions:
    - Which openSUSE version?

    - What manuals did you follow?

    - Which errors did you get while following the manual?
    (Error 500 means "Internal server error", that doesn't really say much)

    - Why do you insist on Apache 2.4 and PHP 5.4/5.5 instead of Apache 2.2 and PHP 5.3 as included in openSUSE 12.3 f.e.?

    - How did you install Apache and PHP?

    - How did you start Apache?

    - What does "systemctl status apache2.service" say?

  3. #3

    Default Re: How to install Apache 2.4 and PHP 5.4/5.5?

    OpenSuSE 12.3

    https://forums.opensuse.org/english/...ml#post2535926
    and for second I can't find link

    In error log is:
    [Sun Jun 30 19:59:12.707272 2013] [mpm_prefork:notice] [pid 1458] AH00163: Apache/2.4.4 (Linux/SUSE) PHP/5.4.12 configured -- resuming normal operations
    [Sun Jun 30 19:59:12.707346 2013] [core:notice] [pid 1458] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -D NO_DETACH'
    [Sun Jun 30 19:59:29.738862 2013] [core:error] [pid 1477] [client ::1:32861] AH00027: No authentication done but request not allowed without authentication for /. Authentication not configured?
    [Sun Jun 30 19:59:29.746724 2013] [core:error] [pid 1477] [client ::1:32861] AH00027: No authentication done but request not allowed without authentication for /error/HTTP_INTERNAL_SERVER_ERROR.html.var. Authentication not configured?
    [Sun Jun 30 19:59:30.016658 2013] [core:error] [pid 1478] [client ::1:32862] AH00027: No authentication done but request not allowed without authentication for /favicon.ico. Authentication not configured?
    [Sun Jun 30 19:59:30.016853 2013] [core:error] [pid 1478] [client ::1:32862] AH00027: No authentication done but request not allowed without authentication for /error/HTTP_INTERNAL_SERVER_ERROR.html.var. Authentication not configured?
    [Sun Jun 30 19:59:30.022341 2013] [core:error] [pid 1479] [client ::1:32863] AH00027: No authentication done but request not allowed without authentication for /favicon.ico. Authentication not configured?
    [Sun Jun 30 19:59:30.022453 2013] [core:error] [pid 1479] [client ::1:32863] AH00027: No authentication done but request not allowed without authentication for /error/HTTP_INTERNAL_SERVER_ERROR.html.var. Authentication not configured?

    In project on which I work we use PHP 5.4 and we want switch to PHP 5.5. And I found that I have to install Apache 2.4, when I want install PHP 5.5 (on OpenSuSE).

    I added php 5.4 and apache 2.4 factory repos to repos list in Yast.

    su
    rcapache2 start

    It seems like everything works correctly, no errors displayed

  4. #4

    Default Re: How to install Apache 2.4 and PHP 5.4/5.5?

    Quote Originally Posted by repakolius View Post
    In project on which I work we use PHP 5.4 and we want switch to PHP 5.5. And I found that I have to install Apache 2.4, when I want install PHP 5.5 (on OpenSuSE).

    I added php 5.4 and apache 2.4 factory repos to repos list in Yast.

    su
    rcapache2 start

    It seems like everything works correctly, no errors displayed
    AFAICS the PHP 5.4 packages DON't require Apache 2.4, they just require apache2.
    So I would suggest to switch apache back to the version included in standard openSUSE 12.3, since those 2.4 packages contain a non-working default configuration (at least until recently). But delete /etc/apache2 first, otherwise you just keep that invalid configuration!

    Please show your repo list and installed apache packages, and I will give you detailed steps how to proceed:
    Code:
    zypper lr -d
    rpm -qa | grep apache
    Regarding apache 2.4 see f.e. here: https://bugzilla.novell.com/show_bug.cgi?id=813705 (comment #1 exactly mentions your error log entries)
    You can find hints there how to get 2.4 working if you want to stay with that version.
    Apparently you have to run:
    Code:
        a2enmod authz_file
        a2enmod authz_core

  5. #5

    Default Re: How to install Apache 2.4 and PHP 5.4/5.5?

    No, I don't need Apache 2.4, I just read somewhere it is recommended to have it when you want install PHP 5.4+. So I can have Apache 2.2 without problems.

    linux-upjd:/etc # zypper lr -d
    # | Alias | Name | Enabled | Refresh | Priority | Type | URI | Service
    ---+---------------------------+------------------------------------+---------+---------+----------+--------+------------------------------------------------------------------------------------------+--------
    1 | factory | factory php 5.4 | Yes | Yes | 99 | rpm-md | Index of /repositories/devel:/languages:/php:/php54/openSUSE_Factory |
    2 | factory_apache_2.4 | factory apache 2.4 | Yes | Yes | 99 | rpm-md | Index of /repositories/Apache/openSUSE_12.3 |
    3 | openSUSE-12.3-1.7 | openSUSE-12.3-1.7 | Yes | No | 99 | yast2 | cd:///?devices=/dev/disk/by-id/ata-VBOX_CD-ROM_VB2-01700376,/dev/sr0 |
    4 | repo-debug | openSUSE-12.3-Debug | No | Yes | 99 | NONE | Index of /debug/distribution/12.3/repo/oss |
    5 | repo-debug-update | openSUSE-12.3-Update-Debug | No | Yes | 99 | NONE | Index of /debug/update/12.3 |
    6 | repo-debug-update-non-oss | openSUSE-12.3-Update-Debug-Non-Oss | No | Yes | 99 | NONE | Index of /debug/update/12.3-non-oss |
    7 | repo-non-oss | openSUSE-12.3-Non-Oss | Yes | Yes | 99 | yast2 | Index of /distribution/12.3/repo/non-oss |
    8 | repo-oss | openSUSE-12.3-Oss | Yes | Yes | 99 | yast2 | Index of /distribution/12.3/repo/oss |
    9 | repo-source | openSUSE-12.3-Source | No | Yes | 99 | NONE | Index of /source/distribution/12.3/repo/oss |
    10 | repo-update | openSUSE-12.3-Update | Yes | Yes | 99 | rpm-md | Index of /update/12.3 |
    11 | repo-update-non-oss | openSUSE-12.3-Update-Non-Oss | Yes | Yes | 99 | rpm-md | Index of /update/12.3-non-oss |


    linux-upjd:/etc # rpm -qa | grep apache
    apache2-utils-2.4.4-3.2.x86_64
    apache2-2.4.4-3.2.x86_64
    apache2-prefork-2.4.4-3.2.x86_64
    apache2-mod_php5-5.4.12-1.4.x86_64


  6. #6

    Default Re: How to install Apache 2.4 and PHP 5.4/5.5?

    Quote Originally Posted by repakolius View Post
    No, I don't need Apache 2.4, I just read somewhere it is recommended to have it when you want install PHP 5.4+.

    So I can have Apache 2.2 without problems.
    Well, I have to admit I have no idea about that.
    Let's just try to switch back to 2.2, we always can upgrade again later if necessary.


    linux-upjd:/etc # zypper lr -d
    # | Alias | Name | Enabled | Refresh | Priority | Type | URI | Service
    ---+---------------------------+------------------------------------+---------+---------+----------+--------+------------------------------------------------------------------------------------------+--------
    1 | factory | factory php 5.4 | Yes | Yes | 99 | rpm-md | Index of /repositories/devel:/languages:/php:/php54/openSUSE_Factory |
    2 | factory_apache_2.4 | factory apache 2.4 | Yes | Yes | 99 | rpm-md | Index of /repositories/Apache/openSUSE_12.3 |
    3 | openSUSE-12.3-1.7 | openSUSE-12.3-1.7 | Yes | No | 99 | yast2 | cd:///?devices=/dev/disk/by-id/ata-VBOX_CD-ROM_VB2-01700376,/dev/sr0 |
    4 | repo-debug | openSUSE-12.3-Debug | No | Yes | 99 | NONE | Index of /debug/distribution/12.3/repo/oss |
    5 | repo-debug-update | openSUSE-12.3-Update-Debug | No | Yes | 99 | NONE | Index of /debug/update/12.3 |
    6 | repo-debug-update-non-oss | openSUSE-12.3-Update-Debug-Non-Oss | No | Yes | 99 | NONE | Index of /debug/update/12.3-non-oss |
    7 | repo-non-oss | openSUSE-12.3-Non-Oss | Yes | Yes | 99 | yast2 | Index of /distribution/12.3/repo/non-oss |
    8 | repo-oss | openSUSE-12.3-Oss | Yes | Yes | 99 | yast2 | Index of /distribution/12.3/repo/oss |
    9 | repo-source | openSUSE-12.3-Source | No | Yes | 99 | NONE | Index of /source/distribution/12.3/repo/oss |
    10 | repo-update | openSUSE-12.3-Update | Yes | Yes | 99 | rpm-md | Index of /update/12.3 |
    11 | repo-update-non-oss | openSUSE-12.3-Update-Non-Oss | Yes | Yes | 99 | rpm-md | Index of /update/12.3-non-oss |


    linux-upjd:/etc # rpm -qa | grep apache
    apache2-utils-2.4.4-3.2.x86_64
    apache2-2.4.4-3.2.x86_64
    apache2-prefork-2.4.4-3.2.x86_64
    apache2-mod_php5-5.4.12-1.4.x86_64

    You added the php54 repo for Factory instead of 12.3, that's not at all recommended and can lead to problems as well!

    First of all: Did you do any custom configuration of apache2 yet? If yes you should save that first.

    Then please do the following:
    Code:
    sudo apache2ctl stop
    sudo zypper rr 1 2
    sudo zypper ar http://download.opensuse.org/repositories/devel:/languages:/php:/php54/openSUSE_12.3/ php54
    sudo rm -r /etc/apache2
    sudo zypper in -f apache2 apache2-prefork apache2-utils apache2-example-pages
    sudo zypper dup --from php54
    If you get any dependency conflicts, please ask how to proceed!

    After that start apache again with:
    Code:
    sudo systemctl start apache2
    And browsing to http://localhost/ should work now.

    You can enable automatic start at boot with:
    Code:
    sudo systemctl enable apache2

  7. #7

    Default Re: How to install Apache 2.4 and PHP 5.4/5.5?

    Thank you so much! It works perfectly!

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
  •