[ZendTo] Re: Large Files and Rebuilding libphp5.so

Jules Jules at Zend.To
Mon Jan 9 16:04:15 GMT 2012



On 09/01/2012 15:38, Brian Ott wrote:
> On Sun, Jan 08, 2012 at 05:07:16PM +0000, 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.
> Yeah you are right, who knows what debian is doing when it comes to
> something like modifying PHP on different systems. I'm fine with using
> a different distro. I did look at Centos6 but when following your
> guide I came across some issues, It seems there has been some updates
> to CentOS that created a problem, so I simply skipped it and tried
> CentOS 5, as it worked like a charm I'm more inclined to stick with
> it.
>
> Overall we are fairly pleased with this application,
Only "fairly"? :)
>   the only feedback
> I'm getting from users right now is that the recaptcha is too hard to
> see but that isn't really an issue with zendto more with recaptcha.
Sorry, nothing I can do about that except ask you to contact Google with 
your concerns. Often if you press the reload button on the captcha, you 
get an easier one.
>
> Also I would like to thank you for the prompt replies and the help
> provided!
No problem! Glad to help.

Cheers,
Jules.

>
>> 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
>>
>> _______________________________________________
>> ZendTo mailing list
>> ZendTo at zend.to
>> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto

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

'It's okay to live without all the answers' - Charlie Eppes, 2011
'All programs have a desire to be useful' - Tron, 1982
'That is the land of lost content,
  I see it shining plain,
  The happy highways where I went,
  And cannot come again.' - A.E. Houseman



More information about the ZendTo mailing list