You are not logged in.

#51 2014-03-10 15:36:33

progandy
Member
Registered: 2012-05-17
Posts: 5,209

Re: [solved] apache 2.4 doesn't work with php package

@kayaman: It gets easier if you don't use ProxyPass, but php-apache or mod_proxy_handler: https://wiki.archlinux.org/index.php/LAMP


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#52 2014-03-11 02:14:36

varg04444
Member
From: Colombia
Registered: 2009-09-26
Posts: 22

Re: [solved] apache 2.4 doesn't work with php package

Thanks, this work for me

Zygote wrote:
jilda wrote:
allencch wrote:

But I get the Access forbidden! in phpMyAdmin, and so does userdir.

same here

Did you make the necessary changes to the conf file for you site?

Instead of using the following notation:

LoadModule mpm_event_module modules/mod_mpm_event.so

you should now use this instead.

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
Order allow,deny
Allow from all

[EN] In the world there are 10 kinds of people, those who understand binary and those who not.
[ES] En el mundo hay 10 tipos de personas, las que entienden binario y las que no.

Offline

#53 2014-03-11 03:08:05

joetemp
Member
Registered: 2013-12-16
Posts: 73

Re: [solved] apache 2.4 doesn't work with php package

@progandy, Thanks so much for that info! I'm going to give it a shot. If I end up solving it, I'll change the status and let people know exactly what I did.

Offline

#54 2014-03-11 05:34:27

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved] apache 2.4 doesn't work with php package

Merging with the mega-thread...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#55 2014-03-11 06:37:25

joetemp
Member
Registered: 2013-12-16
Posts: 73

Re: [solved] apache 2.4 doesn't work with php package

teh_jazzman wrote:

The new configuration by default uses an event based Multi Processing Module. As long as PHP isn't compiled threadsave, you can switch to the prefork MPM, which doesn't use threads.

In your httpd.conf find the line that loads the event MPM:

LoadModule mpm_event_module modules/mod_mpm_event.so

Replace it with one that loads the prefork MPM:

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

Of course you still need to load the PHP5 module (libphp5.so) and the corresponding config file somewhere.

Is it weird this didn't work for me? I didn't have this in my httpd.conf:

LoadModule mpm_event_module modules/mod_mpm_event.so

I keep getting this:

Syntax error on line 59 of /etc/httpd/conf/httpd.conf

Anyone else know something I can try?

Last edited by joetemp (2014-03-11 06:40:50)

Offline

#56 2014-03-11 06:39:47

robin67
Member
From: the Netherlands
Registered: 2012-02-18
Posts: 45

Re: [solved] apache 2.4 doesn't work with php package

kayaman wrote:

Hello,


Apache is now running. Still only shows Directories instead of index.php. Explicitly running index.php is working.

PhpMyAdmin shows blank page but the icon is displayed.

Mediawiki says: File not found.

I added to http.conf:

ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/srv/http/$1
ProxyPassMatch ^/phpmyadmin/(.*\.php)$ fcgi://127.0.0.1:9000/usr/share/webapps/phpMyAdmin/$1
ProxyPassMatch ^/phpmyadmin(.*/)$ fcgi://127.0.0.1:9000/usr/share/webapps/phpMyAdmin$1index.php

ProxyPassMatch ^/wiki/(.*\.php)$ fcgi://127.0.0.1:9000/usr/share/webapps/wiki/$1
ProxyPassMatch ^/wiki(.*/)$ fcgi://127.0.0.1:9000/usr/share/webapps/wiki$1index.php

and included File:
Alias /wiki "/usr/share/webapps/wiki"
<Directory "/usr/share/webapps/wiki">
    AllowOverride All
    Options FollowSymlinks
    Require all granted
</Directory>

still no wiki working

*edit:
Reverted to apache 2.2 and php-apache 5.5.8-1 hmm

Just change the order of your ProxyPassMatch statements. It will not look at the other rules when a ProxyPassMatch has been hit.
So try this (put /(.*\.php(/.*)?)$ last):


