[SOLVED] PHP Update 2012-05-19 breaks extensions for apache
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
you mean INSTALL_MYSQLDATADIR and MYSQL_DATADIR ??
Yes, that's what I meant. Turns out they are only partially responsible though. The main culprit is the install layout being used. The default install layout is STANDALONE, which is what is used for tarball distribution, and hence assumes relative paths in lots of places.
A better install layout to use is RPM, which uses absolute paths instead. (specified with -DINSTALL_LAYOUT="RPM")
I already dropped Pat a mail about it. It's a simple fix, so there's hope it will appear in -current soon
Yes, that's what I meant. Turns out they are only partially responsible though. The main culprit is the install layout being used. The default install layout is STANDALONE, which is what is used for tarball distribution, and hence assumes relative paths in lots of places.
A better install layout to use is RPM, which uses absolute paths instead. (specified with -DINSTALL_LAYOUT="RPM")
I already dropped Pat a mail about it. It's a simple fix, so there's hope it will appear in -current soon
Yup, confirmed to be working now
I also have some changes in the MySQL SlackBuild besides the install layout.
I will send it and hopefully it will get merged
following wildwizard advice, to have it working here (and not using php-fpm yet) I modified the build script like this (I removed also some deprecated configure options, not related to the problem)
Code:
--- php.SlackBuild.orig 2012-05-21 07:47:35.440000008 +0200
+++ php.SlackBuild 2012-05-21 10:44:30.769000010 +0200
@@ -147,9 +147,6 @@
--datarootdir=/usr/share \
--infodir=/usr/info \
--mandir=/usr/man \
- --disable-safe-mode \
- --disable-magic-quotes \
- --enable-zend-multibyte \
--enable-mbregex \
--enable-tokenizer=shared \
--with-config-file-scan-dir=/etc/php \
@@ -208,9 +205,7 @@
--with-snmp=shared,/usr \
--enable-soap=shared \
--enable-sockets \
- --with-sqlite=shared \
--with-sqlite3=shared \
- --enable-sqlite-utf8 \
--with-regex=php \
--enable-sysvmsg \
--enable-sysvsem \
@@ -226,12 +221,6 @@
--build=$ARCH-slackware-linux
}
-# I am told this option is worse than nothing. :-)
-# --enable-safe-mode
-#
-# I would recommend *against* and will take no responbility for turning on
-# "safe" mode.
-
# Make the Apache2 module version of PHP:
php_configure \
--with-apxs2=/usr/bin/apxs
@@ -249,15 +238,6 @@
chmod 755 $PKG/usr/bin/php
chmod 755 $PKG/usr/bin/php-cgi
-# Make the php-fpm version of PHP:
-make distclean
-php_configure \
- --enable-fpm \
- --with-fpm-user=apache \
- --with-fpm-group=apache
-make $NUMJOBS || make || exit 1
-make install INSTALL_ROOT=$PKG || exit 1
-
# PHP (used to) install Pear with some strange permissions.
chmod 755 $PKG/usr/bin/pear
Well, php-fpm itself has nothing to do with the problem. I changed the script to build all sapi modules at once, and I don't see those errors.
I uploaded my script (which I sent to Pat) to my server, feel free to have a go at it: http://www.liwjatan.at/files/slackwa...kware-current/
Yup, confirmed to be working now
I also have some changes in the MySQL SlackBuild besides the install layout.
I will send it and hopefully it will get merged
Nice. Mind sharing? Perhaps they can be useful for my mariadb script as well
Nice. Mind sharing? Perhaps they can be useful for my mariadb script as well
It's just a trivial changes, and mostly are related to old parameter and non existence docs
Code:
--- mysql.SlackBuild 2012-05-21 17:13:10.636943403 +0700
+++ mysql/mysql.SlackBuild 2012-05-21 17:50:55.733153131 +0700
@@ -26,7 +26,7 @@
VERSION=${VERSION:-$(echo mysql-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -83,9 +83,10 @@
CXXFLAGS="$SLKCFLAGS -felide-constructors -fno-exceptions -fno-rtti" \
CXX=gcc \
cmake \
- -DBUILD_CONFIG=mysql_release \
+ -DCMAKE_BUILD_TYPE=Release \
-DFEATURE_SET="community" \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -DINSTALL_LAYOUT="RPM" \
-DINSTALL_LIBDIR="lib${LIBDIRSUFFIX}" \
-DINSTALL_SBINDIR=libexec \
-DINSTALL_INCLUDEDIR=include/mysql \
@@ -136,12 +137,12 @@
# Install docs
mkdir -p $PKG/usr/doc/mysql-$VERSION/Docs
cp -a \
- BUILD* COPYING* EXCEPTIONS* INSTALL-SOURCE README* VERSION \
+ BUILD* COPYING* INSTALL-SOURCE README* VERSION \
$PKG/usr/doc/mysql-$VERSION
( cd Docs
# Seems most of the Docs/* are gone, but we'll leave the cp stuff
# in case it returns.
- cp -a INFO_SRC INSTALL-BINARY *.html *.txt Flags \
+ cp -a INFO_SRC INSTALL-BINARY *.txt \
$PKG/usr/doc/mysql-$VERSION/Docs )
## Too large to justify since the .html version is right there:
#rm $PKG/usr/doc/mysql-$VERSION/Docs/manual.txt
@@ -204,10 +205,10 @@
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
-if [ -r ChangeLog ]; then
+if [ -r Docs/ChangeLog ]; then
DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
- cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
- touch -r ChangeLog $DOCSDIR/ChangeLog
+ cat Docs/ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r Docs/ChangeLog $DOCSDIR/ChangeLog
fi
# Build package:
There are notes on how to switch to different mpms in the httpd.SlackBuild. Apart from that, google is your friend.
Yes, ok. With mpm_prefork apache start, but then...
Code:
[...]
Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/sqlite.so' - /usr/lib64/php/extensions/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
[...]
Yes, ok. With mpm_prefork apache start, but then...
Code:
[...]
Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/sqlite.so' - /usr/lib64/php/extensions/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
[...]
I will wait
The sqlite extension was removed from php 5.4. Simply remove the entry for loading it from your /etc/httpd/php.ini.
This you'll have to fix by hand anyway, as the package php.ini does not overwrite your ini file.
[...]
Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/sqlite.so' - /usr/lib64/php/extensions/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
[...]
There is no sqlite module only sqlite3 module did you update your php.ini?
I'm sorry. In one test I put the old file. But every previous test was done with the default files. Now, with default file (php.ini-development)
Code:
root@blackstar:/var/log/httpd# echo '' > error_log
root@blackstar:/var/log/httpd# apachectl start
root@blackstar:/var/log/httpd# cat error_log
PHP Warning: PHP Startup: bcmath: 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: bz2: 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: calendar: 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: 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/lib64/php/extensions/curl.so' - /usr/lib64/php/extensions/curl.so: undefined symbol: file_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/dba.so' - /usr/lib64/php/extensions/dba.so: undefined symbol: executor_globals in Unknown on line 0
PHP Warning: PHP Startup: enchant: 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: exif: 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: ftp: 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: gd: 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: gettext: 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: gmp: 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/lib64/php/extensions/iconv.so' - /usr/lib64/php/extensions/iconv.so: undefined symbol: sapi_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/ldap.so' - /usr/lib64/php/extensions/ldap.so: undefined symbol: executor_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/mbstring.so' - /usr/lib64/php/extensions/mbstring.so: undefined symbol: sapi_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/mysql.so' - /usr/lib64/php/extensions/mysql.so: undefined symbol: core_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/mysqli.so' - /usr/lib64/php/extensions/mysqli.so: undefined symbol: core_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/openssl.so' - /usr/lib64/php/extensions/openssl.so: undefined symbol: file_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/pdo.so' - /usr/lib64/php/extensions/pdo.so: undefined symbol: compiler_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/pdo_mysql.so' - /usr/lib64/php/extensions/pdo_mysql.so: undefined symbol: core_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/pdo_sqlite.so' - /usr/lib64/php/extensions/pdo_sqlite.so: undefined symbol: core_globals in Unknown on line 0
PHP Warning: PHP Startup: pspell: 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: shmop: 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/lib64/php/extensions/snmp.so' - /usr/lib64/php/extensions/snmp.so: undefined symbol: executor_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/soap.so' - /usr/lib64/php/extensions/soap.so: undefined symbol: sapi_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/sqlite3.so' - /usr/lib64/php/extensions/sqlite3.so: undefined symbol: core_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/tokenizer.so' - /usr/lib64/php/extensions/tokenizer.so: undefined symbol: compiler_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/wddx.so' - /usr/lib64/php/extensions/wddx.so: undefined symbol: compiler_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/zlib.so' - /usr/lib64/php/extensions/zlib.so: undefined symbol: sapi_globals in Unknown on line 0
[Mon May 21 14:53:20.286198 2012] [mpm_prefork:notice] [pid 3031] AH00163: Apache/2.4.2 (Unix) PHP/5.4.3 configured -- resuming normal operations
[Mon May 21 14:53:20.286326 2012] [core:notice] [pid 3031] AH00094: Command line: '/usr/sbin/httpd'
Well, php-fpm itself has nothing to do with the problem. I changed the script to build all sapi modules at once, and I don't see those errors.
I uploaded my script (which I sent to Pat) to my server, feel free to have a go at it: http://www.liwjatan.at/files/slackwa...kware-current/
sorry, real bad day yesterday at work, had the possibility to test it only this morning: thanks a lot Heinz, all ok with your build and the default configuration, turning on only mod_php.conf in httpd.conf (no php-fpm).
I'll have a try later on my custom setups with lighttpd/lighttpd2 (that I'm using already with php-cgi/spawnfcgi) with php-fpm.
I tried just a little with mod_proxy_fcgid/php-fpm but I hadn't come up yet with a right conf: surely should be a great thing to have a working example in which the .php files under the DocumentRoot are served by it (hope I've haven't missed it in the docs), gotta say that googling about it has been a little bit confusing for me, and the examples in the httpd docs and wiki haven't worked here out of the box.
EDIT: just tried with wildwizard hint above (thanks a lot, and sorry that I had missed it, woken up from too little time) and php-fpm seems to work fine too.
EDIT2: a detail: I didn't even had to copy the php-fpm.conf file from the .default because it was already there (it's already done while executing the doinst.sh, if not present).
Last edited by ponce; 05-22-2012 at 03:05 AM.
Reason: added small detail
NB to use the script rc.php-fpm you need to remove the comment from the PID line 25 in php-fpm.conf
NB2 rc.php-fpm isn't called from anything yet perhaps an addition to rc.M?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.