[PHP] Problem with output buffering in PHP 4.0.6 and Apache/1.3.20

2002-08-09 Thread ing.Martin Prek

Hi..
I have found a strange problem. I try to use php output buffering, but I found this 
problem.
Working with small amount of data everything is fine. But If I set example script like 
this:

?

function callback($buffer)
 {
 return do_something_with($buffer);
 }


ob_start(callback)
.
.

do_something_that_produce_big_output() // more than 1.5 MB
.
.
.
ob_end_flush();

?

Everything works fine when $buffer  approx 1.5 Mb, but if the size of the output, 
that need to be bufered exceeded some strange limit aprox 1593400 bytes, buffer is cut 
to that length and rest of the output is lost(!). I look in docs and manuals,  but 
found nothing about it. Is it posssible to set large size for the output buffering 
operations or this strange limit is hard coded and cant be exceeded ???  I try to play 
with PHP.INI or add swapspace and DIMs memory with no effect.  Please help.  


---
Odchoz zprva neobsahuje viry.
Zkontrolovno antivirovm systmem AVG (http://www.grisoft.cz).
Verze: 6.0.381 / Virov bze: 214 - datum vydn: 2.8.2002


Re: [PHP] PHP script and external C program

2002-05-28 Thread ing.Martin Prek


- Original Message -
From: John Holmes [EMAIL PROTECTED]
To: 'ing.Martin Prek' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 27, 2002 8:28 PM
Subject: RE: [PHP] PHP script and external C program


 I don't have example code, but what you want is the exec() function. Be
 careful passing user variables to a command line program.

In PHP docs it seems,that  exec() does not solve my problem . It is easy to
grab output of  mycomand to an array, but it seems , that there is no way
to feed mycommands STDIN with something, ie commandline is only way to
pass some argument or data for  mycomand.


I need something like this hypotetical example:

 /bin/mycommand  $variable  $parsed_variable
 or
$variable | /bin/mycommand | $parsed_variable








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP script and external C program

2002-05-27 Thread ing.Martin Prek

Problem. I have a php 4.0.6. on linux as Apache module.  I need to do folowing:

I have in my script some value, for example $value
and  
in /bin on my linux box c language program called something. (I need speed) . 

I need to parse $value thru stdin /bin/something program to get from its stdout a 
$parsed_value.

How to  run external program (for example  /bin/something ), write to its  STDIN  
$value and  then read from its STDOUT to  variable  $parsed_value ?


Example code needed.
 

thanx