My additional images stopped showing up at some point.... best I can trace it to is that the directory isn't reading?
I added some debug code to the additional_images folder.
PHP Code:
$d = $products_image_directory;
echo $d.'<br />';
// Open a known directory, and proceed to read its contents
if (is_dir($d)) {
echo "is a directory."."\n";
if ($dh = opendir($d)) {
while (($file = readdir($dh)) !== false) {
echo "filename: $file : filetype: " . filetype($d . $file) . "\n";
}
closedir($dh);
}
}
$d = @dir($products_image_directory) or die("getFileList: Failed opening directory $products_image_directory for reading");
which results in...
"/images/apogee_products/
getFileList: Failed opening directory /images/apogee_products/ for reading"
Now, if i add "DIR_FS_CATALOG." to the code (just above the debug)...
PHP Code:
$products_image_directory = str_replace($products_image, '', substr($products_image, strrpos($products_image, '/')));
if ($products_image_directory != '') {
$products_image_directory = DIR_FS_CATALOG.DIR_WS_IMAGES . str_replace($products_image_directory, '', $products_image) . "/";
} else {
$products_image_directory = DIR_FS_CATALOG.DIR_WS_IMAGES;
}
it gives me the directory /home/***/public_html/beta//images/apogee_products/ which then actually reads as a directory and proceeds with the code, and finds the appropriate additional images. But, it's got that // after beta since DIR_FS_CATALOG ends with a slash and DIR_WS_IMAGES begins with one, which then causes the display image path to be wonky and results in broken images.
Modules installed that may affect things:
IH4
Zen Lightbox 1.7.0 (seems to work fine)
Edify template from themeforest
All file/folder permissions for /images are set to 755.
Some of my main product images are also tiny (using the small size instead of the medium), but I haven't looked into that enough to give you guys more info.
ApogeeRockets.com
beta.apogeerockets.com <-- where i've been testing the above code
Bookmarks