Handle PHP extensions

Mitch

Verified User
Joined
Apr 16, 2013
Messages
75
Hi,

I want to install the php intl extension.
I'm used to install things by yum but directadmin has hes own install by default.

Now there are 2 options:
- switch the php to the centos php
- install the intl extension on the directadmin way (but how?)


System= CentOS release 6.3 (Final)

Somebody some advice?

Thnx.
 
I tried to install custom2.0 but getting the next error

Code:
sbin/service httpd start
Starting httpd: httpd: Syntax error on line 37 of /etc/httpd/conf/httpd.conf: Syntax error on line 3 of /etc/httpd/conf/extra/httpd-phpmodules.conf: Cannot load /usr/lib/apache/mod_mpm_prefork.so into server: /usr/lib/apache/mod_mpm_prefork.so: cannot open shared object file: No such file or directory

Could you help me out?
what did I miss?
 
I tried to install custom2.0 but getting the next error

Code:
sbin/service httpd start
Starting httpd: httpd: Syntax error on line 37 of /etc/httpd/conf/httpd.conf: Syntax error on line 3 of /etc/httpd/conf/extra/httpd-phpmodules.conf: Cannot load /usr/lib/apache/mod_mpm_prefork.so into server: /usr/lib/apache/mod_mpm_prefork.so: cannot open shared object file: No such file or directory

Could you help me out?
what did I miss?

You need to follow FAQ. To upgrade to CB 2.0 you need to rebuild both apache and PHP and then run "./build rewrite_confs".
 
And how do I return my old build? (all sites are down now xD)
 
[root@server custombuild]# ./build rewrite_confs
rm: cannot remove `/usr/local/directadmin/custombuild/php-5.5.0alpha6': Is a directory
Using **.**.**.** for your server IP
Restarting apache.
Stopping httpd: [FAILED]
Starting httpd: httpd: Syntax error on line 37 of /etc/httpd/conf/httpd.conf: Syntax error on line 3 of /etc/httpd/conf/extra/httpd-phpmodules.conf: Cannot load /usr/lib/apache/mod_mpm_prefork.so into server: /usr/lib/apache/mod_mpm_prefork.so: cannot open shared object file: No such file or directory

rm: cannot remove `/usr/local/directadmin/custombuild/php-5.5.0alpha6': Is a directory
 