ProxyPassMatch ^/phpmyadmin/(.*\.php)$ fcgi://127.0.0.1:9000/usr/share/webapps/phpMyAdmin/$1
ProxyPassMatch ^/phpmyadmin(.*/)$ fcgi://127.0.0.1:9000/usr/share/webapps/phpMyAdmin$1index.php
ProxyPassMatch ^/wiki/(.*\.php)$ fcgi://127.0.0.1:9000/usr/share/webapps/wiki/$1
ProxyPassMatch ^/wiki(.*/)$ fcgi://127.0.0.1:9000/usr/share/webapps/wiki$1index.php
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/srv/http/$1

Offline

#57 2014-03-11 09:00:55

gangely
Member
Registered: 2014-03-11
Posts: 3

Re: [solved] apache 2.4 doesn't work with php package

teh_jazzman wrote:

The new configuration by default uses an event based Multi Processing Module. As long as PHP isn't compiled threadsave, you can switch to the prefork MPM, which doesn't use threads.

In your httpd.conf find the line that loads the event MPM:

LoadModule mpm_event_module modules/mod_mpm_event.so

Replace it with one that loads the prefork MPM:

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

Of course you still need to load the PHP5 module (libphp5.so) and the corresponding config file somewhere.

Thanks, this worked for me :-)

Offline

#58 2014-03-11 09:55:54

almandin
Member
Registered: 2014-02-23
Posts: 31

Re: [solved] apache 2.4 doesn't work with php package

Hi all,

Since this apache update, i'm having some issues like everybody here.
I did teh_jazzman solution, i can now use php as before (still showing dirs and not index.php but it works fine),
But i'm still having problems using phpmyadmin : 503 error

i put in httpd.conf
ProxyPassMatch ^/phpmyadmin/(.*\.php)$ fcgi://127.0.0.1:9000/usr/share/webapps/phpMyAdmin/$1
ProxyPassMatch ^/phpmyadmin(.*/)$ fcgi://127.0.0.1:9000/usr/share/webapps/phpMyAdmin$1index.php

But still not working.
I'm not an experimented user, and sorry for my bad english (i guess)
I should have missed something ? I don't want to use particular aliases or anything weird, i just would do a basic use of phpmyadmin !

anyway thanks for all the job you do for the community smile

Offline

#59 2014-03-11 21:09:06

joetemp
Member
Registered: 2013-12-16
Posts: 73

Re: [solved] apache 2.4 doesn't work with php package

Solved! @teh_jazzman's suggestion worked perfectly... I just needed to merge httpd.conf with httpd.conf.pacnew first!

Offline

#60 2014-03-11 23:15:49

progandy
Member
Registered: 2012-05-17
Posts: 5,209

Re: [solved] apache 2.4 doesn't work with php package

almandin wrote:

But still not working.
I'm not an experimented user, and sorry for my bad english (i guess)
I should have missed something ? I don't want to use particular aliases or anything weird, i just would do a basic use of phpmyadmin !

All relevant wiki articles should be up to date again.
https://wiki.archlinux.org/index.php/LAMP#PHP
https://wiki.archlinux.org/index.php/Phpmyadmin


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#61 2014-03-12 08:02:18

almandin
Member
Registered: 2014-02-23
Posts: 31

Re: [solved] apache 2.4 doesn't work with php package

I'm sorry, but i did again all the configuration work from the wiki (which is up to date obviously), and still get a 503 error.

My httpd-phpmyadmin.conf looks like :

Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"
<Directory "/usr/share/webapps/phpMyAdmin">
   
    AllowOverride All
    Options FollowSymlinks
    Order allow,deny
    Allow from all
    php_admin_value open_basedir "/srv/:/tmp/:/usr/share/webapps/:/etc/webapps:/usr/share/pear/"
</Directory>

I'm just wondering something : i actually see that my pages using my database doesn't work (device not found) as if mysqld doesn't work, but in fact it's just phpmyadmin that does not work no ?
so why can't i just use my database, without phpmyadmin which is just an interface for the database ?

