-- On Fri, 9/11/09, Steve Brown <sbrow...@gmail.com> wrote:

> From: Steve Brown <sbrow...@gmail.com>
> Subject: Re: [PHP] Reading files in PHP 5.3.0
> To: php-general@lists.php.net
> Date: Friday, September 11, 2009, 9:08 AM

Perhaps you should add some error checking to see where it breaks

> >> function
> parseResponseHeaders($header_file) {
> >>     $http_found = $error_found = false;
> >>     $http_reponse = $error_message = NULL;
> >>
> >>     $response = array();
> >>     $response['ResponseCode'] = NULL;
> >>     $response['ErrorMessage'] = NULL;
> >>
> >>     if (!is_file($header_file) ||
> >> !is_readable($header_file)) {
> >>         return $response;

             error_log($header_file . " is neither a file nor is it readable. 
Verify full physical path?? ");

> >>     }
> >>
> >>     $fin = fopen($header_file, 'r');

if ($fin == false) error_log("Failed to open " . $header_file);

> >>     while ($line = fgets($fin)) {
> >>         var_dump($line);
> >>
> > What does var_dump($line); tell you?
> 
> Nothing, not even an empty variable.  Which is why I
> think something
> is completely screwed up here.
> 
> BTW, squares at the end of lines are your platform not
> interpreting
> EOL characters correctly from another platform. 
> Generally, its the
> sending client thats not being friendly, not the receiving
> client.

Those additions will hint you where the problem is.  Just check your PHP error 
log, provided that you have it enabled in the ini.

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

>

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

Reply via email to