Re: PHP/apache issue after update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I posted a reply four days ago.
https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx/thread/LHUCQDLCFP5NK6AQSPNSCOGKRYGKKTID/
Did you try it?

Use mpm_event and php-fpm and .user.ini.

Bill

On 1/25/2018 10:44 AM, Emmett Culley wrote:
On 01/24/2018 05:14 PM, Rick Stevens wrote:
On 01/24/2018 03:09 PM, Emmett Culley wrote:
After a recent upgrade some development web sites served from my workstation stopped working.  I've narrowed it down to the php_value auto_prepend_file directive not working.

This is in the /etc/httpd/conf.d/csite.conf file:

<Directory /var/dev/csite>
    Require all granted
    AllowOverride none
    php_value error_log /var/dev/logs/caiet_error_log
    php_value auto_prepend_file /var/dev/csite/site/host-map.inc
</Directory>

The file /var/dev/csite/site/host-map.inc does not get loaded and this causes a 500 error.   I've tried configuring apache as MPM = "prefork" (the new default seems to be "event"), but that made no difference.

Note that all five other sites that use the auto_prepend_file directive no longer work either.  All other development sites on my workstation work as expected.

Any ideas where to look further would be appreciated.  Fedora 27 is fully up to date.
Check your selinux logs (or use sealert). Odds are that selinux is
blocking access to /var/dev/csite/site since it's not part of the
standard /var/www/* paths that Apache is permitted to access (unless you
labeled the /var/dev/csite stuff with "httpd_sys_content_t" or you've
disabled selinux or put it in permissive mode).

Note that using PHP as a module in Apache using anything other than
the prefork MPM isn't a good idea. The "event" or "worker" MPMs put
Apache in multithreaded mode (generally a good thing), and while PHP
itself is multithread-safe, MANY of the libraries that PHP uses are not.

For event or worker MPMs, you should change over to php-fpm where PHP
runs as a separate process rather than as part of Apache. Apache talks
to it via either a local TCP port (typically 127.0.0.1:9000) or
a Unix-domain socket. You will need to modify your Apache configs
appropriately to use php-fpm, but the speed increase and decreased
load on your machine would be a benefit.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
Thanks for the response.  Selinux is disabled and I've set MPM to prefork, and still, the php_value directives are ignored.

I've tried putting the directives in the .htaccess file and setting AllowOverride to all, and still the php directives are ignores.  And yet all of the PHP sites that do not need those directives work just fine.

Note that if I misspell a PHP directive apache fails to start as you would expect.  So, I know the directives are getting read.  They are just ignored.

I'll try putting the directive in the php.ini file to see if it still ignored.  Of course that wouldn't work long term as each site needs that directive to be specific to that site.

So, when will PHP be multithread safe?  Is there a list of libraries or methods that are not multithread capable?

Emmett
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux