You are not logged in.

#26 2014-03-07 14:31:02

Potomac
Member
Registered: 2011-12-25
Posts: 526

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

thanks robin67,

now with your settings I can run phpmyadmin

but it's not perfect, because the display of phpmyadmin is corrupted in firefox, the left panel ( for selecting database ) is unreadable :

83dbebdda56ee51ee73585cfe3bc9777aee10219.jpg

Offline

#27 2014-03-07 14:32:05

beardedlinuxgeek
Member
Registered: 2012-09-17
Posts: 32
Website

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

robin67 wrote:

My /etc/httpd/conf/extra/httpd-phpmyadmin.conf now looks like

        Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"

        <Directory "/usr/share/webapps/phpMyAdmin">
        DirectoryIndex index.php
                AllowOverride All
                Options FollowSymlinks
        </Directory>

With this I can use phpmyadmin as always by going to http://myserver/phpmyadmin

They also changed the access rule syntax, so make sure you use
"Require all granted"
and not
"Order allow,deny"
"Allow from all"

Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"
<Directory "/usr/share/webapps/phpMyAdmin">
    AllowOverride All
    Options FollowSymlinks
    Require all granted
</Directory>

Offline

#28 2014-03-07 14:37:34

Potomac
Member
Registered: 2011-12-25
Posts: 526

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

thanks beardedlinuxgeek, now the display of phpmyadmin in firefox is correct with firefox,

the only problem is the "userdir" option in apache, with php-fpm package I can't run php script files who are located in my user directory ( ~/public_html ),

I add this line in httpd.conf :

ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/home/potomac/public_html/$1

but it doesn't solve the problem

Offline

#29 2014-03-07 14:48:43

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

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

timosa wrote:

