Warning: Creating default object from empty value in /home/mirandam/public_html/linux/wp-includes/functions.php on line 292
Fedora, Linux and Stuff :: PHP4 on Fedora Core 5

PHP4 on Fedora Core 5

Friday, April 7th, 2006 ~ 7:04 pm by Mauriat Miranda

Apparently some developers still require PHP4 on their web servers. The previous method for doing so on Fedora Core 4 (FC4) was to use the FC3 RPM’s. (A formal procedure was provided by the guide: PHP4 on FC4.)

Since the release of FC5, the dependancies and outdated linking from the FC3 RPM packages may be difficult to resolve. It is recommended to recompile the PHP4 SRC.RPM and link it to the running software provided in FC5. However, there are some needed changes to the SRC.RPM. There is a modified source RPM package provided on the following guide:

PHP4 on Fedora Core

Steps provided should work for FC5 as well as FC4. There are some precompiled binary RPM’s provided as well.

These have only been tested by myself. I would appreciate it if anyone can report as to how well these work!

10 Responses to “PHP4 on Fedora Core 5”

  1. Agus Riant Says:

    I have try on x86_64 machine, have an error messege:

    007+ In branch 2
    008- In branch 3
    008+ i=3
    009- hi
    009+ In branch 3
    010+ hi
    -- ../tests/lang/021.diff result ends.
    TEST FAILURE: ../tests/lang/015.diff --
    001- Hello
    001+ PHP Warning:  mime_magic: type regex               BEGIN[[:space:]]*[{]    application/x-awk invalid in Unknown on line 0
    002+ Hello
    -- ../tests/lang/015.diff result ends.
    error: Bad exit status from /var/tmp/rpm-tmp.55718 (%check)

    Have a explaination about this issue. thank’s

  2. Ritz Says:

    I try to install your precompiled RPM PKG as followings.

    #rpm -ivh php-4.3.11-2.8.1.mjm.i386.rpm \
    > php-domxml-4.3.11-2.8.1.mjm.i386.rpm \
    > php-gd-4.3.11-2.8.1.mjm.i386.rpm \
    > php-mysql-4.3.11-2.8.1.mjm.i386.rpm \
    > php-pear-4.3.11-2.8.1.mjm.i386.rpm \
    > php-xmlrpc-4.3.11-2.8.1.mjm.i386.rpm

    error: Failed dependencies:
    libdb-4.2.so is needed by php-4.3.11-2.8.1.mjm.i386
    #

    So I will try to compile as your step.
    I will let you know that result.

  3. Mauriat Says:

    No recompile needed.
    http://www.mjmwired.net/resources/mjm-php4-fc4.html
    From FC4 but similar for FC5:

    Others have found a dependancy problem with libdb-4.2.so. These are resolved by installing the compat-db-4.2.52-2 RPM. Also available on the FC4 CD’s or DVD. Additionally, should be available from the Fedora site or through yum.

  4. Ritz Says:

    Great!!!!
    I finished successfully!!!!
    Thanks so much………………..!!!!
    So beautiful !!!

  5. Alex Says:

    I had run into these same problems, and solved some of them independently, but after understanding that the mime_magic errors during the PHP build tests (and at runtime) are caused by a dubious entry in the file RPM, it became clear that the simplest and best solution is to make sure that the original FC5 file-4.16-6.2 RPM is installed, not the newer updates version file-4.17-2.fc5.

    This is the missing clue that Agus Riant needed.

    @alex

  6. Mauriat Says:

    Thanks Alex! I only tested with the updates for all the basic dependancies, not a fully updated system. I will make a note of this change in the guide.

  7. Linh Dang Says:

    Hi, I install your php 4 rpm for Mapscript (UMN Mapserver). When Apache load php4 module, it ’show this message
    Sat Jul 22 23:36:59 2006] [warn] module php4_module is already loaded, skipping
    [Sat Jul 22 23:36:59 2006] [notice] Digest: generating secret for digest authentication …
    [Sat Jul 22 23:36:59 2006] [notice] Digest: done
    PHP Warning: Unknown(): Unable to load dynamic library ‘/usr/lib/php4/php_mapscript.so’ - /usr/lib/php4/php_mapscript.so: undefined symbol: php_gd_gdImageCopy in Unknown on line 0
    [Sat Jul 22 23:36:59 2006] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.

    But i have already installed
    php-mysql-4.3.11-2.8.1.mjm
    php-ncurses-4.3.11-2.8.1.mjm
    php-debuginfo-4.3.11-2.8.1.mjm
    php-domxml-4.3.11-2.8.1.mjm
    php-xmlrpc-4.3.11-2.8.1.mjm
    php-ldap-4.3.11-2.8.1.mjm
    php-4.3.11-2.8.1.mjm
    php-pear-4.3.11-2.8.1.mjm
    php-imap-4.3.11-2.8.1.mjm
    php-pgsql-4.3.11-2.8.1.mjm
    php-devel-4.3.11-2.8.1.mjm
    php-gd-4.3.11-2.8.1.mjm
    php-mbstring-4.3.11-2.8.1.mjm
    So i don’t know why apache show this warning.
    Thank for any help
    Best regards

  8. Mauriat Says:

    To fix Linh Dang’s problem with mapscript:

    I placed “extension=php_mapscript.so” not in Dynamic extension section in php.ini and “extension=gd.so” conflict with gd.ini in /etc/php.d. The gd extension should be placed in Dynamic extension of php.ini

  9. Pwizard Says:

    [root@proxy1 PHP4onFedora]# rpm -ivh php-4.3.11-2.8.1.mjm.i386.rpm
    error: Failed dependencies:
    php-pear is needed by php-4.3.11-2.8.1.mjm.i386
    How to fix ?

  10. Mauriat Says:

    Pwizard: Did you read the instructions carefully? You have to install every RPM you want at the same time.