PHP programmers out there?

Pope Viper

This ghoul has seen it all
Orderite
Anyone out there have any PHP coding experience?

I've got a problem that I think is simple, but I'm not sure what it is.

I've got a piece of code that does banner rotations, and it works fine under PHP 5.2.9, put it under 5.3.0, and it craters, and I have no idea why.

Anyone able to help a brutha out?
 
That sounds like rather simple code. Please post the snippet and the error message you get under php 5.3.0.

Did you just update php or changed any other server configuration parameter as well?
 
I just upgraded PHP.

I don't get an error, the banners just don't appear.

Here's the code:


Code:
<php> 0) { $img = $folder . $fid . ".png"; }
	if (!file_exists($img) && $pid > 0) { $img = $folder . $pid . ".png"; }

// VALIDATE CURRENT IMAGE DATA, RANDOMIZE
	if (!file_exists($img)) {
		$fileList = array();
		$handle = opendir($folder);
		while (false != ($file = readdir($handle))) {
			$fileInfo = pathinfo($file);
			if (isset($extList[strtolower($fileInfo['extension'])])) {
				$fileList[] = $file;
			}
		}
		closedir($handle);
		if (count($fileList) > 0) {
			$imageNumber = time() % count($fileList);
			$img = $folder.$fileList[$imageNumber];
		}
	}

// POST CURRENT IMAGE DATA TO QUERY FETCH
	$imageInfo = pathinfo($img);
	$contentType = 'Content-type: '.$extList[$imageInfo['extension']];
	header ($contentType);
	readfile($img);
?>
 
Back
Top