PDA

View Full Version : Absolute_Path + Images_Dir



slamp
07-26-2005, 12:59 AM
Here are the options related to my problem.

$OPTION['Absolute_Path'] = "/var/www/htdocs/counter/"; this is from abs.php

$OPTION['Images_Dir'] = "images/default/";

$OPTION['Image_ext'] = ".jpg";


I am getting the following error.

[Tue Jul 26 00:56:57 2005] [error] [client x.x.x.x] File does not exist: /var/www/htdocs/var/www/htdocs/counter/images/default/3.jpg

Images do not show. Text counter works fine.

Any suggestions?

Patrick
07-26-2005, 11:00 AM
This was posted about earlier.

Just make your images path absolute.

ex:

/var/www/htdocs/counter/images/default/

slamp
07-26-2005, 12:02 PM
I tried that already.

File does not exist: /var/www/htdocs/var/www/htdocs/counter/images/default/9.jpg


"/var/www/htdocs/" appeared twice. it seems the code below still executes even if file do exist. i think that is why /var/www/htdocs/ is appearing twice.

// Attempt to fix image url if broken by default
if (!file_exists($OPTION['Images_Dir'].'0'.$OPTION['Image_ext']))
$OPTION['Images_Dir'] = $OPTION['Absolute_Path'].$OPTION['Images_Dir'];


file test.

/var/www/htdocs/counter: $ ll images/default/0.jpg
-rw-r--r-- 1 root root 842 2003-06-05 22:50 images/default/0.jpg

Patrick
07-26-2005, 04:03 PM
Yeah, this has been posted about before.

You can just remove the code you listed if you want.