PDA

View Full Version : guessed imagepath vs. configured imagepath?


ellea
05-16-2005, 09:54 PM
hello,

i have upgraded to pixelpost 1.4.1 and noted that my guessed imagepath is different than my configured imagepath. i have scoured through the .php files and while i see where the guessed imagepath code is generated, i am afraid to make any adjustments to it for fear that i'll break it.

here it is:

Guessed imagepath: /www/mydomainname/cgi-bin/images/

Configured Imagepath /home/mydomainname/www/pixelpost/images/

can anyone tell me how to get these two to match up? the configured imagepath is the correct one.

for what it's worth, i never was able to get pixelpost 1.3 to upload individual images, and now i'm guessing this is why - but perhaps not?

i did search through the forum for the answer to this question. while it seems that other people have had problems with the two matching up, i wasn't able to find a thread that explained how to correct the guessed imagepath. if this explanation already does exist and i somehow missed it, point me in the right direction and accept my apologies.

i accessed pixelpost_config (as well as all the other mysql tables) and was not able to find where on earth that guessed image path could be generating a path with cgi_bin in it as it isn't set anywhere.

so i'm completely stumped.

thanks!

Joe[y]
05-17-2005, 07:28 AM
are images not posting then?

what's your domain name?

this is a long shot but try deleteing your cgi_bin if it isn't in use.

ellea
05-17-2005, 07:42 AM
er...my cgi-bin is in use for other stuff, so can't delete it.

my images never did post - i had to use the copy folder addon. it's just with the new version of pixelpost that i thought it might be showing me the reason why it never did work.

http://www.studiodelicious.com/pixelpost/index.php is my url. still a work in progress since i've been trying to figure out what is wrong with pixelpost before i go uploading a gazillion images. the ones that are on there right now were uploaded using the addon.

you can search by my username to see an earlier posting of mine documenting the problem. i since found another person's posting who also had the problem of the image upload not working but also not generating an error. the only problem is that my public_html path is indeed correct - i verfied this in an ssh session.

so i thought perhaps making the guessed imagepath mirror where i am really working is what would solve the problem.

thanks for looking into this for me.

the whole kit and kaboodle:

You are running version 1.4.1 of Pixelpost. Released 24 April 2005.
Latest pixelpost version: Check

Looking for help or want to give feedback, please step into pixelpost forum.
www.pixelpost.org/forum/