I do not understand why you do not follow FAQ. Please run (that's from FAQ):
Code:
cd /usr/local/directadmin/custombuild
./build update
./build apache
./build php n
./build rewrite_confs
 
What do you mean by not following it?
I did what the F.A.Q said, I did what you said but I still getting that error.

I tried to do a rebuild all './build all d'

Now if i'm tryingt to start I get this error...

Code:
/sbin/service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 39 of /etc/httpd/conf/httpd.conf: Syntax error on line 4 of /etc/httpd/conf/extra/httpd-phpmodules.conf: Cannot load /usr/lib/apache/libphp5.so into server: /usr/lib/apache/libphp5.so: undefined symbol: unixd_config
 
What do you mean by not following it?
I did what the F.A.Q said, I did what you said but I still getting that error.

I tried to do a rebuild all './build all d'

Now if i'm tryingt to start I get this error...

Code:
/sbin/service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 39 of /etc/httpd/conf/httpd.conf: Syntax error on line 4 of /etc/httpd/conf/extra/httpd-phpmodules.conf: Cannot load /usr/lib/apache/libphp5.so into server: /usr/lib/apache/libphp5.so: undefined symbol: unixd_config

This is a different error now (which means you reinstalled apache, but not PHP). Please post the output of:
Code:
httpd -v
php -v
/usr/local/directadmin/custombuild/build | grep Version | awk '{print $3}'
 
Code:
[root@server custombuild]# httpd -v
Server version: Apache/2.4.4 (Unix)
Server built:   May  5 2013 22:31:43
[root@server custombuild]# php -v
PHP Warning:  PHP Startup: apc: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20121212
These options need to match
 in Unknown on line 0
PHP 5.5.0alpha6 (cli) (built: May  5 2013 20:20:49) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0-dev, Copyright (c) 1998-2013 Zend Technologies
[root@server custombuild]# /usr/local/directadmin/custombuild/build | grep Version | awk '{print $3}'
rm: cannot remove `/usr/local/directadmin/custombuild/php-5.5.0alpha6': Is a directory
2.0.0-RC3
[root@server custombuild]#

Code:
[root@server custombuild]# ./build used_configs
rm: cannot remove `/usr/local/directadmin/custombuild/php-5.5.0alpha6': Is a directory
Apache configuration file: /usr/local/directadmin/custombuild/configure/ap2/configure.apache
PHP (default) configuration file: /usr/local/directadmin/custombuild/configure/ap2/configure.php55
PureFTPD configuration file: /usr/local/directadmin/custombuild/configure/pureftpd/configure.pureftpd
Dovecot configuration file: /usr/local/directadmin/custombuild/configure/dovecot/configure.dovecot
rm: cannot remove `/usr/local/directadmin/custombuild/php-5.5.0alpha6': Is a directory

I'm also getting the whole time this message, but what is it?
Code:
rm: cannot remove `/usr/local/directadmin/custombuild/php-5.5.0alpha6': Is a directory
 
[root@server custombuild]# httpd -v
Server version: Apache/2.4.4 (Unix)
Server built: May 5 2013 22:31:43

[root@server custombuild]# php -v
PHP 5.5.0alpha6 (cli) (built: May 5 2013 20:20:49)

Like I told you, you have not followed the FAQ, PHP is built earlier than Apache. It should be later than May 5 2013 22:31:43 (the time apache was installed). To fix the warning about the directory:
Code:
rm -rf /usr/local/directadmin/custombuild/php-5.5.0alpha6

Please disable apc extention in /usr/local/lib/php.ini to hide PHP warnings (you will need to rebuild apc later). And do:
Code:
cd /usr/local/directadmin/custombuild
./build php n

That should fix your problems. Good luck! :)
 
alright thnx, that is fixed.
But now I have php 5.5.0aplha6 O.O

I want to set the version to 5.4
so I tried:

http://forum.directadmin.com/showthread.php?t=43032

Code:
cd /usr/local/directadmin/custombuild
./build update
./build set php5_ver 5.4
./build php n

after finishing I say:
Code:
php -v
result:
Code:
[root@server custombuild]# php -v
PHP Warning:  PHP Startup: apc: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20121212
These options need to match
 in Unknown on line 0
PHP 5.5.0alpha6 (cli) (built: May  6 2013 00:16:59) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0-dev, Copyright (c) 1998-2013 Zend Technologies
 
Alright, but i'm back to custombuild 1.0. Because I dont have a clue what all happend with 2.0, so first I have to read that stuff. Still trying to enable the intl extension.

What I do:

Code:
cd /usr/local/directadmin/custombuild
mkdir -p custom/ap2
cp -fp configure/ap2/configure.php5 custom/ap2/configure.php5 --enable-intl

Getting the next error:
Code:
-bash: --enable-intl: command not found

First time doing this and I think the doc is unclear to me. Would be handy if the use "examples". Like one example to install one extenion, a example to use multiple extensions etc.
 
You need to add:
Code:
--enable-intl

To the file custom/ap2/configure.php5. Then "./build php n" needs to be run.

It is also documented here: http://help.directadmin.com/item.php?id=252.

Thank you.

I know its documeted there becuase I copyed what they said. (I wanted to add it to my post but I cant edit it :s lame).

I still dont have a clue what to do..

while i'm typing I tried something, its called EDITING a file.. the help item doesn't says that I must editing it..
now the document makes more sence.. Where to blame the documents?

Anyway thanks smtalk for the help, step by step I will learn directadmin =)
 
Back
Top