Offline

#62 2014-03-12 09:19:20

progandy
Member
Registered: 2012-05-17
Posts: 5,209

Re: [solved] apache 2.4 doesn't work with php package

    Order allow,deny
    Allow from all

should be

Require all granted

php_admin_value only works if you are using the php-apache package. In other cases, add /etc/webapps in the php.ini
But that is all in the wiki...

PS: You might also have some luck with this if you use php-fpm:

SetEnv PHP_ADMIN_VALUE "open_basedir=\"/srv/http/:/tmp/:...\""

Last edited by progandy (2014-03-12 09:21:02)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#63 2014-03-12 11:41:51

billq
Member
Registered: 2014-03-12
Posts: 1

Re: [solved] apache 2.4 doesn't work with php package

Hello,  After system update on 3/8 my apache server will not start.  Using systemct status httpd.service -l I get the following output:

systemctl status httpd.service -l
httpd.service - Apache Web Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: failed (Result: exit-code) since Tue 2014-03-11 14:51:41 EDT; 16h ago
  Process: 260 ExecStart=/usr/bin/apachectl start (code=exited, status=1/FAILURE)

Mar 11 14:51:38 JProgramming systemd[1]: Starting Apache Web Server...
Mar 11 14:51:41 JProgramming apachectl[260]: httpd: Syntax error on line 59 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_authn_default.so into server: /etc/httpd/modules/mod_authn_default.so: cannot open shared object file: No such file or directory
Mar 11 14:51:41 JProgramming systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 11 14:51:41 JProgramming systemd[1]: Failed to start Apache Web Server.
Mar 11 14:51:41 JProgramming systemd[1]: Unit httpd.service entered failed state.


I have read another post in the forum where the user had issues with apache after the update but the symptoms were not quite the same.  My version of apache is 2.4.7

thanks for any help to get me started
bill

Offline

#64 2014-03-12 11:42:28

almandin
Member
Registered: 2014-02-23
Posts: 31

Re: [solved] apache 2.4 doesn't work with php package

I'm using php-apache, i know these config lines are from the wiki, but i tried them all, nothing  seems to solve my problem hmm
Do I have to use OR php-apache, OR php-fpm ? I had both when I have write the last message.

Offline

#65 2014-03-12 11:55:25

progandy
Member
Registered: 2012-05-17
Posts: 5,209

Re: [solved] apache 2.4 doesn't work with php package

almandin wrote:

I'm using php-apache, i know these config lines are from the wiki, but i tried them all, nothing  seems to solve my problem hmm
Do I have to use OR php-apache, OR php-fpm ? I had both when I have write the last message.

You can have both installed, but I suggest you have only one set of instructions in httpd.conf. Either load libphp5 or use ProxyPass, but not both.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#66 2014-03-12 12:03:48

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: [solved] apache 2.4 doesn't work with php package

You will need to merge the .pacnew files.  There are various threads already on the Apache upgrade and how to handle .pacnew files is well documented.  mod_authn_default.so no longer exists.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#67 2014-03-12 12:59:43

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: [solved] apache 2.4 doesn't work with php package

almandin wrote:

...
so why can't i just use my database, without phpmyadmin which is just an interface for the database ?

You can. I don't ever install PHPMyAdmin. Just use MySQLWorkbench (in the AUR) if you want a GUI, or run from the command line:

mysql -h <host> -u <userID> -p // Read about any options you want.

Matt

"It is very difficult to educate the educated."

Offline

#68 2014-03-12 15:22:04

almandin
Member
Registered: 2014-02-23
Posts: 31

Re: [solved] apache 2.4 doesn't work with php package

Thx mrunion,

I finally solve my problem using php-fpm, i can't use php-apache in my laptop, i don't know why but for me it does not matter, it now works, thx for your help.

Offline

#69 2014-03-12 16:16:50

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved] apache 2.4 doesn't work with php package

Please search before posting. Merging with the mega-thread...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#70 2014-03-13 18:40:10

