jabbyjim
07-19-2011, 06:19 PM
I really believe I have gone through all the steps, but my php is returning no errors, or any out put at all.:confused: I'm trying to do the following exercise:
http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm
what I noticed was that it wasn't working, so I decided to go directly to my .php file and got absolutely no output at all. Pretty frustrating
(see for yourself)
http://www.oldpcgaming.com/test/pics/getalbumpics.php
I try the same script located on dynamic's sample and I get expected results
http://www.dynamicdrive.com/dynamicindex4/phpgallery/getalbumpics.php
so I configured php.ini on my server to show error logs, and I see nothing, now what? the error log isn't populating with anything, and I even tried a error_reporting(E_ALL) command but I barely understand how to use it.
I made a info.php in the same directory to test to see if php was working at all (and it appears that it is)
http://www.oldpcgaming.com/test/pics/info.php
I am at a complete loss, any help from the php experts?
<?php
error_reporting(E_ALL);
?>
<?
Header("content-type: application/x-javascript");
function returnimages($dirname=".") {
$pattern="\.(jpg|jpeg|png|gif|bmp)$";
$files = array();
$curimage=0;
if($handle = opendir($dirname)) {
while(false !== ($file = readdir($handle))){
if(eregi($pattern, $file)){
$filedate=date ("M d, Y H:i:s", filemtime($file));
echo " [$curimage, \"$file\", \"$filedate\"],\n";
$curimage++;
}
}
echo " [\"placeholder\"]\n";
closedir($handle);
}
return($files);
}
$photovar=$_GET['id'];
if (!eregi("^[a-zA-Z0-9_]+$", $photovar)){
echo "alert(\"Photo Album ID must contain only letters, numbers, or underscore, and cannot start with a number\")";
die();
}
echo "var $photovar={\n";
echo " baseurl: \"http://" . $_SERVER["SERVER_NAME"] . dirname($_SERVER['PHP_SELF']) . "/\",\n";
echo " images: [\n";
returnimages();
echo " ],\n";
echo " desc: []\n";
echo "}\n";
?>
http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm
what I noticed was that it wasn't working, so I decided to go directly to my .php file and got absolutely no output at all. Pretty frustrating
(see for yourself)
http://www.oldpcgaming.com/test/pics/getalbumpics.php
I try the same script located on dynamic's sample and I get expected results
http://www.dynamicdrive.com/dynamicindex4/phpgallery/getalbumpics.php
so I configured php.ini on my server to show error logs, and I see nothing, now what? the error log isn't populating with anything, and I even tried a error_reporting(E_ALL) command but I barely understand how to use it.
I made a info.php in the same directory to test to see if php was working at all (and it appears that it is)
http://www.oldpcgaming.com/test/pics/info.php
I am at a complete loss, any help from the php experts?
<?php
error_reporting(E_ALL);
?>
<?
Header("content-type: application/x-javascript");
function returnimages($dirname=".") {
$pattern="\.(jpg|jpeg|png|gif|bmp)$";
$files = array();
$curimage=0;
if($handle = opendir($dirname)) {
while(false !== ($file = readdir($handle))){
if(eregi($pattern, $file)){
$filedate=date ("M d, Y H:i:s", filemtime($file));
echo " [$curimage, \"$file\", \"$filedate\"],\n";
$curimage++;
}
}
echo " [\"placeholder\"]\n";
closedir($handle);
}
return($files);
}
$photovar=$_GET['id'];
if (!eregi("^[a-zA-Z0-9_]+$", $photovar)){
echo "alert(\"Photo Album ID must contain only letters, numbers, or underscore, and cannot start with a number\")";
die();
}
echo "var $photovar={\n";
echo " baseurl: \"http://" . $_SERVER["SERVER_NAME"] . dirname($_SERVER['PHP_SELF']) . "/\",\n";
echo " images: [\n";
returnimages();
echo " ],\n";
echo " desc: []\n";
echo "}\n";
?>