PDA

View Full Version : PHP5 does not work with pp1.4.2


Belgarion
09-16-2005, 06:24 AM
PHP5 and Pixelpost 1.4.2 does not work (atleast not for me)

At first i just got a blank firstpage, the error.txt that is generated by php didn't show up yesterday so i didn't know what was wrong, today i found error.txt and it says [15-Sep-2005 18:55:45] PHP Fatal error: Only variables can be passed by reference in index.php on line 797
I temporarily "fixed" it by uncommenting the whole "suck in addons" thing, just so i could actually see how pixelpost looked, but i still get the same error when pp tries to generate thumbnails.[16-Sep-2005 08:17:07] PHP Notice: Use of undefined constant IMAGE_BASE - assumed 'IMAGE_BASE' in pixelpost\includes\functions.php on line 51
[16-Sep-2005 08:17:07] PHP Fatal error: Only variables can be passed by reference in pixelpost\includes\functions.php on line 54

Also the addons page is empty
[16-Sep-2005 08:20:02] PHP Notice: Undefined index: x in \admin\index.php on line 135
[16-Sep-2005 08:20:02] PHP Notice: Undefined index: x in \includes\12cropimageincscripts.php on line 30
[16-Sep-2005 08:20:02] PHP Notice: Undefined variable: login in \admin\index.php on line 197
[16-Sep-2005 08:20:02] PHP Fatal error: Only variables can be passed by reference in \admin\index.php on line 524

http://blog.belgarion.com/pixelpost/index.php You are running version 1.4.2 of Pixelpost. Released 18 July 2005.
Host Information
PHP-version 5.0.5 (Pixelpost's min requirement: PHP version 4.3.0)
MySQL version 4.1.14-nt (Pixelpost's min requirement: MySQL 3.23.58)
GD-lib bundled (2.0.28 compatible) with JPEG support
Server software Apache/2.0.52
EXIF Pixelpost is using exifer v1.5 for EXIF information.
Paths
Guessed imagepath: C:/Inetpub/wwwroot/blog.belgarion.com//pixelpost/images/
Configured Imagepath C:/Inetpub/wwwroot/blog.belgarion.com//pixelpost/images/
Image Directory: OK - Can we write to the directory? YES.
Thumbnails Directory: OK - Can we write to the directory? YES.
Language Directory: OK
Addons Directory: OK
Includes Directory: OK
Templates Directory: OK
lots of quotes sorry, maybe this should have been posted in the bug forum but i suspect i might have configured something wrong

raminia
09-16-2005, 07:02 AM
1) read
http://bugs.php.net/bug.php?id=33643

2) some solution
modify the code in index.php 793-804 from $dir = "addons/";
if($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if($file != "." && $file != "..") {
$ftype = strtolower(end(explode('.', $file)));
if($ftype == "php") {
include($dir.$file);
}
}
}
closedir($handle);
}
to
$dir = "addons/";
if($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if($file != "." && $file != "..") {
$file_exploded = explode('.', $file);
$file_ext = end($file_exploded);
$ftype = strtolower($file_ext);
if($ftype == "php") {
include($dir.$file);
}
}
}
closedir($handle);
}

raminia
09-16-2005, 07:05 AM
and similary inside admin/index.php
change line 524 form

$ftype = strtolower(end(explode('.', $file)));

to

$file_exp = explode('.', $file);
$file_ext = end($file_exp);
$ftype = strtolower($file_ext);



@Dev
0) change this in CVS
1) move this to bugs forum.

raminia
09-16-2005, 07:14 AM
again for create thumbs
inside includes/functions.php replace
$ext = strtolower(end(explode('.', $image_path)));
with

$image_path_exp = explode('.', $image_path);
$image_path_end = end($image_path_end);
$ext = strtolower($image_path_end);

Belgarion
09-16-2005, 08:06 AM
Thank you, that solved most of the problems. I still get undefined indexes but that's not important since the main functionality of the application is resolved. Again, thank you for helping :)

GeoS
09-16-2005, 08:07 AM
Try to turn of PHP notices in PHP.INI and problem will be solved :D

HypeXR
10-03-2005, 03:27 AM
I am having a similar problem. I just upgraded to PHP 5.0.5.
When index.php loads it is blank. And the sources loos like:

<html><body></body></html>

I tried upgrading to Pixelpost 1.4.2 but this did not help.

After my upgrades I was getting the
PHP Fatal error: Only variables can be passed by reference
error in admin/addons but I made the changes above and this problem is fixed.

All of my other php programs are working so I am not sure if this is a problem with my php upgrade or pixelpost.
php hasn't generated any errors from loading index.php so I do not have any to post.

Any help would be hugely appericated!

blinking8s
10-03-2005, 04:24 AM
ramin you want this moved to the bugs forum?

HypeXR
10-03-2005, 06:30 AM
I've just downgraded to the version of php that I was previously using and I am still haveing the same problem with a blank index.php page. Very strange.

HypeXR
10-03-2005, 07:03 AM
Downgrading my php to 5.0.4 (what I was using) and then reverting to my backup of pixelpost before I upgraded it or made the mods above got me back online.

raminia
11-21-2005, 06:48 PM
ramin you want this moved to the bugs forum?
yes!:)