Apache 2.4, mod_php5 and php5_extensions from latest ports
frank2 at fjl.co.uk
Thu Aug 28 13:34:03 UTC 2014
Can anyone give me the runes needed to get the latest versions of PHP 5
and Apache 2.4 to work together using the latest ports snapshot?
The problem comes with the php5_extensions. I've got Apache up and
running, with the www/mod_php5 port working but when I compile and
install lang/php5-extensions (or any of its components), Apache barfs on
start-up. I'm not a PHP person so I'm a bit out of my depth here.
First off, it couldn't find any of the extensions because it was looking in:
The extensions installed in the same directory, but without the -zts
tag, so I put in a symbolic link (wishful thinking!). Now it's finding
them but each module produces either one or other of the warnings below:
PHP Warning: PHP Startup: ctype: Unable to initialize module\nModule
compiled with build ID=API20100525,NTS\nPHP compiled with build
ID=API20100525,TS\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
/usr/local/lib/php/20100525-zts/dom.so: Undefined symbol
"executor_globals" in Unknown on line 0
As I said, I'm not a PHP person, but it looks obvious to me that the
extension ports are out-of-sync with something (Apache 2.4 perhaps?)
and/or I need to compile them in a special way to get the build numbers
Can any PHP people out there point me in the right direction, as all I
have left to try are random tweaks?
NB. I compiled PHP5 before compiling the Apache module, in case it
matters. In httpd.conf the line:
LoadModule php5_module libexec/apache24/libphp5.so
Is where it's loading (I assume). I didn't put it there. As I said, PHP
is active in Apache, it's just the PHP extension modules that won't
load. There are no config files for mod_php (or anything else) in
modules.d. The PHP documentation page only seems to cover 2.0 and 2.2.
More information about the freebsd-questions