Bug 548548 - gallery2 web upgrade step fails because of php 5.3 deprecation errors
Summary: gallery2 web upgrade step fails because of php 5.3 deprecation errors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gallery2
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-17 18:46 UTC by Scott Shambarger
Modified: 2010-01-08 20:00 UTC (History)
2 users (show)

Fixed In Version: 2.3.1-1.fc12
Clone Of:
Environment:
Last Closed: 2010-01-08 20:00:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Scott Shambarger 2009-12-17 18:46:21 UTC
Description of problem:
/gallery2/upgrade process fails because deprecation errors prevent cookie from being set after authentication step.

Version-Release number of selected component (if applicable):
2.3-15.fc12

How reproducible:
Always with PHP 5.3 installed

Steps to Reproduce:
Follow the upgrade process suggested by the rpm package install script at <website>/gallery2/upgrade.  Notice the deprecated function warnings in the webpage, which should not be there if /etc/php.ini has error_reporting set to 'E_ALL & ~E_DEPRECATED' Once you complete the authentication step, you are returned to the first step of the process.
  
Additional info:
Gallery 2.3 actually lists PHP 5.3 as incompatible, but php.ini is set up with E_DEPRECATED disabled, the product appears to work well.  However, the upgrade (and probably initial setup) procedures fail because they enable more complete error reporting.

To work around the problem, I patched modules/core/classes/Gallery.class:
@@ -662,7 +662,7 @@
 	}
 	if (!empty($this->_debug)) {
 	    /* PHP 6 includes E_STRICT in E_ALL. Hardcode since PHP 4 does not know that constant */
-	    error_reporting(E_ALL &~ 2048);
+	    error_reporting(E_ALL &~ (2048|E_DEPRECATED));
 	    ini_set('display_errors', 1);
 	    ini_set('log_errors', 1);
 	    ini_set('short_open_tag', false);

This change supresses the deprecation errors, and allows the upgrade to complete as normal.

Comment 1 Gwyn Ciesla 2009-12-17 18:56:17 UTC
Thanks for the patch.  There may be a release to 2.3.x coming out soon to fix this.  If not, I'll patch myself.

Comment 2 Fedora Update System 2009-12-18 21:05:25 UTC
gallery2-2.3.1-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/gallery2-2.3.1-1.fc12

Comment 3 Fedora Update System 2009-12-22 04:54:38 UTC
gallery2-2.3.1-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gallery2'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-13508

Comment 4 Fedora Update System 2010-01-08 20:00:10 UTC
gallery2-2.3.1-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.