Images that are supposed to be converted are not displayed
(all non-original images).
This is problem since
v1.5 of showpic.php
The code:
$renamethis = "$convert $new_width $new_height
\"$cache_base\" \"$newalbum\" \"$source\" \"$dest\" 2>&1";
system(escapeshellcmd($renamethis));
causes the quotes to be escaped in the shell so
the command becomes:
./convert 100 67 \"cache\" \"2000,11,01-23
USSPortRoyal-Tahiti/LowResTahiti\"
\"/home/rvaughn/public_html/phpix3/albums/2000,11,01-23
USSPortRoyal-Tahiti/LowResTahiti/661B_007.jpg\"
\"cache/2000,11,01-23
USSPortRoyal-Tahiti/LowResTahiti/661B_007.jpg__scaled_100.jpg\"
2\>\&1
Replacing that code with the following accomplishes the
escapeshellcmd and allows for spaces in the directory
names:
$renamethis = escapeshellcmd("$convert $new_width
$new_height ").
"\"".escapeshellcmd($cache_base)."\" ".
"\"".escapeshellcmd($newalbum). "\" ".
"\"".escapeshellcmd($source).
"\" ".
"\"".escapeshellcmd($dest).
"\" 2>&1";
$last_line = system($renamethis);
Logged In: YES
user_id=165392
Hmn... that does not work for filenames that have an '&' in
it....
the '&' is being double escaped.....
Logged In: YES
user_id=165392
Ok, this seems to work, it both properly converts the pictures
and properly (I hope) escapes the special characters:
$renamethis =
escapeshellcmd("$convert $new_width $new_height ").
escapeshellarg($cache_base). " ".
escapeshellarg($newalbum). " ".
escapeshellarg($source). " ".
escapeshellarg($dest)." 2>&1";
system($renamethis);