You are here: Re: php://stdin too long? « PHP Programming Language « IT news, forums, messages
Re: php://stdin too long?

Posted by comp.lang.php on 12/03/06 20:20

Janwillem Borleffs wrote:
> comp.lang.php wrote:
> > No errors, no warnings, no notices
> >
>
> I have tried your code and it works just fine; I have tested it with the
> long XML message in both one line and seperated with new lines.
>
> What you should do besides removing the @ signes, is increasing the error
> reporting level to E_ALL only:
>
> error_reporting(E_ALL);
>
> This will at least throw a notice about an undefined variable (not critical
> but sloppy).
>
> You can also remove file_get_contents with the following to test if there's
> a problem with this function:
>
> $xml = '';
> $fp = fopen('php://stdin', 'r');
> while (!feof($fp)) $xml .= fgets($fp, 1024);
> fclose($fp);
>
> Most importantly, however, is that you start with a small file which
> basically only reads the input and prints it. If this works, you can start
> rebuilding the script again in small chunks.
>
>

It works with a small file, no errors of any kind reported, it's just
that when I get to a certain length in my stdin that it locks up,
again, no errors, no warnings, no notices, absolutely nothing.

But if you want to try for yourself, be my guest:
http://valsignalandet.com/xml/state.xml

That is the XML file; I tried on my PC here at home and it was so
volatile my processor crashed each time I tested with it!! However, I
have a very unstable machine so it should not affect anyone else's in
the same way.

Phil

> JW

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация