help im a newbie with php/apache and need help!

Problems with the Windows version of XAMPP, questions, comments, and anything related.

help im a newbie with php/apache and need help!

Postby midgetbob » 25. October 2003 15:42

I just started to experiment with php scripting, and whenever i try to access an image file or directory, i get errors. Like this code:

for ($row=0; $row < $num_rows; $row++){
print("<tr>\n");
for ($col=0; $col < $photos_per_row; $col++){
if($i < $total_photos){
$thumbnail = $thumbnail_dir.trim($photos[$i]);
$thumb_image_size = getimagesize($thumbnail);
$image_size = getimagesize(trim($photos[$i]));
print("<td align=\"center\"><
a href=\"javascript:photo_open('photo_display.php?photo=
".trim($photos[$i])."','".$image_size[0]."','
".$image_size[1]."');\"><img src=\"".$thumbnail.
"\" ".$thumb_image_size[3]."></a></td>\n");
} else {
print("<td></td>\n");
}
$i++;
}
print("</tr>\n");
}


i always get errors that say "cannot access file" or "permission denied to access file". i read elsewhere that there is some permissions set on files (?) that i have to chmod 777... i dont think thats the problem...

is there some read/write restriction setting in apache or php? its not the files that are restricted, thats for sure...

oh yeah, im running win2k

thanks for any help!
midgetbob
 

umm...

Postby MAGnUm » 26. October 2003 01:24

i think your script has a configuration section that you have neglected to modify for instance $thumbnail_dir is probably defined in a configuration file somewhere and should be something like
Code: Select all
$thumbnail_dir = 'C:\path_to_WAMPP\Wammp\htdocs\directory_name';


this seems like a simple image gallery script you got from hotscripts or something if i am not right, or you are still confused you might want to post a link to it w/ your reply. oh and by the way chmod does not exist on windows.
~~:M A G n U m:~~
(Disclaimer: if any of this info is confusing or vague tough, its free!!)
User avatar
MAGnUm
 
Posts: 151
Joined: 16. October 2003 18:08
Location: USA


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 120 guests