I'm trying to use QuickGallery but each time I load the index page I get the following errors:
The code for this sections is here (lines 62 - 74):
The QuickGallery code can be found here and I havent modified or added the base code.
https://github.com/mojeda/QuickGallery
Any help is appreciated, I'd really like to get this php gallery working it been bugging me for the last few days.
Code:
Warning: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/tyharote:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/tyharote/public_html/cphoto/gallery/index.php on line 65
Warning: opendir(/): failed to open dir: Operation not permitted in /home/tyharote/public_html/cphoto/gallery/index.php on line 65
Warning: readdir() expects parameter 1 to be resource, boolean given in /home/tyharote/public_html/cphoto/gallery/index.php on line 66
The code for this sections is here (lines 62 - 74):
Code:
<?php
$imgdir = $gallery . '/';
$allowed_types = array('png','jpg','jpeg','gif');
$dimg = opendir($imgdir);
while($imgfile = readdir($dimg))
{
if( in_array(strtolower(substr($imgfile,-3)),$allowed_types) OR
in_array(strtolower(substr($imgfile,-4)),$allowed_types) )
{$a_img[] = $imgfile;}
}
$totimg = count($a_img);
for($x=0; $x < $totimg; $x++){ echo "<a href='" . $imgdir . $a_img[$x] . "' rel='gallery'><img src='thumb.php?file=$imgdir".$a_img[$x]."' /></a>"; }
?>
The QuickGallery code can be found here and I havent modified or added the base code.
https://github.com/mojeda/QuickGallery
Any help is appreciated, I'd really like to get this php gallery working it been bugging me for the last few days.