I need some advice on migrating from PHP4 to PHP5.

Discussion in 'Installation/Configuration' started by thinktink, Dec 2, 2007.

  1. thinktink

    thinktink New Member

    I am a noob at servers and stuff but I've managed to get a live working webserver. And all thanks to ISPConfig for which from now on till forever will be my site management software of choice! Kudos!

    I wrote my first PHP page on my personal computer with Abyss Webserver and PHP5 for Windows. Works great for testing and learning. Wasn't very hard to learn I guess cause I've already got some skill in C++ and the structure is extremely similar.

    I wrote the script using a function only available in PHP5: filter_var. Great function because it will help keep maliciouse attackers from injecting bad code into my site passed through form data and whatnot.

    My problem is that the live server is still only running PHP4, and I've already installed ISPConfig, SquirrelMail, etc...

    I've tried using yum update php and apt-get update php but neither one seems to be pointed at a live repository.

    I downloaded the source for the latest PHP5 and ran the standard unzip, untar, ./configure, make, and make test. Its the "make install" that's giving me the jitters. While it was doing the configure and make stuff, I did more research online and found that there are a fair amount of PHP4 to PHP5 issues.

    then this happened:
    Code:
    FAILED TEST SUMMARY
    ---------------------------------------------------------------------
    Bug #38474 (getAttribute select attribute by order, even when prefixed) (OK to fail with libxml2 < 2.6.2x) [e]
    Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt]
    iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
    My concerns are if its even possible to install PHP5 on top of PHP4 and not break everything else in the process and having to wipe the harddrive and spend another 2 weeks getting it back up again? It wouldn't be a problem to take the httpd down for a while but the mailserver needs to be up 24/7.

    If I can't install PHP5 on my live server, is there an alternative to the filter_var function?

    I'll take any help I can get at this point, I am at my wits end.

    On another note:

    Can someone point me to a FAQ that shows step-by-step-by-step-by-step how to get yum and apt-get to point to a live repository? I can't tell you how many times I've googled yum and apt and only found threads and faqs to broken repositories and mirrors, or atleast they don't work for me or I'm not doing it right somehow.
     
    Last edited: Dec 3, 2007
  2. falko

    falko Super Moderator Howtoforge Staff

    Which Fedora version do you use?

    You can search for PHP5 packages like this:
    Code:
    yum search php
    and then install them like this:
    Code:
    yum install [I]package1  package2 ...[/I]
     
  3. thinktink

    thinktink New Member

    Had to look how to find which Fedora Core 4 version I have...
    Code:
    [root@somerandomdomain /]# cat /proc/version
    Linux version 2.6.11-1.1369_FC4 ([email protected]) (gcc version 4.0.0 20050525 (Red Hat 4.0.0-9)) #1 Thu Jun 2 22:55:56 EDT 2005


    Coolness! Didn't realize yum had a search function, thought only apt had one. NICE! Now I feel like more of an noob/idiot! :D

    I did the "yum search php" thing and out popped approximately 3 quadrillion lines of text. ;) I've condensed it to dis include the text descriptions and excludes anything not PHP related (I think).
    Code:
    php.i386                                 5.0.4-10               core
    Matched from:
    php
    
    php-devel.i386                           5.0.4-10               core
    Matched from:
    php-devel
    
    php-pear.i386                            5.0.4-10               core
    Matched from:
    php-pear
    
    php-imap.i386                            5.0.4-10               core
    Matched from:
    php-imap
    
    php-ldap.i386                            5.0.4-10               core
    Matched from:
    php-ldap
    
    php-mysql.i386                           5.0.4-10               core
    Matched from:
    php-mysql
    
    php-pgsql.i386                           5.0.4-10               core
    Matched from:
    php-pgsql
    
    php-odbc.i386                            5.0.4-10               core
    Matched from:
    php-odbc
    
    php-soap.i386                            5.0.4-10               core
    Matched from:
    php-soap
    
    php-snmp.i386                            5.0.4-10               core
    Matched from:
    php-snmp
    
    php-xml.i386                             5.0.4-10               core
    Matched from:
    php-xml
    
    php-xmlrpc.i386                          5.0.4-10               core
    Matched from:
    php-xmlrpc
    
    php-mbstring.i386                        5.0.4-10               core
    Matched from:
    php-mbstring
    
    php-ncurses.i386                         5.0.4-10               core
    Matched from:
    php-ncurses
    
    php-gd.i386                              5.0.4-10               core
    Matched from:
    php-gd
    
    php-bcmath.i386                          5.0.4-10               core
    Matched from:
    php-bcmath
    
    php-dba.i386                             5.0.4-10               core
    Matched from:
    php-dba
    
    libc-client.i386                         2002e-9                core
    Matched from:
    
    php-pear-excel.noarch                    0.8-1.2.fc4            freshrpms
    Matched from:
    php-pear-excel
    
    php-pear-ole.noarch                      0.5-2.2.fc4            freshrpms
    Matched from:
    php-pear-ole
    
    php.i386                                 5.0.4-10.5             updates
    Matched from:
    php
    
    php-devel.i386                           5.0.4-10.5             updates
    Matched from:
    php-devel
    Files needed for building PHP extensions.
    
    php-pear.i386                            5.0.4-10.5             updates
    Matched from:
    php-pear
    
    php-imap.i386                            5.0.4-10.5             updates
    Matched from:
    php-imap
    
    php-ldap.i386                            5.0.4-10.5             updates
    Matched from:
    php-ldap
    
    php-mysql.i386                           5.0.4-10.5             updates
    Matched from:
    php-mysql
    
    php-pgsql.i386                           5.0.4-10.5             updates
    Matched from:
    php-pgsql
    
    php-odbc.i386                            5.0.4-10.5             updates
    Matched from:
    php-odbc
    
    php-soap.i386                            5.0.4-10.5             updates
    Matched from:
    php-soap
    
    php-snmp.i386                            5.0.4-10.5             updates
    Matched from:
    php-snmp
    
    php-xml.i386                             5.0.4-10.5             updates
    Matched from:
    php-xml
    
    php-xmlrpc.i386                          5.0.4-10.5             updates
    Matched from:
    php-xmlrpc
    
    php-mbstring.i386                        5.0.4-10.5             updates
    Matched from:
    php-mbstring
    
    php-ncurses.i386                         5.0.4-10.5             updates
    Matched from:
    php-ncurses
    
    php-gd.i386                              5.0.4-10.5             updates
    Matched from:
    php-gd
    
    php-bcmath.i386                          5.0.4-10.5             updates
    Matched from:
    php-bcmath
    
    php-dba.i386                             5.0.4-10.5             updates
    Matched from:
    php-dba
    
    libc-client.i386                         2002e-17               updates
    Matched from:
    
    jpgraph.noarch                           2.0-1.fc4              extras
    Matched from:
    
    jpgraph-doc.noarch                       2.0-1.fc4              extras
    Matched from:
    
    mod_suphp.i386                           0.5.2-8.fc4            extras
    Matched from:
    mod_suphp
    
    php-Smarty.noarch                        2.6.13-1.fc4           extras
    Matched from:
    php-Smarty
    
    php-adodb.noarch                         4.80-1.fc4             extras
    Matched from:
    php-adodb
    
    php-dbase.i386                           5.0.4-3.fc4            extras
    Matched from:
    php-dbase
    
    php-json.i386                            1.1.0-1.fc4            extras
    Matched from:
    php-json
    
    php-mcrypt.i386                          5.0.4-3.fc4            extras
    Matched from:
    php-mcrypt
    
    php-mhash.i386                           5.0.4-3.fc4            extras
    Matched from:
    php-mhash
    
    php-pecl-mailparse.i386                  2.1.1-1.fc4            extras
    Matched from:
    php-pecl-mailparse
    
    php-pecl-pdo.i386                        0.3-2.fc4              extras
    Matched from:
    php-pecl-pdo
    
    php-pecl-pdo-devel.i386                  0.3-2.fc4              extras
    Matched from:
    php-pecl-pdo-devel
    
    php-pecl-pdo-sqlite.i386                 0.3-3.fc4              extras
    Matched from:
    php-pecl-pdo-sqlite
    
    php-readline.i386                        5.0.4-3.fc4            extras
    Matched from:
    php-readline
    
    php-tidy.i386                            5.0.4-3.fc4            extras
    Matched from:
    php-tidy
    
    phpldapadmin.noarch                      0.9.8.3-1.fc4          extras
    Matched from:
    phpldapadmin
    
    lighttpd-fastcgi.i386                    1.4.11-1.fc4           extras
    Matched from:
    
    php-gd.i386                              5.0.4-10.5             installed
    Matched from:
    php-gd
    
    php-odbc.i386                            5.0.4-10.5             installed
    Matched from:
    php-odbc
    
    php-xmlrpc.i386                          5.0.4-10.5             installed
    Matched from:
    php-xmlrpc
    
    php-ldap.i386                            5.0.4-10.5             installed
    Matched from:
    php-ldap
    
    php-pear.i386                            5.0.4-10.5             installed
    Matched from:
    php-pear
    
    php.i386                                 5.0.4-10.5             installed
    Matched from:
    php
    
    php-xml.i386                             5.0.4-10.5             installed
    Matched from:
    php-xml
    
    php-mysql.i386                           5.0.4-10.5             installed
    Matched from:
    php-mysql
    
    php-imap.i386                            5.0.4-10.5             installed
    Matched from:
    php-imap
    
    libc-client.i386                         2002e-17               installed
    Matched from:
    
    php-devel.i386                           5.0.4-10.5             installed
    Matched from:
    php-devel
    
    Which ones should I install?
     
  4. falko

    falko Super Moderator Howtoforge Staff

    At least php. The rest depends on what features you need in PHP, If you need MySQL support in PHP, for example, you should also install php-mysql.
     

Share This Page