fcollman
08-08-2005, 02:41 PM
I this weekend I've been trying to install pixelpost on my new windows webserver machine and I came across a number of issues... some of which I have sorted out.. others which still leave me confused.
first my photblog is located at http://fcollman2.student.princeton.edu/photoblog/
my general info is:
PHP-version 5.1.0b3 (Pixelpost's min requirement: PHP version 4.3.0)
MySQL version 4.1.13a-nt (Pixelpost's min requirement: MySQL 3.23.58)
GD-lib bundled (2.0.28 compatible) with JPEG support
Server software Apache/2.0.54 (Win32) PHP/5.1.0b3
EXIF Pixelpost is using exifer v1.5 for EXIF information.
Paths
Guessed imagepath: C:/Program Files/Apache Group/Apache2/htdocs/photoblog/images/
Configured Imagepath C:/Program Files/Apache Group/Apache2/htdocs/photoblog/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
-----
When I first installed pixelpost I was able to get onto the admin section but the main page was blank. I looked around, discovered a few things weren't configured right in php.. i had to load some extensions that weren't loaded .. ie php_exif, php_gd2, and php_mbstring. I did that and still got a blank page and in the admin section i wasn't getting any thumbnails. I configured PHP to show me errors in a logfile and discovered a bunch of errors.. most of them were the undefined variables warnings like PHP_SELF which i take aren't a big deal, but I also got some errors.. for instance it didn't like all the lines like this in functions.php and in cropimage12.php
$ext = strtolower(end(explode('.', $image_path)));
saying that you could only pass variables as references... i did a little googling and deduced that the problem was nesting all those functions like that.. http://propel.phpdb.org/trac/ticket/71 . so i took the explode statement out, made it return to some other variable then stuck it in.
It also didn't like
define(IMAGE_BASE, "../images");
$image_path = IMAGE_BASE . "/$file";
apparently
define("IMAGE_BASE", "../images");
$image_path = IMAGE_BASE . "/$file";
is the way that it is suppose to be used according to php's website... (http://www.php.net/define) maybe this changed in the latest version? or the windows build is less forgiving than the other builds?
So after I fixed those problems I was able to get thumbnails in the admin section but still no front page. So i turned my attention to the index.php page.. which apparently wasn't generating any errors but I still was getting not page. So working my way through the code I figured out the variable $tmp was basically storing the whole page and the code replaces the tags and inserts things as you go. So i started trying to probe $tmp to see what was going on.. and boom.. as soon as I put in a random echo $tmp statement in the code i started seeing the page, of course with some things not replaced yet when i had it to far up. So i tried moving it down and down, and eventually I got everything displayed, but it has the "Thank you for visiting and taking the time to comment on a picture. Please click to be transferred back." message at the bottom. This is obviously a hack.. and I was hoping some people who have a better idea what is going on with the code could help me figure out what's wrong.
I put the orginal index.php as index2.php in the same directory so you can see that it is indeed not working.
oh.. and one other thing.. in the exifier code, if the server isn't configured to allow short tags than it spews out half of the exifier code instead of the page... there's no reason exifier shoudln't just use a <?php tag instead of <?.. its just another way to have something break in a confusing way for people.
first my photblog is located at http://fcollman2.student.princeton.edu/photoblog/
my general info is:
PHP-version 5.1.0b3 (Pixelpost's min requirement: PHP version 4.3.0)
MySQL version 4.1.13a-nt (Pixelpost's min requirement: MySQL 3.23.58)
GD-lib bundled (2.0.28 compatible) with JPEG support
Server software Apache/2.0.54 (Win32) PHP/5.1.0b3
EXIF Pixelpost is using exifer v1.5 for EXIF information.
Paths
Guessed imagepath: C:/Program Files/Apache Group/Apache2/htdocs/photoblog/images/
Configured Imagepath C:/Program Files/Apache Group/Apache2/htdocs/photoblog/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
-----
When I first installed pixelpost I was able to get onto the admin section but the main page was blank. I looked around, discovered a few things weren't configured right in php.. i had to load some extensions that weren't loaded .. ie php_exif, php_gd2, and php_mbstring. I did that and still got a blank page and in the admin section i wasn't getting any thumbnails. I configured PHP to show me errors in a logfile and discovered a bunch of errors.. most of them were the undefined variables warnings like PHP_SELF which i take aren't a big deal, but I also got some errors.. for instance it didn't like all the lines like this in functions.php and in cropimage12.php
$ext = strtolower(end(explode('.', $image_path)));
saying that you could only pass variables as references... i did a little googling and deduced that the problem was nesting all those functions like that.. http://propel.phpdb.org/trac/ticket/71 . so i took the explode statement out, made it return to some other variable then stuck it in.
It also didn't like
define(IMAGE_BASE, "../images");
$image_path = IMAGE_BASE . "/$file";
apparently
define("IMAGE_BASE", "../images");
$image_path = IMAGE_BASE . "/$file";
is the way that it is suppose to be used according to php's website... (http://www.php.net/define) maybe this changed in the latest version? or the windows build is less forgiving than the other builds?
So after I fixed those problems I was able to get thumbnails in the admin section but still no front page. So i turned my attention to the index.php page.. which apparently wasn't generating any errors but I still was getting not page. So working my way through the code I figured out the variable $tmp was basically storing the whole page and the code replaces the tags and inserts things as you go. So i started trying to probe $tmp to see what was going on.. and boom.. as soon as I put in a random echo $tmp statement in the code i started seeing the page, of course with some things not replaced yet when i had it to far up. So i tried moving it down and down, and eventually I got everything displayed, but it has the "Thank you for visiting and taking the time to comment on a picture. Please click to be transferred back." message at the bottom. This is obviously a hack.. and I was hoping some people who have a better idea what is going on with the code could help me figure out what's wrong.
I put the orginal index.php as index2.php in the same directory so you can see that it is indeed not working.
oh.. and one other thing.. in the exifier code, if the server isn't configured to allow short tags than it spews out half of the exifier code instead of the page... there's no reason exifier shoudln't just use a <?php tag instead of <?.. its just another way to have something break in a confusing way for people.