Solved my post-upgrade problems too, even if some extra configuration is needed under your self-made conf/extra/*.conf files. The following link helped:

https://httpd.apache.org/docs/trunk/upgrading.html

Many modules, that were included in 2.2 are commented out in httpd.conf of 2.4 for some reason.

Hi, I think you hit the 'report' link, not the 'reply' link -- just in case you were wondering what happened to your post smile


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#30 2014-03-07 15:03:39

c4software
Member
Registered: 2011-05-10
Posts: 9

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 its solved the problem for me too smile

Offline

#31 2014-03-07 15:20:06

allencch
Member
Registered: 2011-03-25
Posts: 118

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.

Thank you. I tried again by re-install apache so that have a new httpd.conf file. Now it works fine as before, including userdir and phpmyadmin.

Offline

#32 2014-03-07 21:22:32

gadelat
Member
Registered: 2013-03-11
Posts: 49

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

Potomac wrote:

thanks robin67,

now with your settings I can run phpmyadmin

but it's not perfect, because the display of phpmyadmin is corrupted in firefox, the left panel ( for selecting database ) is unreadable :

http://hfr-rehost.dev.syn.fr/self/83dbe … e10219.jpg

I have same problem, how did you solve it?

edit: got it, needed to put Include conf/extra/httpd-phpmyadmin.conf in httpd.conf

Last edited by gadelat (2014-03-07 21:44:33)

Offline

#33 2014-03-07 21:36:24

jilda
Member
Registered: 2014-03-07
Posts: 6

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

allencch wrote:
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.

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

same here

Offline

#34 2014-03-07 22:05:14

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,783
Website

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

Then you probably missed something when merging your .pacnew. Post your config?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#35 2014-03-08 00:11:49

Zygote
Member
Registered: 2013-01-15
Posts: 77

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

jilda wrote:
allencch wrote:
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.

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:

Order allow,deny
Allow from all

you should now use this instead.

Require all granted

Last edited by Zygote (2014-03-08 00:24:20)

Offline

#36 2014-03-08 14:23:26

jilda
Member
Registered: 2014-03-07
Posts: 6

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

I added this line on the end of my /etc/httpd/conf/httpd.conf

# phpMyAdmin configuration
Include conf/extra/httpd-phpmyadmin.conf

..and I created new httpd-phpmyadmin.conf which contains

Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"

<Directory "/usr/share/webapps/phpMyAdmin">
	AllowOverride All
	Options FollowSymlinks
	Require all granted
</Directory>

I also executed chown and chmod (but that didn't help either)

chown john:users /usr/share/webapps/phpMyAdmin -R
chmod 755 /usr/share/webapps/phpMyAdmin -R

1st edit: I just found out that when I access localhost/phpmyadmin/index.php it kinda works, I see the source code, that means I didnt enable php somewhere, probably in httpd.conf, I will look into that.
2nd edit: Now I added the required includes

 LoadModule php5_module modules/libphp5.so
Include conf/extra/php5_module.conf 

but now I am getting

 Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.

after httpd restart.
So I need the threaded PHP I guess.
edit 3: I just realized the same thing happened to the guy who started this thread. Recursion much?

Last edited by jilda (2014-03-08 15:03:10)

Offline

#37 2014-03-08 16:46:43

adrianx
Member
From: South Africa
Registered: 2010-03-22
Posts: 70

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

I just want to note that the following line interferes with phpmyadmin
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/srv/http/$1

I use:
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

... in /etc/httpd/conf/httpd.conf

It works for me, because the only thing that I use Apache for, is phpMyAdmin.

Last edited by adrianx (2014-03-08 16:57:24)

Offline

#38 2014-03-08 18:48:26

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

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

I mode a module which allows you to use a proxy with SetHandler. That should make the configuration much easier.
The essential code is taken from the patch in the apache trunk: http://svn.apache.org/viewvc?view=revis … on=1573626
https://gist.github.com/progandy/6ed4eeea60f6277c3e39

Edit: AUR package: https://aur.archlinux.org/packages/mod_proxy_handler/

Last edited by progandy (2014-03-08 23:35:07)


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

Offline

#39 2014-03-08 19:40:45

faiden
Member
Registered: 2014-03-08
Posts: 22

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

Does anyone know a good solution to get the rutorrent to work.

Last edited by faiden (2014-03-08 19:43:33)

Offline

#40 2014-03-08 19:55:52

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

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

faiden wrote:

Does anyone know a good solution to get the rutorrent to work.

At the very least you will have to explain what the errors / issues are.  I suspect this may be better in a separate thread too.


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

Offline

#41 2014-03-08 20:00:03

faiden
Member
Registered: 2014-03-08
Posts: 22

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

loafer wrote:
faiden wrote:

Does anyone know a good solution to get the rutorrent to work.

At the very least you will have to explain what the errors / issues are.  I suspect this may be better in a separate thread too.

Yes my bad, I will make a new thread.

Offline

#42 2014-03-09 14:39:23

Caspian
Member
Registered: 2007-05-22
Posts: 263

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

Apache is not working for me since the upgrade to 2.4. I'm getting the following error:

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

Suggestions?

Offline

#43 2014-03-09 14:53:26

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

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

Have you merged the .pacnew files?


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

Offline

#44 2014-03-09 16:19:31

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

#45 2014-03-09 16:46:19

viky
Member
Registered: 2014-03-07
Posts: 8

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

Hello everybody,
Today I upgraded to apache-2.4 and it's failing to start:

bře 09 17:38:08 avava systemd[1]: PID file /run/httpd/httpd.pid not readable (yet?) after start.
bře 09 17:38:09 avava systemd[1]: httpd.service never wrote its PID file. Failing.
bře 09 17:38:09 avava systemd[1]: Failed to start Apache Web Server.
bře 09 17:38:09 avava systemd[1]: Unit httpd.service entered failed state.

I tried:

 chmod /run/httpd to http
 remove /run/httpd
 specify another pidfile location in http.conf

but nothing worked. Any ideas whats wrong?
Thanks in advance.

EDIT: also changing pidfile location doesn't work
It seems that it's apache bug. All the locations are writeable and apache PidFile directive has no effect.

Last edited by viky (2014-03-09 18:25:07)

Offline

#46 2014-03-09 17:22:46

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

#47 2014-03-10 06:46:39

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

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

Systemd is unable to start Apache after the upgrade to the newest version. I just get this:

Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.

I've looked into both of these and they just tell me I have a syntax error in my httpd.conf. I tried commenting the lines out at first but it just kept giving me more and more lines with errors. After about five, I decided I shouldn't go that route. Could be dangerous.

Also, I tried downgrading the package and even that didn't work. It just gave me a different line with a new syntax error.

Apache worked fine after updating yesterday. After the update today... it doesn't work.

*I tried searching the forums as well as the web at large and found no one with this exact problem from this exact update.

As always, any pointers or downright fixes are appreciated. Thanks!

Offline

#48 2014-03-10 06:51:19

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

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

Just commenting out lines won't work. You'll have to upgrade the configuration. There should be a httpd.conf.pacnew file you can use as reference, or you can merge it.
http://httpd.apache.org/docs/2.4/upgrading.html
Edit: Take care of all files in conf/extra, too.

Last edited by progandy (2014-03-10 06:51:43)


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

Offline

#49 2014-03-10 07:04:08

Blazer78
Member
From: Cosenza
Registered: 2014-03-09
Posts: 2

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

Great job man, this worked for me! Simply solution! Tnx




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.


... è una lunga storia e più passano i giorni e più è lunga da scrivere ...
... has a long history and more days pass, the longer it is to write...

Offline

#50 2014-03-10 09:45:34

kayaman
Member
Registered: 2012-09-03
Posts: 11

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

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

Last edited by kayaman (2014-03-10 11:02:38)

Offline

Board footer

Powered by FluxBB