Hugao
Member
From: Portugal
Registered: 2014-02-25
Posts: 27
Website

Re: [solved] apache 2.4 doesn't work with php package

I every one,

A few days ago, when Apache was updated to 2.4 in the official repository I installed that update, but now when I start Apache with systemctl it gives an error and won't start. The error occurs when Apache starts loading the next modules:


LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule disk_cache_module modules/mod_disk_cache.so

When I comment those lines it gives the next error

systemctl status for Apache

httpd.service - Apache Web Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
   Active: failed (Result: exit-code) since Qui 2014-03-13 18:37:11 WET; 1s ago
  Process: 3109 ExecStart=/usr/bin/apachectl start (code=exited, status=1/FAILURE)

Mar 13 18:37:11 hugo-arch apachectl[3109]: AH00534: httpd: Configuration error: No MPM loaded.
Mar 13 18:37:11 hugo-arch systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 13 18:37:11 hugo-arch systemd[1]: Failed to start Apache Web Server.
Mar 13 18:37:11 hugo-arch systemd[1]: Unit httpd.service entered failed state.


Can anyone help me?

Thanks in advance,
Hugo

Offline

#71 2014-03-13 20:13:33

kermana
Member
Registered: 2009-04-13
Posts: 60

Re: [solved] apache 2.4 doesn't work with php package

Hugao wrote:

Mar 13 18:37:11 hugo-arch apachectl[3109]: AH00534: httpd: Configuration error: No MPM loaded.

Try adding the following:

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

Also you might want to skim over this link too for other syntax changes and whatnot ...
https://httpd.apache.org/docs/2.4/upgrading.html

If it still doesn't work you might want to start with a new clean httpd.conf and move your old changes to the new one.

Last edited by kermana (2014-03-13 20:19:09)

Offline

#72 2014-03-13 20:20:48

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved] apache 2.4 doesn't work with php package

Please search before posting.

Merging with the mega-thread...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#73 2014-03-13 21:51:38

Hugao
Member
From: Portugal
Registered: 2014-02-25
Posts: 27
Website

Re: [solved] apache 2.4 doesn't work with php package

Problem solved wink thanks kermana

Sorry jasonwryan

Offline

#74 2014-03-14 01:16:58

Davini
Member
Registered: 2010-04-29
Posts: 43

Re: [solved] apache 2.4 doesn't work with php package

This worked for me. I am using a pretty much "basic" install of apache.

loafer wrote:

You will need to merge the .pacnew files.  There are various threads already on the Apache upgrade and how to handle .pacnew files is well documented.  mod_authn_default.so no longer exists.

Thanks.

Offline

#75 2014-03-14 20:51:56

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

Re: [solved] apache 2.4 doesn't work with php package

i had a problem i couldnt overcome after i tried the prefork method, which was the only way i could get httpd restarted. 

file not found

  after this, i had to resort to the wiki, which it was great to see it was updated with 2.4 info there.  i just followed this https://wiki.archlinux.org/index.php/Ap … xy_handler and it got me on my way.  i had to install mod_proxy_handler , follow the wikis suggestions on config adjustments, then comment out the ProxyPass lines recommended in this thread.  after restarting php-fpm and httpd after this, my pages are now loading.

note, i wasnt getting the 'file not found' error for my phpmyadmin installation oddly enough, but then again i have the entries added to open_basedir for that.  so i assume thats part of the reason that worked.  but for both my /srv/http and home dir sites, i was getting a blank white page with a notice of 'file not found', as mentioned above. 

finally, things back on track.  seems this notice should go on arch news as well, to prepare users to have to fix their broken apache php installations, or does custom stuff like this which doesn't affect all users just go elsewhere?

EDIT: after reboot my phpmyadmin was forbidding, doh...  so i found that on my conf file /etc/httpd/conf/extra/httpd-phpmyadmin.conf it had the old symtax for directory permission, needed to upgrade that to per the wiki, and all is well.

Require all granted

Last edited by wolfdogg (2014-03-14 21:22:04)


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

Board footer

Powered by FluxBB