php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9445 error message when using fopen or file functions
Submitted: 2001-02-25 15:15 UTC Modified: 2001-07-21 21:37 UTC
From: pgould at dircon dot co dot uk Assigned:
Status: Closed Package: HTTP related
PHP Version: 4.0.4pl1 OS: FreeBSD 4.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pgould at dircon dot co dot uk
New email:
PHP Version: OS:

 

 [2001-02-25 15:15 UTC] pgould at dircon dot co dot uk
This is the error message I get:

Warning: fopen("http://www.citywire.co.uk/","r") - Message too long in /usr/home/jon/webs/blahblah/htdocs/pull/citywire.php on line 87

Here is the script:

$filename = "http://www.citywire.co.uk/latestnews/default.asp";
$fd = fopen ($filename, "r");

This is my ISP's setup:

FreeBSD 4.2
./configure' '--with-apxs=/usr/local/sbin/apxs' '--enable-versioning' '--with-system-regex' '--with-config-file-path=/usr/local/etc' '--disable-debug' '--enable-track-vars' '--without-gd' '--disable-pear' '--without-mysql' '--with-gd=/usr/local' '--with-ttf=/usr/local' '--with-zlib' '--with-mcrypt=/usr/local' '--with-mhash=/usr/local' '--with-imap=/usr/local' '--with-mysql=/usr/local' '--with-xml=/usr/local' '--enable-ftp' '--with-gettext=/usr/local' '--with-ming' '--prefix=/usr/local' 'i386--freebsd4.2'

I don't have access to php.ini unfortunately.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-25 15:18 UTC] pgould at dircon dot co dot uk
The source for that html page is all on one line. Approx. 19,000 characters. I can fopen/file(), without any problems, html pages which have newline breaks throughout.
 [2001-07-21 21:37 UTC] andy@php.net
The problem is probably caused by the REALLY long line.  Try
upgrading to the current version.  If that still doesn't
work, re-open.
 [2002-06-21 09:20 UTC] r1oger at email dot com
I've see your bug and this has also occured to me.

My warnings are shown in the following...

Warning: fopen("http://s6aip.uhome.net/ex/exnews_express.exd","r") - Message too long in /virtual/s6aip.uhome.net/./index_6.php on line 210

Warning: Supplied argument is not a valid File-Handle resource in /virtual/s6aip.uhome.net/./index_6.php on line 211

Warning: Supplied argument is not a valid File-Handle resource in /virtual/s6aip.uhome.net/./index_6.php on line 212


I think the problem is not caused by many characters... according to my txt file "http://s6aip.uhome.net/ex/exnews_express.exd", it only contains about 260 words in one line. Then I split the txt file into many lines, the problem still occured. Also, i don't think the problem is caused by Chinese words as the txt file contains Chinese words.

What is the real reason for this problem?

In addition, my page is uploaded to a free web hosting website's server which is using PHP version 4.0.5. So, I cant upgrade any config....

How can I solve the problem???
 [2002-06-21 09:48 UTC] r1oger at email dot com
No need help la... (Hong Kong people lang =.=)

I discover that sometimes, if the specific URL is wrong, it will produce a "Message too long" warning. Is the problem / Can the problem solved in the new version of php?

It carries a wrong message that the problem is not caused on misspell the URL but it did! This warning confuses us. So I want to know that is it fixed this problem or I want to ask for correcting this problem for new users using PHP not to be confused.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC