PHP in Redhat 8

Discussion in 'Web Design & Coding' started by Zedric, Nov 16, 2002.

  1. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    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?
     
  2. MadHaXX()|2

    MadHaXX()|2 Guest

    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
     
  3. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    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.
     
  4. MadHaXX()|2

    MadHaXX()|2 Guest

    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.
     
  5. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    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):
    Code:
    #
    # 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
    </Files>
    
    #
    # 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.
     
  6. MadHaXX()|2

    MadHaXX()|2 Guest

    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
     
  7. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    :mad: :mad: :mad:
    *pulls hair* *howls* *bonk* *bonk* *bonk* *bonk* *bonk*

    Ok.
    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.
     
  8. crossmax

    crossmax Guest

    Look into /etc/php.ini ...:p