LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-21-2012, 05:04 AM   #16
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 631

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463

Quote:
Originally Posted by willysr View Post
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
 
Old 05-21-2012, 05:06 AM   #17
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 631

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
Quote:
Originally Posted by conraid View Post
with mod_fgci and/or php-fpm? I would like to use apxs :-)
switch the apache mpm? in what way?

UPDATE

I forgot
without mpm module, I get this error

AH00534: httpd: Configuration error: No MPM loaded.
There are notes on how to switch to different mpms in the httpd.SlackBuild. Apart from that, google is your friend.
 
Old 05-21-2012, 05:46 AM   #18
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
Quote:
Originally Posted by ppr:kut View Post
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
 
Old 05-21-2012, 05:48 AM   #19
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,090

Rep: Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173
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
 
Old 05-21-2012, 06:09 AM   #20
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 631

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
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/
 
1 members found this post helpful.
Old 05-21-2012, 06:11 AM   #21
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 631

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
Quote:
Originally Posted by willysr View Post
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
 
Old 05-21-2012, 06:13 AM   #22
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
Quote:
Originally Posted by ppr:kut View Post
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:
 
Old 05-21-2012, 06:21 AM   #23
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 631

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
Quote:
Originally Posted by willysr View Post
It's just a trivial changes, and mostly are related to old parameter and non existence docs
Ah, I see. Yeah, that's not really relevant for mariadb. Thanks anyway
 
Old 05-21-2012, 07:10 AM   #24
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by ppr:kut View Post
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've just been testing and this does indeed work and you get both mod_php and php-fpm and they both work.

FYI those who want to try the fastcgi method need only do the following :-

Code:
cp /etc/php-fpm.conf.default /etc/php-fpm.conf
start php-fpm via some method (it runs as a daemon so even rc.local should do for now)

in /etc/httpd/httpd.conf comment out (if you uncommented it, by default it's commented out)
Code:
Include /etc/httpd/mod_php.conf
and add the following line after it
Code:
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/htdocs/$1
restart apache and php scripts should now be loading via the (Server API - FPM/FastCGI)
 
1 members found this post helpful.
Old 05-21-2012, 07:15 AM   #25
conraid
Member
 
Registered: Feb 2008
Location: Leghorn, Tuscany, Italy
Distribution: Slackware
Posts: 122

Rep: Reputation: 38
Quote:
Originally Posted by ppr:kut View Post
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
[...]
I will wait
 
Old 05-21-2012, 07:25 AM   #26
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 631

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
Quote:
Originally Posted by conraid View Post
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.
 
Old 05-21-2012, 07:29 AM   #27
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by conraid View Post
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
[...]
There is no sqlite module only sqlite3 module did you update your php.ini?

EDIT beaten
 
Old 05-21-2012, 07:55 AM   #28
conraid
Member
 
Registered: Feb 2008
Location: Leghorn, Tuscany, Italy
Distribution: Slackware
Posts: 122

Rep: Reputation: 38
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'
My mistake? Possible.
 
Old 05-22-2012, 01:39 AM   #29
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,090

Rep: Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173
Quote:
Originally Posted by ppr:kut View Post
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
 
Old 05-24-2012, 03:53 AM   #30
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
Testing fixes from 2012-05-23

PHP works both php-fpm and mod_php

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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Development In 2012 php-developer Linux - Server 3 01-28-2012 12:23 PM
upgraded apache and php now php breaks on ' and special characters ckob Linux - Server 4 10-22-2007 09:28 PM
php-devel & PHP extensions EHCanadian Mandriva 0 06-23-2005 06:06 PM
Packman libusb update breaks X pilotgi SUSE / openSUSE 1 02-11-2005 05:32 PM
Update breaks several packages apolinsky SUSE / openSUSE 0 12-06-2004 01:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration