Re: Dynamic vs. Static
| From: | Tariq Murtaza | Date: | Tue, 10 Dec 2002 05:46:29 +0000 |
| Subject: | Re: Dynamic vs. Static | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-127601@lists.php.net to get a copy of this message | ||
Thanks very much John :)
John Nichel wrote:
It probably wouldn't help you all that much. Since it was for my own personal use, I hardcoded directory paths and such for my personal set up. I used to do it with a shell script too (nothing fancy there either). Just configure it again without apxs.... ./configure --with-whateveroptions make After you compile it (no need to "make install"), the php binary will be in your php source directory (named "php")...just move it to where ever you want too (I keep mine in /usr/bin). I'll post my old shell script now, but I don't have access to the Perl script until tomorrow morning at work. I'll send it out then. They're both very static, so you would have to change quite a few items for your needs. --Shell Script-- #!/bin/bash cd /usr/local/src/tar_files mv *.tar ../ cd ../ tar -xvf apache_1.3.26.tar tar -xvf php-4.2.3.tar tar -xvf mod_perl-1.0-current.tar mv *.tar tar_files cd apache_1.3.26 ./configure --prefix=/webserver/server cd ../php-4.2.3 ./configure \-- Tariq Murtaza Assistant Web Master Business Technology Team Small & Medium Enterprise Development Authority--with-apache=../apache_1.3.26 \ --with-mysql \ --disable-pear \ --enable-calendar \ --with-config-file-path=/webserver/server/config \ --enable-ftp \ --enable-sockets \ --enable-wddx \ --with-pspell \ --with-iconvmake make install cd ../mod_perl-1.27 perl Makefile.PL APACHE_SRC=../apache_1.3.26/src \DO_HTTPD=1 \ USE_APACI=1 \ EVERYTHING=1 \ APACI_ARGS='--prefix=/webserver/server \ --bindir=/webserver/server/bin \ --sbindir=/webserver/server/sbin \ --libexecdir=/webserver/server/lib \ --sysconfdir=/webserver/server/config \ --iconsdir=/webserver/docs/vhosts/backup/images/apache_icons \ --htdocsdir=/webserver/docs/vhosts/backup \ --manualdir=/webserver/docs/vhosts/backup/rtfm/apache \ --cgidir=/webserver/docs/vhosts/backup/cgi-bin \ --includedir=/webserver/server/include \ --logfiledir=/webserver/server/logs \ --proxycachedir=/webserver/server/proxy \ --server-uid=apache \ --server-gid=www \ --activate-module=src/modules/php4/libphp4.a'make make install cd ../apache_1.3.26 make install rm -rf apache_1.3.26 rm -rf php-4.2.3 chown -R apache /webserver/server chgrp -R www /webserver/server chown -R apache /webserver/docs chgrp -R www /webserver/docs chmod -R g+w /webserver/docs chmod -R g+w /webserver/server/config cd /usr/local/src/tar_files mv php-4.2.3.tar ../ cd ../ tar -xvf php-4.2.3.tar mv php-4.2.3.tar tar_files cd php-4.2.3 ./configure \--with-mysql \ --disable-pear \ --enable-calendar \ --with-config-file-path=/webserver/server/config \ --enable-ftp \ --enable-sockets \ --enable-wddx \ --with-pspell \ --with-iconvmake make install --Shell Script-- Tariq Murtaza wrote:Hi John, Can we share your Perl script? I compiled with switch "--with-apxs=/usr/local/apache/bin/apxs" Is it that apache switch? Thanks Tariq John Nichel wrote:I went thru the same problem, so one day I just sat down, and wrote a Perl script that does the module and binary at the same time. Saved me alot of grief. Scott Hurring wrote:If you do it correctly, yes. The apache module usually lives somewhere in the apache hierarchy, whereas the 'php' binary is '/usr/bin/' or '/usr/local/bin/', so they can quite happily co-exist. Beware though, when upgrading one, upgrade BOTH. It drove me nuts once when i forgot, and ended up having a more recent command line version than apache module and couldn't figure out why cmdline scripts were acting differently than when served up thru apache. -- Scott Hurring Systems Programmer EAC Corporation scott (*) eac.com -- <ed@home.homes2see.com> wrote in message news:Pine.LNX.4.04.10212091530330.28871-100000@home.homes2see.com...Can I do that using the same src I used to create the dynamic module and both would work hapilly together? Thanks, Ed On Mon, 9 Dec 2002, John Nichel wrote:No. To get the binary executable, compile it without the apache switch. ed@home.homes2see.com wrote:When you compile php for apache using the dynamic module example used in the documentation, do you not get an exacutable php to use from the command line? Ed