Help - Search - Members - Calendar
Full Version: recompile php on FreeBSD plesk box
The Planet Forums > Control Panels > Plesk
Anonymous
Does anyone know how to compile or rather recompile php on a freebsd plesk box with out breaking some feature in plesk ?

I have recompiled php, but have broke several things. Its a good thing I made a backup and was able to back out of my upgrade.

If anyone has done this sucessfully please post me and im sure a lot of other people as well a line by line example of everything you'd done to do this without error. I'm only trying to add mcrypt and curl support to php so that clientexec will run on the danged box. Plesk support seems to be worthless on this matter as the company will not respond to my emails, or my posts on thier forums. This is starting to make me consider Cpanel for all my servers as plesk seems to have some mysterious crap.

Thanks.
mmontgomery
Even though I'm on a linux machine now, you 'should' be able to recompile php with the settings plesk has by default, and add your features, without breaking plesk... although this is definitely untested, as you've found out:

CODE
[root@plesklinux root]# php -i | grep configure

<tr><td class="e">Configure Command </td><td class="v"> './configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db4=/usr' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal''--enable-force-cgi-redirect' </td></tr>

[root@plesklinux root]#  


You should be able to run that on your bsd machine, and see how php was compiled. Plesk keeps its own version of php for the admin interface, so you shouldn't break that with the install.

running the normal:
CODE
./configure "with above options plus yours"

make && make install


It 'may' not destroy your current setup, although I do wonder about your libphp4.so that apache uses, as I don't see the apxs option for the php configure...which is odd.... Please take this as experimental.
WebHostingNeeds
I am recompiling PHP on a Plesk server because i want to enable GD2.

I have done this,

./configure [options from existing phpinfo]

I am getting the error

QUOTE
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS...

Sorry, I cannot run apxs.  Possible reasons follow:

1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)

The output of /usr/sbin/apxs follows:
./configure: line 5375: /usr/sbin/apxs: No such file or directory
configure: error: Aborting


How do i correct this problem ?

Do i need to recompile Apache ? Apache version is 2.

If i need to recompile Apache, what configure options i have to use, so that it won't break plesk ?

Regards,

Yujin
DaMightyWhightyMan
remember that when dealing with plesk, they put all the binaries/confgies in /usr/local/psa (in most cases) so when compiling php you have to tell it where everything is at in apxs's case it's in /usr/local/psa/apache/bin/apxs

hope this helps.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.