|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
||||
|
||||
|
I'm having trouble getting PHP to work
on a Linux box (Red Hat 5.2) using Apache 1.3.3 I'm adding PHP as a module using apxs. Everything went great on a similar install, so I think I'm just missing something simple. When I start the server everything appears to start normally, but .php3 files are just sent to the browser without being run through the PHP interpreter. Any help would be appreciated. Scott |
|
#2
|
|||
|
|||
|
Can you find libphp3.so in libexec directory under your apache installed directory?
Did you shutdown apache before installing php3? Did you uncomment the LoadModule line of the libphp3.so of your httpd.conf? If so, run /path/to/apachectl graceful and see what happen. |
|
#3
|
||||
|
||||
|
Whew! a lot has happened since my original
post. Now the machine has Apache 1.3.13 and I'm trying to install PHP 3.0.16 Can you find libphp3.so in libexec directory under your apache installed directory? No. In fact, that directory is empty. All the .so files are in /usr/lib/apache Did you shutdown apache before installing php3? Yep. Did you uncomment the LoadModule line of the libphp3.so of your httpd.conf? It wasn't in there at all. In fact, there are no LoadModule directives. If I add one for php the server won't start. If I try to start it I get the following error: configuration broken, ignoring restart When I run apachectl configtest it says: Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not inc luded in the server configuration I'm sure there's something very simple mis-configured somewhere, but I've blown it all away and started over from the tar ball several times and I keep ending up in the same place. Any help would be appreciated. Scott |
|
#4
|
|||
|
|||
|
>>I've blown it all away and started over from the tarball
>>several times and I keep ending up in the same place Okay, let's start it all over from scratch. 1) I assume you are running Redhat, so install MySQL server, client and devel RPMs. 2)Get and install gd-1.8.1 and jpeg-6b (RPM is fine) 3) Download php-4.0.0.tar.gz apache_1.3.12.tar.gz 4) Install Apache: tar -zxvf apache_1.3.12.tag.gz cp apache_1.3.12 5) Open the file "config.layout" Look under <Layout Apache> layout and follow this: <Layout Apache> prefix: /usr/local/apache exec_prefix: $prefix bindir: $exec_prefix/bin sbindir: $exec_prefix/sbin libexecdir: $exec_prefix/libexec mandir: $prefix/man sysconfdir: $prefix/conf datadir: /home/httpd iconsdir: $datadir/icons htdocsdir: $datadir/htdocs cgidir: $datadir/cgi-bin includedir: $prefix/include localstatedir: /var/log/httpd runtimedir: $localstatedir/logs proxycachedir: $localstatedir/proxy </layout> 6) run the configure script: (all in one line, don't worry if the line is too long, just continue typing) ./configure --with-layout=Apache --enable-module=most --enable-shared=max --disable-rule=WANTHSREGEX Press ENTER now 7) then type 'make', then 'make install' 8) Do not start Apache now, let's install PHP. tar -zxvf php-4.0.0.tar.gz cd php-4.0.0 ./configure --with-apxs=/usr/local/apache/sbin/apxs --with-config-file-path=/usr/local/etc --with-mysql --with-gd=/usr/local --with-jpeg-dir=/usr/local --with-system-regex --enable-track-vars 9) make, make install 10) cp php.ini-dist /usr/local/etc/php4.ini 11) Edit /usr/local/apache/conf/httpd.conf and uncomment this line: LoadModule php4_module libexec/libphp4.so 12) look for ClearModuleList section and uncomment this line: AddModule mod_php4.c 13) look for <IfModule mod_mime.c> section and uncomment this line: AddType application/x-httpd-php .php4 .php ############################################ at (8), I specified --with-gd=/usr/local, you can do this to make sure.. whereis gd2copypal if it says "/usr/local/bin/gd2copypal" then /usr/local is fine. Keep in mind, should you want to install both php-3.0.16.tar.gz and php-4.0.0.tar.gz, install php-3.0.16 first. But, when installing php-4.0.0, you need to specify one more configure option which is: --enable-versioning [This message has been edited by freebsd (edited May 24, 2000).] |
|
#5
|
|||
|
|||
|
Not to try and muddy the waters any further but maybe you just needed to make sure the "AddType application/x-httpd-php3 .php3" line is uncommented.
Robman |
|
#6
|
|||
|
|||
|
Hi, I'm a newbie at unix and I just downloaded RedHat 6.0 with Apache 1.3 on it. I followed your directions above to install Apache 1.3.12 and PHP 4.0.1pl2 except for 2 things in the php configuration:
1) --with-pgsql replaced the --with-mysql command because i was using another database 2) --with-gd=/usr/local was eliminated because it caused an error (gd wasn't found in that directory)... everything seemed to work fine and i got past the installation part but when i opened httpd.conf, some of the lines i was supposed to uncomment were already commented out (LoadModule php4_module libexec/libphp4.so, AddModul mod_php4.c). When i tried to process a .php3 and .php4 file, it still didn't work! I tried to stop then start the server using "apachectl" commands but those didn't work (no such command exists) even though i have an apachectl.8 file in /usr/man/man8!! what could be wrong? apache was working before i installed version 1.3.12--could this be the problem? please help!!! |
|
#7
|
|||
|
|||
|
>>When i tried to process a .php3 and .php4 file, it still didn't work!
Make sure you stopped apache before doing any installation/configuration. >>I tried to stop then start the server using "apachectl" commands but those didn't work (no such command exists) You need to "cd" to /usr/local/apache Then run ./apachectl graceful >>some of the lines i was supposed to uncomment were already commented out Not really supposed to. If they were uncommented, then that's fine. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > problem installing php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|