PDA

View Full Version : recompile PHP with GD


juanchi
Wed 28th Jul '04, 11:48pm
I now this question has been ask many times and I think I found each of the post related to this thread and neither of the threads answer my question, by the way I'm a newbie.

I have a virtual server which is runing php 4.2.2, I know that the first recomendation will be to upgrade to 4.3.1 which have GD enable, but I don't want to do that, I installed GD 2.08.28 version to the default directorys but my phpinfo is showing that I'm running version 1.6 and my guess will be that php is not looking at the directory where GD latest version is installed, here is my php configure command:


'./configure' '--host=i686-pc-linux-gnu' '--build=i686-pc-linux-gnu' '--target=i386-redhat-linux' '--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-db3' '--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-gdbm' '--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-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' '--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-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2=/usr/sbin/apxs'


And heres comes my newbie question if I recompile php to set GD to look for the lates version at the directory where it is installed do I need to recompile with all the comands above or just recompile with the change that will affect GD only. If I only recompile php with the GD option will this damage my php installation, can someone please explain this to me.

will this be te command I need to run to recompile php with GD correct directory:
./configure --with-gd=/path/to/where/I/installed/gd'

decostop
Thu 29th Jul '04, 12:02am
actually...the first recommendation would be to upgrade to php 4.3.8 :)

You need to compile with all options you want, not just what you want to add.

juanchi
Fri 30th Jul '04, 12:10am
actually...the first recommendation would be to upgrade to php 4.3.8 :)

You need to compile with all options you want, not just what you want to add.

Thanks man for your advise but I tried to upgrade to php 4.3.8 and used all options from my previous installation but I run into this error, maybe it have something to do with the fact that I'm running apache 2.0.40:


Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
checking for member fd in BUFF *... no
checking for mod_charset compatibility option... no
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... apxs:Error: Invalid query string `APU_BINDIR'.
apxs:Error: Invalid query string `APR_BINDIR'.
./configure: line 1: /apu-config: No such file or directory
./configure: line 1: /apr-config: No such file or directory
configure: error: Please note that Apache version >= 2.0.44 is required.



I don't know if someone can clarify this to me, if I'm using a virtual dedicated server it doesn't mean that I can use source to recompile php that was install by defaul(4.2.2) on my server, right? Cause I'm looking at /usr/local/src/ and there is no files or shoul I look somewhere else, will i also need to install apache again on my virtual server? This is becoming a total mess :(

Loon
Fri 30th Jul '04, 7:12am
Looks quite simple:

I'm running apache 2.0.40



And the last line of the error you posted:

Please note that Apache version >= 2.0.44 is required

Zachery
Fri 30th Jul '04, 7:54am
Apache 2.0.49 is the latest IIRC.

Scott MacVicar
Fri 30th Jul '04, 8:00am
2.0.50 now :p