[ZendTo] Re: Large Files and Rebuilding libphp5.so
Jules
Jules at Zend.To
Sun Jan 8 18:33:56 GMT 2012
On 08/01/2012 17:07, Jules wrote:
>
> On 05/01/2012 15:54, Jules wrote:
>>
>> On 05/01/2012 15:30, Brian Ott wrote:
>>> On Thu, Jan 05, 2012 at 09:07:52AM +0000, Jules wrote:
>>>> On 04/01/2012 22:29, Brian Ott wrote:
>>>>> Hey Jules,
>>>>>
>>>>> As a test I went ahead and followed these steps:
>>>>> http://zend.to/phpfix.php
>>>>>
>>>>> I started from fresh the only thing I did NOT do was alter the fix:
>>>>>
>>>>> perl -i -pe 's/int zend_atoi/long zend_atoi/'
>>>>> Zend/zend_operators.[ch];
>>>>> perl -i -pe 's/\n/@@@@@@/g' Zend/zend_operators.c;
>>>>> perl -i -pe 's/(long zend_atoi.*?)int retval/$1long retval/m'
>>>>> Zend/zend_operators.c;
>>>>> perl -i -pe 's/@@@@@@/\n/g' Zend/zend_operators.c;
>>>>> perl -i -pe 's/atoi\(content_length\)/atol(content_length)/' `find
>>>>> sapi -name '*.c'`
>>>>> perl -i -pe 's/\(uint\)( SG\(request_info\))/$1/' `find sapi -name
>>>>> '*.c'`;
>>>>> perl -i -pe 's/uint post_data_length, raw/uint
>>>>> IGNORE_post_data_length, IGNORE_raw/' main/SAPI.h;
>>>>> perl -i -pe 's/} sapi_request_info/\tlong post_data_length,
>>>>> raw_post_data_length;\n} sapi_request_info/' main/SAPI.h;
>>>>> perl -i -pe 's/int read_post_bytes/long read_post_bytes/'
>>>>> main/SAPI.h;
>>>>> perl -i -pe 's/int boundary_len *= *0, *total_bytes *= *0/long
>>>>> total_bytes=0; int boundary_len=0/' main/rfc1867.c;
>>>>> perl -i -pe 's/int max_file_size *= *0,/long max_file_size = 0; int /'
>>>>> main/rfc1867.c;
>>>>>
>>>>> I left that part out to make sure it wasn't something with Debians
>>>>> version of PHP. Anyways I ran through and everything worked. I copied
>>>>> over the libphp5.so file and tried to dropoff a file, everything went
>>>>> well except of course the 4G file I uploaded failed.
>>>> Well it would. You've just built the file you already had.
>>>>> So I suspect something within these edits is the problem, I remember
>>>>> someone once asked you on this list before where you got this and you
>>>>> said to check google. I tried looking but with no success. I'm going
>>>>> to try and do it manually and see what happens.
>>>> It's possible the PHP source has changed again so one of the
>>>> patterns is
>>>> failing to match. Exactly what version of PHP are you trying to do it
>>>> with? Does Ubuntu use the same version now?
>>>>
>>>> Jules.
>>> I just checked Ubuntu 10.10 uses PHP5 5.3.3
>>> Ubuntu 10.04 uses PHP5 5.3.2
>>> Ubuntu 11.04 uses PHP5 5.3.5
>>>
>>> Debian 6 (Squeeze) uses PHP5 5.3.3
>>>
>>> So in theory the notes for Ubuntu 10 should be dead on accurate.
>> But only for 10.04 and not 10.10. Sounds like the code has changed
>> since 5.3.2. I *might* get around to taking a look at this problem at
>> the weekend. I'll need to install an Ubuntu 11.04 box to build it with.
> Ubuntu 11.10 uses PHP 5.3.6. None of the Ubuntu patches applied when it
> is built conflict in any way (that I can see) with my patches for it.
> It's building now, once it's finished I'll chuck a copy of ZendTo around
> it and test it with a 6GB file to be sure all is fine.
Everything worked just fine. No problems at all.
Jules
--
Julian Field MEng CITP CEng
www.Zend.To
Follow me at twitter.com/JulesFM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
'Teach a man to reason, and he will think for a lifetime.' - Phil Plait
'All programs have a desire to be useful' - Tron, 1982
More information about the ZendTo
mailing list