[PHP] readfile()

2007-01-11 Thread Steven Macintyre
HI all I'm currently using this function to read a remove address to create a mailbox ... However - It ALWAYS displays the output of that file to the user screen ... all I wish to do is something like ... $status = Readfile(warra warra warra); If ($status === MailBox Created) { Do

Re: [PHP] readfile()

2007-01-11 Thread Jochem Maas
Steven Macintyre wrote: HI all I'm currently using this function to read a remove address to create a mailbox ... However - It ALWAYS displays the output of that file to the user screen ... all I wish to do is something like ... use a different file function. e.g. file_get_contents()

RE: [PHP] readfile() problem

2006-10-13 Thread Peter Lauri
Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, October 13, 2006 4:59 AM To: Peter Lauri Cc: php-general@lists.php.net Subject: RE: [PHP] readfile() problem On Thu, October 12, 2006 3:26 pm, Peter Lauri wrote: It did help, but not perfectly. Sometimes I have to refresh a few times before

RE: [PHP] readfile() problem

2006-10-13 Thread Robert Cummings
On Fri, 2006-10-13 at 13:28 +0700, Peter Lauri wrote: Hi, I am trying to do this, but now I cannot set values with ini_set. I do the following and it outputs could not set. I have also tried 0, 0, but that doesn't help. if(ini_set(output_buffering, off)) echo could set; else echo could NOT

RE: [PHP] readfile() problem

2006-10-13 Thread Peter Lauri
You are correct. I might love you :) -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Friday, October 13, 2006 2:27 PM To: Peter Lauri Cc: [EMAIL PROTECTED]; php-general@lists.php.net Subject: RE: [PHP] readfile() problem On Fri, 2006-10-13 at 13:28 +0700, Peter

RE: [PHP] readfile() problem

2006-10-13 Thread Richard Lynch
On Fri, October 13, 2006 1:28 am, Peter Lauri wrote: Hi, I am trying to do this, but now I cannot set values with ini_set. I do the following and it outputs could not set. I have also tried 0, 0, but that doesn't help. if(ini_set(output_buffering, off)) echo could set; else echo could NOT

[PHP] readfile() problem

2006-10-12 Thread Peter Lauri
Hi gang, I have a problem. I am using readfile() to send files to the browser. The code is below. I had is working on another server before, but now my client have moved to a new server and we have started to experience problems with bigger files. I have three different files that I am sending.

Re: [PHP] readfile() problem

2006-10-12 Thread Richard Lynch
On Thu, October 12, 2006 11:43 am, Peter Lauri wrote: I have a problem. I am using readfile() to send files to the browser. I have three different files that I am sending. They are 3MB, 15MB and 59MB Is there any limitations or settings of how large the files can be when using readfile()?

RE: [PHP] readfile() problem

2006-10-12 Thread Peter Lauri
: [PHP] readfile() problem On Thu, October 12, 2006 11:43 am, Peter Lauri wrote: I have a problem. I am using readfile() to send files to the browser. I have three different files that I am sending. They are 3MB, 15MB and 59MB Is there any limitations or settings of how large the files can

RE: [PHP] readfile() problem

2006-10-12 Thread Richard Lynch
On Thu, October 12, 2006 3:26 pm, Peter Lauri wrote: It did help, but not perfectly. Sometimes I have to refresh a few times before it will be pushed. Is output_buffering defaulted to on?... Cuz then you're putting a whole SECOND copy of the output into PHP's output buffer. That's bad. :-)

Re: [PHP] readfile and get_file_contents don't work

2005-11-24 Thread David Grant
Hi Richard, Please ensure that the allow_url_fopen directive is set to On in your php.ini file. Cheers, David Grant Richard K. Miller wrote: I compiled PHP from source on Fedora Core 4, but I must have left something out because readfile and get_file_contents aren't working. If I try to

[PHP] readfile and get_file_contents don't work

2005-11-23 Thread Richard K . Miller
I compiled PHP from source on Fedora Core 4, but I must have left something out because readfile and get_file_contents aren't working. If I try to connect to a http://; address I get the error failed to open stream: HTTP request failed. Any ideas why? Richard -- PHP General Mailing List

[PHP] readfile()

2004-08-23 Thread Aaron Todd
I'm trying to use readfile() to allow a user to download a file that is outside of my webroot. webroot = /var/www/html downloads dir = /var/www/downloads Here is the code that I have been using: $file = /var/www/downloads/test.txt; header(Content-Description: File Transfer);

Re: [PHP] readfile()

2004-08-23 Thread Greg Donald
On Mon, 2004-08-23 at 13:02, Aaron Todd wrote: I'm trying to use readfile() to allow a user to download a file that is outside of my webroot. webroot = /var/www/html downloads dir = /var/www/downloads Here is the code that I have been using: $file = /var/www/downloads/test.txt;

Re: [PHP] readfile()

2004-08-23 Thread Greg Donald
On Mon, 2004-08-23 at 15:35, Aaron Todd wrote: Not too familure with a chroot'd web setup and I dont know if my ISP has some security that I dont know about. I tried some tests with file_exists() and it doesnt seemt to be able to get to the files either. I've put in an info request to my

Re: [PHP] readfile()

2004-08-23 Thread Aaron Todd
Not too familure with a chroot'd web setup and I dont know if my ISP has some security that I dont know about. I tried some tests with file_exists() and it doesnt seemt to be able to get to the files either. I've put in an info request to my ISP but they are usually not much help with

[PHP] readfile error

2004-03-02 Thread Ashley
I posted this on Novell's PHP forum, but I have not gotten a response. Hopefully, someone here can help me. -- I was using the readfile function on a server that was running Apache 1.3.2, PHP 4.2.3 (PHP for Netware) and then switched to a different server running Apache 2.0.48, PHP 4.2.3 (PHP

