Hmm I've been going at it for hours. Literally. I got GD 2.0.33 installed but I can't freakin` recompile PHP for the life of me. http://www.spicyoricy.com/info.php I currently have PHP 4.2.2 installed but I have 4.4.0 source code on the server and I can't ./configure it using: './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' I get multiple errors. I don't think I should should I? Is there any upgrade from 4.2.2 to 4.4 or I just want to simply RECOMPILE it so gd 2.0 works so my thumbnail picture generators work. Yes I am root.
It seems to me that the more optional stuff you try to compile in, the more chances you are going to have something go wrong with the compilation. Do you really actually *need* all that stuff? I compile PHP to include just what I need. For example, this forum runs with these config options: './configure' '--with-apxs' '--with-openssl' '--with-zlib' '--with-mysql' '--with-gd' '--with-png-dir' '--with-freetype-dir' '--with-jpeg-dir' '--with-curl' '--enable-exif' '--enable-mbstring' '--with-mcrypt' What are the errors you are getting when you try to compile 4.4? Also, many of the options you are choosing are compiled in by default anyway (for example --with-xml), so no point in specifying it unless you want to disable it (which you are not).
Okay. I tried what everyone is telling me to do but to no avail. I have PHP 4.2.2. I have zlib, gd 2.0.33, freetype, libjpeg, libpng installed independently. I got the source for 4.2.2 and I tried to ./configure using as little parameters as I can yet I still receive errors. First, I can't find my apxs directory. I do have 2.x apache installed when I look at info.php it shows --with-apxs2=/usr/sbin/apxs yet when I browse to it in SSH it doesn't show up. So apxs doesn't work next I'll try: ./configure --with-zlib --with-mysql --with-gd --with-png-dir --with-jpeg-dir (Successful) Make (Bunch of errors) ./.libs/libphp4.a(my_malloc.o)(.text+0xbd): In function `my_malloc': /home/charles/sw/php-4.2.2/ext/mysql/libmysql/my_malloc.c:24: undefined reference to `errno' ./.libs/libphp4.a(my_realloc.o)(.text+0xb4): In function `my_realloc': /home/charles/sw/php-4.2.2/ext/mysql/libmysql/my_realloc.c:44: undefined reference to `errno' ./.libs/libphp4.a(my_error.o)(.text+0x275): In function `my_error': /home/charles/sw/php-4.2.2/ext/mysql/libmysql/my_error.c:32: undefined reference to `errno' ./.libs/libphp4.a(my_lib.o)(.text+0x37a): In function `my_dir': /home/charles/sw/php-4.2.2/ext/mysql/libmysql/my_lib.c:162: undefined reference to `errno' ./.libs/libphp4.a(my_lib.o)(.text+0x546): In function `my_stat': /home/charles/sw/php-4.2.2/ext/mysql/libmysql/my_lib.c:585: undefined reference to `errno' ./.libs/libphp4.a(my_getwd.o)(.text+0xbe):/home/charles/sw/php-4.2.2/ext/mysql/libmysql/my_getwd.c:43: more undefined references to `errno' follow collect2: ld returned 1 exit status make[1]: *** Error 1 make[1]: Leaving directory `/home/charles/sw/php-4.2.2' make: *** [all-recursive] Error 1 PHP:
What I have: PHP 4.2.2, GD 1.6 or something. Goal: PHP 4.2.2, GD 2.x. Very simple yet I cannot execute this task. How should I go about doing this? Recompiling PHP has not been working for me and GD's only patch (if you don't have GD 2.x) applies to 4.2.3. Please help I'm gonna go crazy, heh.
PHP 4.4 using ./configure --with-zlib --with-mysql --with-gd --with-png-dir --with-jpeg-dir ./Configure --> Successful Make --> Build complete. (It is safe to ignore warnings about tempnam and tmpnam). Wow. Now I try Make Install --> [root@charles php4.4]# make install exit 0; -b /home/charles/php4.4/ext/standard/url_scanner_ex.re > /home/charles/php4.4/ext/standard/url_scanner_ex.c exit 0; -b /home/charles/php4.4/ext/standard/var_unserializer.re > /home/charles/php4.4/ext/standard/var_unserializer.c Installing PHP SAPI module: cgi make: execvp: /home/charles/php4.4/build/shtool: Permission denied make: [install-sapi] Error 127 (ignored) Installing PHP CGI into: /usr/local/bin/ /bin/sh: line 1: /home/charles/php4.4/build/shtool: Permission denied make: *** [install-sapi] Error 126 Many steps closer. What should I do here?
Hmm. Set permissions..and it completed the make install. Restarted Apache / Server. Did that..PHP version still shows 4.2.2.
Check your httpd.conf file for this line: and see where the libphp4.so file is being loaded from. My guess is the old one is still on there in a non-default location (which is where Apache is loading it from).
php.conf contains: LoadModule php4_module modules/libphp4.so AddType application/x-httpd-php .php .php4 .php3 .phtml DirectoryIndex index.php index.php3
I think you have it configured and compiled... you just need to find where it put the libphp4.so file.