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_conten

[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") { D

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"; > els

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 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

RE: [PHP] readfile() problem

2006-10-12 Thread Peter Lauri
ot;could NOT set"; /Peter -Original Message- From: Richard 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 di

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() 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 t

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 readfil

[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. T

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

[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 L

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 somethin

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

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.t

[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"); head

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: http://www.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> Do

[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

[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: 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 call]. I would

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 fin

[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, ''); $endPos = strpos($file, ''); $stuff = fread($file, ($endPos - $startPos)); something l

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 >

[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. Surprisingly

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 tags. HTH Justin French on 01/10/02 1:12 PM, Daniel Jung ([EMAIL PROTECTED]) wrote: > H

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 rea

[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

[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: application

[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 o

Re: [PHP] readfile + proxy

2001-06-24 Thread Anon Y Mous
Instead of using readfile(), try using the file() function. // Get php.net and store it in an array. $theFile = file("http://www.php.net";); // Convert the array to one long string. $theFile = implode("",$theFile); // And output the file. echo $theFile; If you're trying to do this with an image,

[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 (http://www.php.net/

[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 di

[PHP] readfile and Location headers in php 4.0.4 and 4.0.4pl1

2001-01-15 Thread Jason Brooke
Is anyone else having trouble in 4.0.4 and 4.0.4pl1 with readfile when the argument is a http request to a script that sends a location header? eg: server1 - test.php http://server2/location.php"); ?> server2 - location.php http://some.other.url); ?> Both Php 4.0.4 and 4.0.4pl1 return: Warn