1.4.4-pl4 and PHP 4.3.10 bug?

Zhen-Xjell

Joined: 2004-12-17
Posts: 8
Posted: Fri, 2004-12-17 04:10

Ok, I just upgraded to PHP 4.3.10 and Gallery stopped working. Nothing shows up. I disabled it for now, but I had display errors on, etc, and nothing but a white page. On configure screen mode (Gallery/setup) the whole page was not coming up. The documentation, help, etc links rendered, the second table appeared, but no configuration data showed up.

Under 4.3.9 all worked well. Coincidence?

I have checked to see if there might have been a successful hack attack, but nothing indicates such.

----
Gallery URL (optional but very useful): http://castlecops.com/modules.php?name=Gallery
Gallery version: 1.4.4-pl4
Apache version: n/a
PHP version (don't just say PHP 4, please): 4.3.10
Graphics Toolkit: netbpm
Operating system: Redhat
Web browser/version (if applicable): FF and IE

=========
EDIT: I changed the pl3 to pl4, which is the correct version I'm working with.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Fri, 2004-12-17 09:16

Upgrade to 1.4.4-pl4 and see if that helps.

 
Zhen-Xjell

Joined: 2004-12-17
Posts: 8
Posted: Fri, 2004-12-17 13:25

My apologies, I checked the source file and it already:

gallery-1.4.4-pl4.tar.gz

Wrong copy/paste last night. I copied off your homepage instead of my filesystem.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Fri, 2004-12-17 13:27

Strange, anything in your apache error_logs?

 
Roptaty

Joined: 2004-12-17
Posts: 8
Posted: Fri, 2004-12-17 16:19

I am experiencing the same problem with gallery1-cvs. This seems to be a problem with php 4.3.10. The easy way out is to downgrade to the earlier version of php, and the hardest is to modify the source of gallery.

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Fri, 2004-12-17 17:17

Hi,

i installed PHP 4.3.10 have no problems with 1.4.4-pl4 and 1.5-cvs.

So i dont think its a PHP or Gallery issue.

Jens

 
Roptaty

Joined: 2004-12-17
Posts: 8
Posted: Fri, 2004-12-17 19:46

Well, downgrading to php 4.3.9 solved it for me.

The source of these warning messages is indexing in arrays.
if (!empty($_REQUEST[$sensitive])) {

This indexing results in a warning message on my homepage. Using prefixing and postfixing $sensitive with " doesn't give me that warning message.

 
Zhen-Xjell

Joined: 2004-12-17
Posts: 8
Posted: Fri, 2004-12-17 22:26

@Roptaty, that is plenty more than I get. No errors show at all via php's display errors. I ensured that errors were also allowed to be displayed.

The error log shows that the following were not able to be found:

modules/Gallery/docs/themes
modules/Gallery/docs/images/topics

Other errors too like that, but they are all pointing to the docs container. Rest assured they exist and apache has access to them.

With 4.3.9 Gallery worked. 4.3.10, it doesn't.

Outside of the reply above, an idea came to me...

I haven't checked the code yet, but are you checking for php version 4.3.1? Perhaps it is getting confused with 4.3.10?

Or indeed, something changed in 4.3.10 which is breaking Gallery, as Roptaty above has verified.

I had even tried doing a fresh installation from scratch. Nothing, no go. Dead in the water.

And due to the remote threats in PHP 4.3.9, I'm not downgrading. 4.3.9 allows for remote access execution of local arbitrary files. Not good at all.

 
Roptaty

Joined: 2004-12-17
Posts: 8
Posted: Fri, 2004-12-17 23:22

I've might found a solution. The Zend Optimizer might be the evil monkey here. This is however not tested by me, since I dont have the necessary access to the server to perfom this upgrade. Can someone confirm this?

http://bugs.php.net/bug.php?id=31108

 
Zhen-Xjell

Joined: 2004-12-17
Posts: 8
Posted: Fri, 2004-12-17 23:40

Interesting find. I have 2.5.5 running right now. I utilize ZendPerformanceSuite with acceleration and caching for CastleCops. I see 2.5.7 is now available:

http://zend.com/store/free_download.php?pid=13

I'll try that soon as I get a moment to breathe and report back. Roptaty, can you confirm what version of Optimzer you are using?

I don't know your skill level, so just in case I don't return soon, a simple php script can be used to obtain it:

<?php phpinfo(); ?>

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Fri, 2004-12-17 23:41
Quote:
Note: Zend Optimizer users will need to upgrade to the latest version in order for it to work with PHP 4.3.10.

Sounds reasonable.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sat, 2004-12-18 02:56

Right, dmolavi (a gallery team member) had the same problem. Zend was the issue.

 
Roptaty

Joined: 2004-12-17
Posts: 8
Posted: Sat, 2004-12-18 11:05

Zhen-Xjell, my webhost is running Zend Optimizer 2.5.5. I've sent them a link to the bug report.

 
Zhen-Xjell

Joined: 2004-12-17
Posts: 8
Posted: Sat, 2004-12-18 14:15

Isn't this a bugger. Optimizer is now at 2.5.7, but ZPS is disabled because of it. And, Gallery is still not working. I go into setup mode, resetadmin, and this is the only thing I get back:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Gallery Configuration</title>
	<meta http-equiv="content-style-type" content="text/css">
  <meta http-equiv="content-type" content="Mime-Type; charset=ISO-8859-1">
  <meta name="content-language" content="en-US">

  <link rel="stylesheet" type="text/css" href="http://castlecops.com/modules/Gallery/css/config.css.default">
	<script language="JavaScript" type="text/javascript">
        <!--

	function localGetElementsByTagName(tagName) {
		var eleArray;
		if (window.opera) eleArray = document.body.getElementsByTagName(tagName);
		else if (document.getElementsByTagName) eleArray = document.getElementsByTagName(tagName);
		else if (document.all) eleArray = document.all.tags(tagName);
		else if (document.layers) {
			eleArray = new Array();
			nnGetAllLayers(window, eleArray, 0);
		}
		return eleArray;
	}

	function nnGetAllLayers(parent, layerArray, nextIndex) {
		var i, layer;
		for (i = 0; i < parent.document.layers.length; i++) {
			layer = parent.document.layers[i];
			layerArray[nextIndex++] = layer;
			if (layer.document.layers.length) nextIndex = nnGetAllLayers(layer, layerArray, nextIndex);
		}
		return nextIndex;
	}

	function enableButtons() {
		var buttons = localGetElementsByTagName("input");

		var i = 0;
		while (buttons[i]) {
			if (buttons[i].type == "submit" || buttons[i].type == "button") {
				buttons[i].disabled = false;
			}
			i++;
		}
	}

	-->
	</script>

</head>

<body dir="ltr" onload="enableButtons()">

<form method="post" action="index.php" name="config">

<input type="hidden" name="this_page" value="check">
<input type="hidden" name="next_page" value="constants">

<div class="header">Gallery Configuration Wizard: Step 1</div>

<div class="sitedesc">
This is the Gallery system check page.  This page will validate your installation to make sure that you have all the necessary components and permissions on this system and that everything is configured reasonably.<p>
Having problems?  Try the <a class="" style="white-space:nowrap;" href="http://castlecops.com/modules/Gallery/docs/index.html">[documentation]</a>, <a href="diagnostics.php">Gallery Diagnostics Page</a> and <a href="http://gallery.sourceforge.net/help.php">Gallery Help Page</a>.</p>
</div>

<p />

 
	<table class="inner" width="100%">
	<tr>
		<td class="desc" width="50%" valign="top"></td>
		<td width="5%">&amp;</td>
		<td class="desc" valign="top">

Same problem as before, the page gets cut off.

4.3.10
2.5.7

No go. I'm going to see if there is a new ZPS version, I'm at 4.0.2.

 
Zhen-Xjell

Joined: 2004-12-17
Posts: 8
Posted: Sat, 2004-12-18 14:34

Update... when running phpinfo from the CLI it says the above, but from the web it doesn't. It shows something different, and thus I've opened a ticket at Zend.com, pointing them here and the PHP bug report.