Re: [PHP] readfile error

2004-03-02 Thread Richard Davey
Hello Ashley, Tuesday, March 2, 2004, 3:26:54 PM, you wrote: A Warning: php_network_getaddresses: gethostbyname failed in 'insert path A here' on line 6 A Warning: A readfile(http://jurist.law.pitt.edu/paperchase/blogger_rss.xml;) - A Bad file number in 'insert path here' on line 6 A Does

Re: [PHP] readfile error

2004-03-02 Thread Ashley
Line 6 is: readfile($dataURL); $dataURL is a link to an xml file. It is a valid file because if I visit the link, I do get the file I am looking for, but reading it into PHP gives the described error message. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] readfile() and 401 pages

2004-01-16 Thread Vince LaMonica
Hi all, I'm attempting to use readfile() to redirect the user to a .htaccess protected page: ?php readfile(https://www.foo.edu/cgi-bin/stats/awstats?config=more.foo.here;); ? The stats/ directory is .htaccess'ed. [and the URL is even longer, with a lot of other options tagged onto the awstats

Re: [PHP] Readfile, DAP and 3 questions

2004-01-06 Thread Adam i Agnieszka Gasiorowski FNORD
Ryan A wrote: Opera version 6.5 and 7... I already had that set. Try asking again on news:opera.general (if your server does not carry this newsgroup, try news.opera.com). There are more Opera - knowleable people there :8]. I recall that there is a solution, I just cannot find

Re: [PHP] Readfile, DAP and 3 questions

2004-01-05 Thread Adam i Agnieszka Gasiorowski FNORD
Ryan A wrote: I am using the example from the online manual: http://de3.php.net/manual/en/function.readfile.php to read a file that is in a .htaccess protected folder and pop a download box to the client. Surprisingly, after screwing around with the example code for 2 mins I got it

[PHP] readfile from startpos to endpos

2004-01-05 Thread JLake
I've been looking around for a bit and can't quite find what I'm looking to do. I want to read a file (from a pattern matched start position) to (a pattern matched end position) $startPos = strpos($file, '!- start -'); $endPos = strpos($file, '!- end -'); $stuff = fread($file, ($endPos -

[PHP] Readfile, DAP and 3 questions

2004-01-04 Thread Ryan A
Hi, I have just started using PHP's file operators...and as you can guess need a little help I am using the example from the online manual: http://de3.php.net/manual/en/function.readfile.php to read a file that is in a .htaccess protected folder and pop a download box to the client.

[PHP] readfile without stating filelength

2002-09-30 Thread Daniel Jung
Hi I want to read a pure html file into a php-generated html file. print(readfile(somefile.html)); How do I get rid of the filelength statement? Messes up the page. Thanks - Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] readfile without stating filelength

2002-09-30 Thread John W. Holmes
I want to read a pure html file into a php-generated html file. print(readfile(somefile.html)); How do I get rid of the filelength statement? Messes up the page. Your error is using the print(). You just want readfile(file) without the print. Readfile() returns the number of bytes read,

Re: [PHP] readfile without stating filelength

2002-09-30 Thread Justin French
1. I can't see a file length statement in the docs for readfile. 2. Can't you just use include('somefile.html'); or require('somefile.html'); Just make sure any PHP code in the include file is wrapped in ?php ... ? tags. HTH Justin French on 01/10/02 1:12 PM, Daniel Jung ([EMAIL PROTECTED])

[PHP] Readfile() Download Issues

2002-03-14 Thread Steven Walker
Hi, I'm having trouble supporting Internet Explorer 5.5 and earlier versions in a PHP download script. People are reporting that the file comes out as 'download.htm'. Here is the code in my download.php: $len = filesize($file); header(Content-type:

[PHP] readfile or fopen? (Passing file to user...)

2002-03-12 Thread Jimmy Lantz
Hi, I wonder if there's a better way (more effective, less resource consuming ) to pass a file to a user than the ones I put below. This might be quite large files more than 100 mb. Mind this might be all kind of files (binary and others) and must preserve the files state. //Sending approriate

[PHP] readfile(ftp://....);

2001-08-09 Thread David Minor
will the readfile() function not accept a user/pass combination in an ftp url? like: readfile(ftp://user:[EMAIL PROTECTED]/path/to/file;); I get two errors. The first is a file not found error. The second is a No Such file or directory error. droppoing the user:pass section works just fine.

Re: [PHP] readfile() question

2001-06-25 Thread Richard Lynch
I was wondering what happens if you call the readfile function to output a large binary file to a client with a slow connection. Does the script run until the whole file is sent to the client (leading to timeout errors on servers with a low max execution time) or does it fill some sort of

[PHP] readfile + proxy

2001-06-24 Thread Joris Van Droogenbroeck
How can I read some webpage through a proxy in PHP. I wan't to use the function readfile(http://www.php.net/) but I get an host_connect error. -- A good programmer is someone who looks both ways before crossing a one-way street. - Doug Linder -- PHP General Mailing List

[PHP] readfile() question

2001-06-23 Thread Kristian Duske
Hi there, I was wondering what happens if you call the readfile function to output a large binary file to a client with a slow connection. Does the script run until the whole file is sent to the client (leading to timeout errors on servers with a low max execution time) or does it fill some sort

[PHP] Readfile only return error

2001-01-30 Thread Karl J. Stubsjoen
Hello, I'm performing a readfile, and am expecting that if the file isn't found and error will return unless you add the @ symbol before the readfile function as in: $retrn = @readfile ($FileName); My page only errors, and doesn't return false. I don't want my page to error, I would like to