473,399 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Downloadscript und Norton Firewall

Hallo,

ich habe aus der php-faq nachfolgendes Script an meine Bedürfnisse
angepasst, den Teil der für Speichern der Downloads zuständig ist habe
ich nicht geposted:

<?
// $download sei der Bezeichner für die zu ladende Datei
// etwa:
$download = $_GET['download'];
// Dieses Verzeichnis liegt außerhalb des Document Root und
// ist nicht per URL erreichbar.
$basedir = "/home/www/..../download";

// Übersetzung von Download-Bezeichner in Dateinamen.
$filelist = array(
"file1" => "datei1.pdf",
"file2" => "datei2.pdf",
"file3" => "datei3.pdf",
"file4" => "datei4.pdf",
"file5" => "datei5.pdf",
"file6" => "datei6.pdf",
"file7" => "datei7.pdf",
"file8" => "datei8.pdf",
"file9" => "datei9.pdf"
);
// Einbruchsversuch abfangen.
if (!isset($filelist[$download]))
die("Datei $download nicht vorhanden.");

// Vertrauenswürdigen Dateinamen basteln.
$filename = sprintf("%s/%s", $basedir, $filelist[$download]);
#$filename=$filelist[$download];
// Passenden Datentyp erzeugen.
if (preg_match('#Opera(/| )([0-9].[0-9]{1,2})#',
getenv('HTTP_USER_AGENT')) or preg_match('#MSIE ([0-9].[0-9]{1,2})#',
getenv('HTTP_USER_AGENT'))) {
header("Content-Type: application/octetstream");
} else {
header("Content-Type: application/octet-stream");
}
// Passenden Dateinamen im Download-Requester vorgeben,
// z. B. den Original-Dateinamen
$save_as_name = basename($filelist[$download]);
header("Content-Disposition: attachment; filename=\"$save_as_name\"");
// Datei ausgeben.
readfile($filename);
?>
Alles klappt solange meine Firewall (Norton2005) nicht aktiv ist.
Sobald ich diese aktiviere werden die PDF's vom AcrobatReader als
"beschädigt" abgelehnt.

Hat jemand diese Erfahrung auch gemacht und eine Lösung gefunden?
Jul 17 '05 #1
1 1727
jo****@rittscher.de (Jochen Rittscher) wrote in message news:<8f*************************@posting.google.c om>...
<google translation>

Hello,

I have from php faq the following Script to my needs
adapted, the part for memory of the Downloads is responsible has
I not geposted:
<snip>
Everything does not fold so long my Firewall (Norton2005) is active.
As soon as I these activate become the PDF's of the AcrobatReader as
"damages" rejected.

Did someone also make this experience and a solution did find?
</google translation>

IIRC, to load PDF in Acrobat Reader, it has to cache the content
first. Sounds like Norton Firewall is prohibiting to do so. You may
need to visit www.php.net/header and read some valuable usernotes.
Also, try to change your AV; my recommendation is PC-cillin. Also,
please try to use English in international groups.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: SM | last post by:
Hi , I am using a window.open function to popup window in my C# code in this manner . Response.Write("<SCRIPT language=\"javascript\">"); Response.Write(String.Format("window.open(\"{0}...
0
by: Tim Hopkins | last post by:
Hi. Can anyone tell me what aspect of Norton System works is required for login to Hotmail and Messenger? I am getting "page cannot be diplayed" when attempting to log in to these sites only. ...
11
by: TC | last post by:
Hello All, I have recently had the pleasure of installing Norton Internet Security 2005 and finding that I can no longer create or open a web-based application in Visual Studio .Net. The IDE...
2
by: Philip Townsend | last post by:
I recently installed Norton Internet Security on my development machine. I have used similar firewall products in the past without difficulties. This product, however, rendered my IIS useless. I...
1
by: Al Cadalzo | last post by:
I have a web page that allows a user to download data by clicking on a link button. I then use Aspose.Excel (v1.0.3705) to generate the file for download and then I call the "Save" method on the...
10
by: Ammar | last post by:
Hi! I am running IIS 5 on windowsXP proffesional with norton internet security proffesional 2004. I have been trying to make an ASP.NET page that sends a report as an e mail to the webmaster of...
1
by: Edu | last post by:
Hi, If you use Norton Internet Security, you might be having the same problem I'm having when developing on Visual Studio .net. Before, when using vb6, I had only once to set a rule on the...
11
by: gregory_may | last post by:
I am developing an application that I would like to distribute on CD. Norton blows it up very badly. Is there some API I can talk to let Norton know I am ok?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.