Page 5 of 8
Re: Updated Patch
Posted: Wed Jan 23, 2008 2:49 pm
by breun
jas8522 wrote:We updated from 5.1 to 5.2.5 directly so we don't have the 5.2.4 RPM's ... anyone know of a simple way to roll back to 5.2.4? Must I rpm -e all php RPM's then download all of the 5.2.4 ones individually and install them?
No need to remove PHP, you can use
rpm -Uvh --oldpackage to 'upgrade' to older packages. There are no PHP <5.2.5 packages in the atomic channel anymore though.
You can get the spec files for older versions at
http://3es.atomicrocketturtle.com/packages/php/ and build the rpms yourself though.
Posted: Tue Feb 05, 2008 10:57 am
by jas8522
Scott... any chance of getting that new patch included in an update?
http://bugs.php.net/bug.php?id=43677&thanks=6
Jordan
Use PHP4 for Horde along side PHP 5.2.5 for everything else.
Posted: Wed Feb 06, 2008 9:50 pm
by inc_ubus
I'm kind of tethered to Modernbill right now so upgrading to Plesk8 introduces a whole host of issues. The only issue I have with php5.2.5 is Horde. So after many different "fixes" that didn't completely work this is the one that worked best.
Download and uncompress source:
Code: Select all
cd /usr/src/
wget http://us2.php.net/distributions/php-4.4.7.tar.gz
tar xvzf php-4.4.7.tar.gz
cd php-4.4.7/
Now configure and resolve any dependencies:
Code: Select all
./configure --prefix=/usr/local/php4 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --with-libdir=lib --with-config-file-path=/usr/local/php4/lib --with-pic --disable-rpath --with-exec-dir=/usr/bin --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-iconv --with-jpeg-dir=/usr --with-png --with-zlib --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-pear=/usr/share/pear --enable-calendar --with-libxml-dir=/usr --with-xml --enable-force-cgi-redirect --enable-pcntl --enable-mbstring --enable-mbregex --with-ncurses --with-gd --enable-bcmath --with-xmlrpc --with-mysql --with-mysqli --enable-dom --with-xsl --enable-fastcgi --program-suffix=4 --with-expat-dir=/usr --with-ldap=shared --with-imap --with-imap-ssl=/usr/include/openssl --with-kerberos
Compile and install php4:
Check if the modules are installed properly with php4:
If not check the following binaries
Copy them over if needed:
Code: Select all
cp -rf ./sapi/cgi/php /usr/local/php4/bin/
Setup directories for apache:
Code: Select all
mkdir -pv /etc/httpd/cgi-sys/
cp -rf ./sapi/cgi/php /etc/httpd/cgi-sys/
cp -rf php.ini-recommended /usr/local/php4/lib/php.ini
Create this file /etc/httpd/conf.d/zz050a_horde_php_workaround.conf and insert the following:
Code: Select all
<DirectoryMatch /usr/share/psa-horde>
AddHandler application/x-httpd-php4 .php
php_value include_path "/usr/share/psa-horde/lib:/usr/share/psa-horde:/usr/share/psa-horde/pear:."
</DirectoryMatch>
Modify Horde to work with CGI version of PHP:
Go to line 206 and edit to look like this:
Code: Select all
// get hostname from http URL (patch for Plesk)
#$headers = getallheaders();
$ServerName = preg_replace('/^webmail\./', '', preg_replace('/^www\./', '', $_SERVER['HTTP_HOST']));
Now the installation is finished, restart Apache and test Horde.
http://webmail.domain.com/test.php
It should list your version of php as 4. Now test your webmail and you should be able to log in rather then see a white page.
Posted: Thu Feb 07, 2008 10:42 am
by Highland
There's an easier fix still.
1. Make certain php-pear is installed
2. Edit /etc/php.ini and change the following line
to
Code: Select all
include_path = ".:/usr/share/pear"
3. Restart Apache
Not the best of solutions but it works. One possible caveat: I have open_basedir set to none on my main email domains so I do not know if that would interfere with this. But I haven't had to hack any Apache files to make Horde work again under 5.2.5-4
As a side note someone from php.net responded to the bug list today so maybe there's hope of an offical build soon...
Posted: Thu Feb 07, 2008 12:24 pm
by scott
I havent run into any issues with php_admin_value open_basedir, so you're probably OK there.
Posted: Wed Feb 13, 2008 8:13 pm
by jas8522
This problem affects those who are attempting to use register_globals 1 when it is disabled globally - it switches between on and off seemingly random at page loads.
It also affects the use of include_dir in htaccess files. Since we have display_errors disabled globally as these sites are all live, and the include_dir value switches back and forth between custom values and the global vlaue, pages randomly show blank white when the page is loaded
This is really not good, as we have a number of customers with specific include directories specified that continue to flash between their site and a blank white page!
Is there any chance of getting that new patch applied? The PHP dev team appears to not care too much that this problem exists based on the comments in that ticket.
Thanks,
Jordan
Posted: Thu Feb 14, 2008 12:39 am
by scott
Its on my list, but to be honest I have so much other work ahead of it right now I don't see getting to it any time soon. The last time I did it, I had a near catastrophe on my hands.
This is the kind of thing that needs a lot of testing.
can we just get the old rpms?
Posted: Sun Feb 17, 2008 11:57 pm
by rspurlock
Scott,
From what I gather, the easiest fix for this is to go back to 5.2.4...So can you just put up the old RPMs for us to grab? I tend to break things when I don't use your RPMs. If you can't put them back up, can anyone share their 5.2.4 RPMs so I can get rid of this daily headache?
TIA,
Rob
Posted: Mon Feb 18, 2008 10:04 am
by scott
How I successfully rolledback php
Posted: Mon Feb 18, 2008 6:48 pm
by izooxman
Thank you all for posting and helping. I was baffled and was able to successfully rollback my php version to one prior to php 5.2.5 which solves the php_admin_value issues altogether. This is what I did:
Code: Select all
# cd /var/cache/yum/atomic
# rpm -Uvh --oldpackage php*[package version prior to 5.2.5 (must be in /var/cache/yum/atomic)]*
# /etc/init.d/httpd stop
# /etc/init.d/httpd start
* Notes: My plesk software version is 8.3.0, in case anyone wants to know.
** Notes: I had php-5.2.3 on my machine from previous upgrades.
After this all broken sites as well as horde webmail worked like a charm.
_____________________________________________________________
Matthew Scalf
izoox - a soldier in the fight for a pain free web.
Posted: Sun Feb 24, 2008 12:54 am
by rspurlock
Hi Matthew,
Would you be willing to make available the previous php versions you had already? I'm looking for an older version I can roll back to. The concensus is to create them from source but I am certain it will lead to disaster. PM me if you are willing to put them up so I can grab them.
TIA,
Rob
Building from source
Posted: Sun Feb 24, 2008 1:14 am
by jas8522
Building from his source RPM's was actually quite easy.. just download them, and run rpmbuild --rebuild <filename>
Then once they are built go to the build dir and run rpm -Uvh <filename> --force
You can obviously replace filename with wildcards like *.art.rpm (or however they end). I'm pretty sure that was all I had to do...
Posted: Sun Feb 24, 2008 10:16 am
by scott
heres another shortcut, use yum-builddep to automatically install all the dependencies you need to build it.
Posted: Sun Feb 24, 2008 10:27 am
by breun
If you don't have yum-builddep install the yum-utils package.
Posted: Mon Mar 03, 2008 11:37 pm
by andrewkhunn
Semi-relevant to the direction of this topic (although I apologize that it's a bit off the mark): I have a patch for PHP (
http://php-fpm.anight.org/) that I would like to apply to the latest SRPM (php-5.2.5-4.art.src.rpm). I have downloaded the SRPM and php.spec, the patch, and used yum-builddep on the SRPM.
Could anyone walk me through what I might need to do to actually rebuild the package with the patch applied?