4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Alain on June 17, 2002, 03:44:11 PM
-
Hi, I've activated GZIP feature in the admin. panel and activated in the PHP.INI the php_zlib.dll module and also installed the Apache GZIP dll module but still the Download ZIP button doesn't appear beside the Download button...? Why?
Also the download button works (save as) but if you choose OPEN FROM THE LOCATION and do not want to save it but open it in your browser directly then it is waiting, waiting... and the Apache web server is then unable to load any picture if I come back to my site. As if the connection couldn't be closed...
If no workaround is possible, how to force the user to download the picture and not ask to open from the location?
Thanks!
8)
-
I applied pre-solution http://www.4homepages.de/forum/viewtopic.php?t=606 but this button doesn't want to show up.
:oops:
-
Try this:
includes/functions.php
change:
$target = (get_cfg_var("safe_mode") == 1 || (!empty($image_row['image_download_url']) && !is_remote_file($image_row['image_download_url']))) ? "target=\"_blank\"" : "";
to:
$target = (!empty($image_row['image_download_url']) && !is_remote_file($image_row['image_download_url'])) ? "target=\"_blank\"" : "";
lightbox.php
change:
if (get_cfg_var("safe_mode") == 0 && function_exists("gzcompress") && function_exists("crc32")) {
to:
if (function_exists("gzcompress") && function_exists("crc32")) {
download.php
change:
if (empty($user_info['lightbox_image_ids']) || get_cfg_var("safe_mode") == 1 || !function_exists("gzcompress") || !function_exists("crc32")) {
to:
if (empty($user_info['lightbox_image_ids']) || !function_exists("gzcompress") || !function_exists("crc32")) {
and change:
if (get_cfg_var("safe_mode") == 1 || $remote_url) {
to:
if ($remote_url) {
Greets Jan
-
Still nothing, is there a way to check if my config. is OK for this feature?
-
hi,
i installed today on my win2000 PC:
apache 1.3.24 (from apache.org)
php 4.2.1 (from php.net) (running as CGI binary)
mysql 3.23.51 (from mysql.com)
AND everything working fine for me...
zlib, download from own server, download from remote server, zipping...
ImageMagick, GD, auto resizer, auto thumbnailer...
-
This isn't EasyPHP package :lol:
-
Alain,
come on...
maybe have "EasyPHP package" some bugs ;)
-
I'll try to get rid of this french s*** :twisted:
-
Could you give a step-by-step instruction to install this GZIP support with Apache/PHP?
I've totally switched to the normal Apache/PHP/MySQL system but this button will never show up!!!
:evil:
-
hi,
open your PHP.INI and change:
;extension=php_zlib.dll
to
extension=php_zlib.dll
if you get an error:
change
extension_dir = ./
to
extension_dir = ./extensions
-
I managed to force the download of the picture otherwise if you choose 'Open from location' then it was bugging my web server.
$dlext = ".pix";
if (!empty($file['file_data'])) {
if (eregi("MSIE", getenv("HTTP_USER_AGENT"))) {
$disposition = ($action != "zip" && $action != "lightbox") ? 'attachment' : 'inline';
header("Content-Disposition: $disposition; filename=".$file['file_name']."$dlext\n");
header("Content-Type: application/x-ms-download\n");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: public");
}
elseif (eregi("Opera", getenv("HTTP_USER_AGENT"))) {
header("Content-Disposition: attachment; filename=".$file['file_name']."$dlext\n");
header("Content-Type: application/octetstream\n");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
}
else {
header("Content-Disposition: attachment; filename=".$file['file_name']."$dlext\n");
header("Content-Type: application/octet-stream\n");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
}
header("Last Modified: ".gmdate("D, d M Y H:i:s")."GMT\n");
header("Expires: 0\n");
header("Content-Length: ".$file['file_size']."\n");
if (eregi("Mac", getenv("HTTP_USER_AGENT"))) {
header("Content-Transfer-Encoding: binary\n");
header("Accept-Ranges: bytes\n");
header("Connection: close\n");
}
echo $file['file_data'];
}
The extension .pix is added to make it viewable only if already downloaded :o
[/i]
-
It works now, I thought I shouldn't use the full path to the PHP/ZLIB extension. The lightbox ZIP download is xtra!
I still have this problem when you choose 'Open from location' with a picture, it is waiting, waiting... and then nothing appears... The web server is not usable anymore and I have to close the Windows session to make it usable again... :oops:
-
hi,
i'm not sure what you mean with "'Open from location'" but maybe this will help
admin/constants.php
// Check existence of remote image files.
// If you choose 1, you could get sometimes timeout errors
define('CHECK_REMOTE_FILES', 1);
-
Which browser are you using? I tried it with IE 6, Opera 6.01, Mozilla 1.0 RC2, it works well. Only Netscapes (4.7 and 6) want to save the file with the name "download.php", but if you rename it to download.jpg it works ;)
Greets Jan