From: ar3121 at att dot comOperating system:PHP version: IrrelevantPHP Bug Type: Documentation probl...
By ar3121_at_att_dot_com
recently i need to create a form which is text input but with select option either.. does any one kn...
By anon
I have been trying to run cgi script on my php pages. This is a banner.cgi script which allows you ...
By anon
ID: 40405Updated by: rquadling@php.netReported By: ar3121 at att dot comStatus: BogusBug Type: Docum...
By rquadling_php_net
Hi I hope someone can give me some advice.Im creating a secure area for my website using frames. To ...
By rico_bano, 1 Comments
If I have a Linux PHP server than do I use Zziplib to transparently access zip files?...
By kaen, 2 Comments
I've been working on some php scripts that I want to release under theGPL and I'm looking ...
By robizzle, 2 Comments
Hi:I am having a problem with PHP and I am new to it, so if you can point out why I am having the er...
By brailleschool, 4 Comments
Hi all,This is just a general question to get some ideas from the "widerworld" as it were.Say you...
By richard_davey, 3 Comments
Are you on a Windoze or unix host?
I assume you are on a unix host so I suggest you use one of the exec() functions to execute unzip instead of doing it yourself.
If you are on a Windoze host use "wb" to write the file.
HalfaBee
halfabee | Thurs, 15 Nov 2007 23:32:00 GMT |
Thanks for the reply
Interesting... I hadn't thought of that --
I'm on a unix box --
The only thing is, the way the script needs to work is that it inserts each pdf into a blob and does not use the filesystem at all -- the zip file is also uploaded thru a form. I've been doing it like mentioned in above code for testing porposes to try and pinpoint the problem.
But I suppose I could unzip it into a temp dir with exec() and then go through each file, insert it to the db, and then delete.
One other thing::
On one of the pdfs in the zip, the filesize of the uncorrupted version is 43787. The filesize of the corrupted one that zziplib (or maybe my save_zip function?) produces is 49152. When I add ini_set("magic_quotes_runtime", 0), the filesize goes down to 45056, but it is still corrupted.
What is the best and proper way to ensure that zziplib is extracting and then saving the files w/o adding any additional stuff?
If I add a stripslashes() onto the save_zip around $data, the server spins forever and no errors are thrown. This is weird!!!
frizzo | Thurs, 15 Nov 2007 23:33:00 GMT |
Quite frankly I wouldn't store the pdf's in the database, just a link to the file system.
It only adds extra overload to the DB if you have to fetch the info.
It is easier just to do a readfile() to send the pdf.
HalfaBee
halfabee | Thurs, 15 Nov 2007 23:34:00 GMT |
Tell me about it!! I totally agree with you.
But unfortunately that's the way the system has been set up.
So basically I'd really like to know what is causing these files to get corrupted.
Any ideas??
frizzo | Thurs, 15 Nov 2007 23:35:00 GMT |
Unfortuately my host doesn't have the zip functions compiled.
I will have a look tonight and see if my PC version of php has it.
Do a phpinfo() and see what configuration things are set.
You may need a custom php.ini to stop things happening.
HalfaBee
halfabee | Thurs, 15 Nov 2007 23:36:00 GMT |