Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > MISCELLANEOUS > Archives > Bug Report 1.4.x

Post Reply
 
Thread Tools
  #1  
Old 11-30-2005, 11:26 AM
lemuelf Offline
forum loafer
 
Join Date: Nov 2005
Posts: 2
Incorrect detection of $images_path in includes/create_tables.php during installation

Not a serious problem, since it seems that I'm the only one having this kind of setup, but I think it's better if we could also eliminate this...

I am setting up pixelpost for a friend and I downloaded version 1.4.3 and installed it on our test server here at work, for my friend to try it first before installing in his own webspace.

We are using apache2's mod_userdir, which means that each user on our server has their own 'document_root' in their own homes. On our current setup it's the 'public_html' subdirectory and it is accessible thru a URI like http://example.org/~lemuelf. I followed the installation instructions and after logging in as the admin user and tried posting a photo, it went through _without any errors_ but no photo got uploaded and no entry in the database. I checked the configs and found that the images path was set to '/srv/www/htdocs/~lemuelf/pixelpost_1.4.3/images/', which I have to change then to '/home/lemuelf/public_html/pixelpost_1.4.3/images/' to make posting photos work.

Although, this kind of setup is rare and the problem can be easily fixed by changing the configuration settings, I'd like to suggest a little modification in the $images_path detection code in the 'includes/create_tables.php' script so it will also work in a server setup just like ours (and those that don't have the scripts and 'images' directory under the 'document_root', like 'alias' setups) immediately after running the install script.

In the function 'Set_Configuration()' in 'includes/create_tables.php'
replace lines 147-150:
PHP Code:
$images_path $_SERVER['DOCUMENT_ROOT'];
$images_path .= $_SERVER['SCRIPT_NAME'];
$images_path pathinfo($images_path);
$images_path $images_path['dirname']; 
with
PHP Code:
$images_path realpath('./'); 
(not sure if function 'realpath' works in windows, though. We only have GNU/Linux boxes )

or, if realpath doesn't work, in lines 147-148 instead of
PHP Code:
$images_path $_SERVER['DOCUMENT_ROOT'];
$images_path .= $_SERVER['SCRIPT_NAME']; 
change it to
PHP Code:
$images_path $_SERVER['SCRIPT_FILENAME'
which is the real filesystem path of the script file. (Check the output of phpinfo() to see if the 'SCRIPT_FILENAME' variable is available with other web servers, we only have apache2 )
Reply With Quote
  #2  
Old 11-30-2005, 12:10 PM
tinyblob's Avatar
tinyblob Offline
team pixelpost
 
Join Date: Nov 2005
Location: scotland
Posts: 523
Lemuelf, excellent bug report.. Pixelpost would be running really smooth if everyone was as helpful as you.

I still don't have my "lab" up and running fully, so it'll be a while before i can run cross platform tests, but with the information you've provided one of us will fix the issue. It'll be in v1.5, or a subsequent patch.

Unless this issue has already been resolved - guys?
__________________
touchnothing.net
Reply With Quote
  #3  
Old 11-30-2005, 12:10 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
thanks!
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #4  
Old 11-30-2005, 03:12 PM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via MSN to Joe[y]
SCRIPT_FILENAME is a-ok on PHP Version 4.3.11 running on Apache/1.3.33 (Unix)
Reply With Quote
  #5  
Old 12-01-2005, 01:47 AM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
man...i wish we god bug reports this detailed all the time
__________________
i should say more clever stuff
Reply With Quote
  #6  
Old 12-01-2005, 10:48 AM
lemuelf Offline
forum loafer
 
Join Date: Nov 2005
Posts: 2
Thumbs up

No problem. It's a personal itch that really needs some scratching.

I'll contribute more when I come across some other bugs.

Anyway, thank you for the great software, guys! It's really nice to find an _opensource_ blog made specifically for photos
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 02:24 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs