webserver - PHP ignores an invalid php.ini on the production server, but PHP refuses to work completely with the same INI on a Vagrant machine -


i have stupid problem driving me nuts @ moment.

our web apps pretty small run them on shared hosting environment. therefore don't have lot of possibilities change server configuration. thing can edit php.ini used our domain. configuration of else out of reach.

that's why wanted set local vagrant server close production server possible installing same php version (almost! in vagrant php 5.4.43, production server runs php 5.4.16) , using same php.ini used online.

both servers running apache 2.4 , php via fastcgi using php-fpm.

however, when try start php-fpm in vagrant machine php.ini have downloaded administration panel of our hosting provider, exits fatal errors because of directives in given php.ini deprecated , have been removed. made me wonder why same php.ini refuses work in vagrant, works online without problem.

as phpinfo() on production server tells me, downloaded ini file php.ini being loaded. however, file seems ignored , instead default values applied.

so figure particular ini file hangover ancient times of our production server, , invalid on production server on vagrant machine - error handling different! production server handles error gracefully, ignoring invalid ini file silently, vagrant machine refuses work.

ignoring invalid ini file no solution root of problem, curiosity struck me. thought should easy, after googling while, still stuck. how , can configure php-fpm ignore invalid ini files, instead of exiting fatal error?

so, have been talking our hoster's support team in past days , got answer how achieved behavior.

the answer simple , @ same time frustrating: running customized build of php. patched php's error handling ignore ini errors instead of throwing fatal error , compiled php themselves.

consequently no standard php behavior , quite time-consuming implement oneself. not worth work purpose.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -