• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

PHP in Redhat 8

Oh buggers. Two days of installing and configuring two Linux cans (Kiff and Zoidberg below). I'm tired and almost done. Now I just can't get the blasted Apache to run PHP. I tried all the tricks (except compiling source code) and still nothing. It seems to me it should have worked from the beginning. Any ideas?


you gotta build apache --with php... something like that. as far as i know (that's what i did) you gotta compile the server with php then build php --with apache.

after that... then you got to configure youre http.conf & php.ini to how you want it.

good luck
if you navigate to /vars/www/index.html then you should find an html based help thing for Apache, that should help you out, if not you might need to checkout http://www.php.net and the apache website as well, you might have to do all of the make, make install things to get it to work.

Also, I know its not the greatest of things to hear but RH 8 int the best RH version availble. From what I have heard RH 7.3 is missing some of the security flaws of RH 8, I think I am not absolutely sure on this though.


rh7.3 is easier to work in anyway. (although i cant back that up ;))

just build apache & php again, thats the only way to make it work right. :(

as far as i know apache for windows is the only binary which comes prebuilt for php & all that.
My Mandrake 8.2 worked with PHP/mySQL like a charm from start. Since I choose to install Apache with PHP, PHP, PHP-mySQL and mySQL I thought it would work. Apache is set up to use PHP from the beginning. Here is the php.conf made by RH (yes it's loaded, no preblems):
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.

LoadModule php4_module modules/libphp4.so

# Cause the PHP interpreter handle files with a .php extension.
<Files "*.php">
    SetOutputFilter PHP
    SetInputFilter PHP
    LimitRequestBody 524288

# Add index.php to the list of files that will be served as directory
# indexes.
DirectoryIndex index.php
I don't get it. I don't want to mess with recompiling if I don't have to since that never worked for me before.


yea, your http.conf and php.ini can be set up correctly and if the httpd and php binaries arent set up it wont run. once i updated the apache httpd to the latest version and lost php. all of my configuration files remained unchanged but the server didnt work. then i rebuilt it and it worked

when the installer sets up the os it'll configure apache php dependencies/additional modules (php, perl, mysql or postgresql, ldap...) and build the binary accordingly.

maybe you can try to rebuild php by its self
i have mine built with the following:
./configure i386-redhat-linux --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 --prefix=/usr --with-config-file-path=/etc --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-mm --with-openssl --with-png --with-pspell --with-regex=system --with-xml --with-expat-dir=/usr --with-zlib --with-layout=GNU --enable-bcmath --enable-debugger --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-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-mbstring --enable-mbstr-enc-trans --with-apxs=/usr/sbin/apxs
:mad: :mad: :mad:
*pulls hair* *howls* *bonk* *bonk* *bonk* *bonk* *bonk*

On the brink of installing Mandrake again, I found the error. So stupid stupid stupid stupid stupid!!!
After checking the config files for the 100th time I noticed something:

; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
short_open_tag = Off

*bonk* *bonk* *bonk*

Of course my test file had <? ?> and not <?php ?> :mad: :mad: :mad:

*bonk* *bonk* *bonk*

And now it works. All of it.

*bonk* *bonk* *bonk* *bonk* *bonk* *bonk* *bonk* *bonk* *bonk* *bonk* *bonk* *bonk* :mad:

You learn something every day.

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member