Host Information
PHP-version 4.3.2 (Pixelpost's min requirement: PHP version 4.3.0)

MySQL version 4.0.21-standard (Pixelpost's min requirement: MySQL 3.23.58)

GD-lib 2.0 or higher with JPEG support

Server software Apache/1.3.19 (Unix) FrontPage/5.0.2.2510

EXIF Pixelpost is using exifer v1.5 for EXIF information.

Paths
Guessed imagepath: /www/studiodelicious/cgi-bin/images/

Configured Imagepath /home/studiodelicious/www/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

raminia
05-17-2005, 08:41 AM
i accessed pixelpost_config (as well as all the other mysql tables) and was not able to find where on earth that guessed image path could be generating a path with cgi_bin in it as it isn't set anywhere.

the guessed path is generated inside the php code of admin/index.php and nothing to do with config table or other stuff. It is generated at about line 1003 of admin/index.php

I think there is problem with cgi-bin inside path.

GeoS
05-17-2005, 01:28 PM
Did you upload PP to CGI-BIN directory??

If yes (PP probably shouldn't work on) try to move it out of CGI-BIN dir.

ellea
05-17-2005, 05:36 PM
raminia:

what is the expected result if your guessed imagepath doesn't match the configured one? you had offered a while back to go through my site to try to work out why i couldn't post images if i gave you the access info. i think i'm about to do that if this isn't the reason why as i just can't figure it out.

i did see where the guessed path code is - i just couldn't figure out where cgi-bin was derived from:

<i>Guessed imagepath: ";
$guess_path = pullout($_SERVER['DOCUMENT_ROOT']);
$guess_path .= $_SERVER['SCRIPT_NAME'];
$guess_path = pathinfo($guess_path);
$guess_path = $guess_path['dirname'];
$guess_path = eregi_replace("admin","",$guess_path);
echo $guess_path."/images/</i><p />

is dirname or admin set somewhere as cgi-bin? this is where i was stumped.

geos: no, pp was not uploaded to cgi-bin. all the code works except when it comes to uploading images and generating thumbnails. even if it was in cgi-bin, the path would be different than what the guessed imagepath is as my absolute path starts with /home/, not /www/.

any ideas? raminia, if you feel that there's just no way to figure this out without looking at what i've got on my site (and you have the time), let me know.

thanks again!

GeoS
05-17-2005, 07:46 PM
$guess_path = realpath("../images/");


I think that it is better (but sometimes there can be problems :/ ).

ellea
05-17-2005, 08:31 PM
hmmmm. i went ahead and did that and this is what it returned:

Guessed imagepath: /home/www/studiodelicious/pixelpost/images/images/

Configured Imagepath /home/studiodelicious/www/pixelpost/images/

i note that strangely enough, the guessed path is /home/www/studiodelicious/... whereas the configured is /home/studiodelicious/www/... which i find to be strange.

might sound like a stupid question, but if your guessed imagepaths and configured imagepaths don't match up, would this be the cause of me being able to upload my images and generate thumbnails?

thanks!

raminia
05-17-2005, 09:01 PM
yes! this may expain the reason but not the cause!

guessed path is the path pp script seems to be correct but not the configured one. The configured one is the path PP is going to use to generate thumbs and images. if the configured path is not correct the thumbs and images will not be generated!

copy this new guessed path that GeoS provided and paste it inside admin >> options >> General >> image path and then press update button. Now try to upload some photo an see the result.

ellea
05-17-2005, 11:23 PM
ok, i fixed the script that geos provided so that there weren't duplicate image directories. i changed my configured image directory to match the guessed one:

Guessed imagepath: /home/www/studiodelicious/pixelpost/images/

Configured Imagepath /home/www/studiodelicious/pixelpost/images/

still no luck. :(

i have since found that i have two working paths - /home/studiodelicious/www/... and /www/studiodelicious/... at least that is how my host has it set up. i have now made the guessed and configured image paths match up using both geos' code (paths listed above) and the original code (which generates /www/studiodelicious/cgi-bin/images/) and even if they're matching up (and the directory structures are in place with all the correct permissions set) i'm still not having luck with the images posting.

raminia, is the only choice at this point to give you access to my site? any other ideas?

thanks!

raminia
05-18-2005, 10:11 AM
ok if you give me access I'll try to work it out.

ellea
05-18-2005, 05:39 PM
raminia,

i just sent you a pm. let me know if you don't receive it for some reason.

thanks!

raminia
05-18-2005, 08:32 PM
I checked it thoroughly and I looked deep inside codes. I think it is about php.ini of you host. ask you host to set proper values for both pload_max_filesize and post_max_size ans ask them if they know something special about uploading on their servers using php.

In my tests I find out that the $_FILES['userfile'] is empty and actually the array $_FILES is empty too. no error messages! (in php 4.3.0 or above there should be error messages). With this happening no files is uploaded to the tmp address or the it is not saved! It's quite a mistary and your host admin may have more answers than me.

UPDATE:
ask you host admin to enable upload in php.ini

$_FILES is empty or file upload problem
Apr 8th, 2003 03:45
Shawn Garbett, freelance programmer in india

check

1) Whether file upload is enabled in your php.ini.

2) Check whether the temporary upload folder is set correctly in
php.ini file.

ellea
05-19-2005, 12:03 AM
so the hosting service reminded me that i had access to the php.ini file and could do what i wanted with it.

i changed the file upload variable to on and was able to upload an image and generate a thumbnail. amazing! there is no way that this would have occurred to me if it wasn't for you, so i am extremely grateful.

i have set max file sizes but am still concerned about limiting access in this script to the pixelpost script only. do you happen to know of how to do this? would i turn file uploading off with the exception of the pixelpost directory? not sure if this can be done (but suspect so based on what php reading i've done).

thank you again and again!!!