On Nov 24, 2007, at 13:00:59, ApplePro wrote:
Let's back up even more since it's clear you're not entirely sure what your doing so lets try using a schema in the build process so you will be in the correct directory and I will also know where you should be and will be. Place the uncompressed php source in the drive root. mkdir -p /SourceCache/tarball Copy or move the php source tarball to the /SourceCache/tarball directory. cd /SourceCache Use one of the following to expand the source tar -xjvf tarball/php-5.2.5.tar.bz2; # this is for a .bz2 file tar -xzvf tarball/php-5.2.5.tar.gz; # this is for a .gz file cd /SourceCache/php-5.2.5 Your original configure command has conflict issues so here is a cleaned up one. Since it appears that your OS is 64bit savy apache may be running in 64bit mode and I believe the two arches required are i386 and x86_64 or i586 and x86_64 but of course this also depends on your gcc and how it was compiled for your OS by whomever you get your packages from, I think you can verify this by use of the "file" command. file /usr/src/php-5.2.3/libs/libphp5.so; # <-- the working php module And just for giggle check the one that doesn't work file /tmp/php-5.2.3/libs/libphp5.so; # <-- the non-working php module HERE IS YOUR CONFIGURE COMMAND: CFLAGS="-arch i386 -arch x86_64 -pipe -no-cpp-precomp" \ CCFLAGS="-arch i386 -arch x86_64 -pipe" \ CXXFLAGS="-arch i386 -arch x86_64 -pipe" \ LDFLAGS="-arch i386 -arch x86_64" \ ./configure \ --build=x86_64-unknown-linux-gnu \ --host=x86_64-unknown-linux-gnu \ --target=x86_64-redhat-linux-gnu \ --cache-file=../config.cache \ --with-layout=GNU \ --with-apxs2=/usr/sbin/apxs \ --prefix=/usr \ --libdir=/usr/lib64 \ --localstatedir=/var \ --sharedstatedir=/usr/com \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --sysconfdir=/etc \ --with-config-file-path=/etc \ --with-config-file-scan-dir=/etc/php.d \ --with-pic \ --with-bz2 \ --with-curl \ --with-gd=shared \ --with-freetype-dir=/usr \ --with-png \ --with-png-dir=/usr \ --with-jpeg \ --with-jpeg-dir=/usr \ --with-gettext \ --with-gmp \ --with-iconv \ --with-kerberos \ --with-mime-magic=shared,/usr/share/file/magic.mime \ --with-openssl \ --with-pspell \ --with-expat-dir=/usr \ --with-pcre-regex=/usr \ --with-unixODBC=shared,/usr \ --with-xml \ --with-libxml-dir=/usr \ --with-zlib \ --enable-calendar \ --enable-dbx \ --enable-dio \ --enable-exif \ --enable-ftp \ --enable-gd-native-ttf \ --enable-magic-quotes \ --enable-memory-limit \ --enable-shmop \ --enable-sockets \ --enable-sysvsem=shared \ --enable-sysvshm=shared \ --enable-sysvmsg=shared \ --enable-track-vars \ --enable-trans-sid \ --enable-ucd-snmp-hack \ --enable-wddx \ --enable-yp \ --without-mysql \ --without-gdbm \ --without-pear \ --without-sqlite \ --disable-dba \ --disable-debug \ --disable-dependency-tracking \ --disable-dom \ --disable-pdo \ --disable-rpath \ --disable-xmlreader \ --disable-xmlwriter make ls -lsa $(find . -name libphp5.so) make install It will tell you what directory it has installed the sapi module (this is the libphp5.so file). You should see something like: Installing PHP SAPI module: apache [activating module `php5' in /private/etc/httpd/httpd.conf] cp libs/libphp5.so /usr/libexec/httpd/libphp5.so chmod 755 /usr/libexec/httpd/libphp5.so I have apache installed differently so your paths will be different. Let me know when you've gotten this far. I like to know what my environment is like and my tools are tailored in such a way that I can produce binary packages that will work on either 32bit or 64bit OS enabled machines without having to generate seperate builds. My apache installation is a little more advanced and I build so that I can install the same binary software on any of my machines and know it will work. Server Version: Apache/2.2.6 (Debian GNU/Linux - 64bit) mod_ssl/2.2.6 OpenSSL/0.9.8 PHP/5.2.5 mod_jk/1.2.23 binfo is a proprietary utility which is part of my developer tools but file should provide similar results. My gcc is configured in such a way that I can generate binaries that will run on the oldest hardware I have increasing hardware compatibility with my software. techdata:~ root# binfo /usr/sbin/httpd /usr/sbin/httpd: Elf binary with 2 architectures /usr/sbin/httpd (for architecture i386): Elf executable i386 /usr/sbin/httpd (for architecture x86_64): Elf 64-bit executable x86_64 techdata:~ root# gcc -v Using built-in specs. Target: i386-debian-linux Configured with: /var/tmp/gcc/gcc-4.0.1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-debian-linux --program-prefix= --host=i386-debian-linux --target=i386-debian-linux Thread model: posix gcc version 4.0.1 techdata:~ root#
/usr/sbin/apxs -q LIBEXECDIR
-- Dale |
Attachment:
PGP.sig
Description: This is a digitally signed message part
- Follow-Ups:
- Re: PHP doesn't work with Apache2
- From: ApplePro
- Re: PHP doesn't work with Apache2
- References:
- PHP doesn't work with Apache2
- From: ApplePro
- Re: PHP doesn't work with Apache2
- From: BuildSmart
- Re: PHP doesn't work with Apache2
- From: Keith Roberts
- Re: PHP doesn't work with Apache2
- From: BuildSmart
- Re: PHP doesn't work with Apache2
- From: ApplePro
- PHP doesn't work with Apache2
- Prev by Date: Re: PHP doesn't work with Apache2
- Next by Date: Re: PHP doesn't work with Apache2
- Previous by thread: Re: PHP doesn't work with Apache2
- Next by thread: Re: PHP doesn't work with Apache2
- Index(es):