Re: [PHP] fopen and load balancing

2013-02-12 Thread ma...@behnke.biz
Adam Tong hat am 11. Februar 2013 um 16:11 geschrieben: > I think this is what happened. As the application was trying to open > our url domain the request was sent to the load balancer, and as it > does not accept internal requests, the connection was timed out. > > The only way we could avoid

Re: [PHP] fopen and load balancing

2013-02-11 Thread Sean Greenslade
On Mon, Feb 11, 2013 at 10:11 AM, Adam Tong wrote: > On Mon, Feb 11, 2013 at 4:26 AM, ma...@behnke.biz > wrote: > > > > > > Adam Tong hat am 10. Februar 2013 um 23:41 > > geschrieben: > >> Hi, > >> > >> We had an issue with the code of a junior php developer that used > >> fopen to load images u

Re: [PHP] fopen and load balancing

2013-02-11 Thread Adam Tong
I think this is what happened. As the application was trying to open our url domain the request was sent to the load balancer, and as it does not accept internal requests, the connection was timed out. The only way we could avoid that is to not use fopen our url, is that right? On Mon, Feb 11, 2

Re: [PHP] fopen and load balancing

2013-02-11 Thread ma...@behnke.biz
Adam Tong hat am 10. Februar 2013 um 23:41 geschrieben: > Hi, > > We had an issue with the code of a junior php developer that used > fopen to load images using the url of the companies website that is > load balanced. > > We could not the detect the problem in dev and test because the dev > and

Re: [PHP] fopen and load balancing

2013-02-10 Thread Adam Richardson
On Sun, Feb 10, 2013 at 5:41 PM, Adam Tong wrote: > Hi, > > We had an issue with the code of a junior php developer that used > fopen to load images using the url of the companies website that is > load balanced. > > We could not the detect the problem in dev and test because the dev > and test s

Re: [PHP] fopen() on a network share?

2009-06-16 Thread Martin Scotta
Hey, look, you can ask PHP what he think about slashes! var_dump( 'servername\\sharename\\folder\\file.xml' ); I think this should be a different problem On Tue, Jun 16, 2009 at 10:23 AM, Jan G.B. wrote: > 2009/6/16 Andrew Ballard > > > On Mon, Jun 15, 2009 at 7:24 PM, Shawn McKenzie > > w

Re: [PHP] fopen() on a network share?

2009-06-16 Thread Jan G.B.
2009/6/16 Andrew Ballard > On Mon, Jun 15, 2009 at 7:24 PM, Shawn McKenzie > wrote: > > Brian Dunning wrote: > >> Extra info, in case needed: my code says > >> > >> fopen('\\servername\sharename\folder\file.xml', 'w'); > >> > >> and it returns "Failed to open stream, no such file or directory". I

RE: [PHP] fopen() on a network share?

2009-06-16 Thread jenai tomaka
Hi, wht dont you try it with IP, ex: fopen('http://11.12.13.14/sharename/folder/file.xml', 'w'); > Date: Mon, 15 Jun 2009 22:51:09 -0400 > From: aball...@gmail.com > To: nos...@mckenzies.net > CC: php-general@lists.php.net > Subject: Re: [PHP] fopen() on a

Re: [PHP] fopen() on a network share?

2009-06-15 Thread Andrew Ballard
On Mon, Jun 15, 2009 at 7:24 PM, Shawn McKenzie wrote: > Brian Dunning wrote: >> Extra info, in case needed: my code says >> >> fopen('\\servername\sharename\folder\file.xml', 'w'); >> >> and it returns "Failed to open stream, no such file or directory". I've >> verified that the PHP machine does h

Re: [PHP] fopen() on a network share?

2009-06-15 Thread Shawn McKenzie
Brian Dunning wrote: > Extra info, in case needed: my code says > > fopen('\\servername\sharename\folder\file.xml', 'w'); > > and it returns "Failed to open stream, no such file or directory". I've > verified that the PHP machine does have unrestricted permissions to that > share and to the direc

Re: [PHP] fopen() on a network share?

2009-06-15 Thread Brian Dunning
Extra info, in case needed: my code says fopen('\\servername\sharename\folder\file.xml', 'w'); and it returns "Failed to open stream, no such file or directory". I've verified that the PHP machine does have unrestricted permissions to that share and to the directory. Thanks. On Jun 15, 20

Re: [PHP] fopen not working corectly on remote IIS

2008-11-11 Thread Andrew Ballard
On Tue, Nov 11, 2008 at 9:10 AM, Yeti <[EMAIL PROTECTED]> wrote: > As PHP says ... there seems to be something wrong with file > permissions. Make sure the IIS-user (if there is one on windows) can > read intekendb.php. > I don't know if you checked [1] yet. It's alot of useful info about php on >

Re: [PHP] fopen not working corectly on remote IIS

2008-11-11 Thread Yeti
As PHP says ... there seems to be something wrong with file permissions. Make sure the IIS-user (if there is one on windows) can read intekendb.php. I don't know if you checked [1] yet. It's alot of useful info about php on IIS. Quote out of that article: The IIS user (usually IUSR_MACHINENAME) ne

Re: [PHP] fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Daniel Brown
On Dec 27, 2007 12:57 PM, Albert Wiersch <[EMAIL PROTECTED]> wrote: > What needs to be escaped for a URL anyway? I am just changing spaces to > '%20' now. Arbitrary code can still be injected unless it's properly sanitized, but that's beyond the scope here. Mainly, make sure quotes (singl

Re: [PHP] fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Albert Wiersch
""Daniel Brown"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Dec 27, 2007 11:31 AM, Albert Wiersch <[EMAIL PROTECTED]> > wrote: > >Are the URLs being passed to fopen() properly escaped? Are they > valid, complete with http:// placed before the domain? Try keeping a > l

Re: [PHP] fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Daniel Brown
On Dec 27, 2007 11:31 AM, Albert Wiersch <[EMAIL PROTECTED]> wrote: > > I noticed my script at http://onlinewebcheck.com was sometimes (fairly > often) failing to open some URLs that users have entered. fopen() returns > false very quickly, but when tried again with the same URL, sometimes it > wor

RE: [PHP] fopen function and charset

2007-10-02 Thread Jay Blanchard
[snip] I want to know, what charset is applied to every file when is created with the fopen function and how can I to manage the charset when I use the fopen function? For example: If i want to create an ISO-8859-2 file, how can I to force, the fopen function to create it? [/snip] This may start

Re: [PHP] fopen and fwrite r+

2007-01-13 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-13 17:32:00 -0500: > I can write to the bottom of the file, no problem, but if I want to > put new entries at the top of the file I have problems: > the previous entry is partially overwritten and mangled.. you cannot prepend to a file. to do that you need to creat

Re: [PHP] fopen failed to open pipe file in Linux+Apache environment

2006-12-08 Thread mike xu
Its so strange, when I runing /etc/rc.d/rc3.d/S85httpd restart, the php script couldn't fopen pipe file. But if I copy /etc/rc.d/rc3.d/S85httpd to some other place (for example /root), and execute `/root/S85httpd restart`, the php script could fopen file successfully! Its so confusing ... On 12/

Re: [PHP] fopen failed to open pipe file in Linux+Apache environment

2006-12-08 Thread mike xu
Hi Ryan, I just did another test, if I start the httpd by root user manually (the httpd daemon program still owns apache user by the result of `ps -aux`), the php script works fine. So, it seems the httpd start script (/etc/rc.d/init.d/httpd) did something specially which cause the permission pro

Re: [PHP] fopen failed to open pipe file in Linux+Apache environment

2006-12-08 Thread Ryan Creaser
mike xu wrote: Thanks a lot forr your reply. Here is the error msg: *Warning*: fopen(/dev/pmsg) [function.fopen]: failed to open stream: Permission denied in * /var/www/html/Source/test/register_user.php* on line *31 It still doesn't work even if I m

Re: [PHP] fopen failed to open pipe file in Linux+Apache environment

2006-12-07 Thread mike xu
Thanks a lot forr your reply. Here is the error msg: *Warning*: fopen(/dev/pmsg) [function.fopen]: failed to open stream: Permission denied in * /var/www/html/Source/test/register_user.php* on line *31 It still doesn't work even if I move pmsg to /tmp

Re: [PHP] fopen failed to open pipe file in Linux+Apache environment

2006-12-07 Thread Ryan Creaser
mike xu wrote: Hi, I have problem of open named pipe file in linux. Here is my sample code: $fifo_file = "/dev/pmsg"; @ $fp = fopen($fifo_file, 'w+b'); if(!$fp) { echo "open ".$fifo_file." failed"; } else { $msg_cmd = "ttt"; fwrite($fp, $msg_cmd, strlen($msg_cmd)); fclose(

Re: [PHP] fopen failed to open pipe file in Linux+Apache environment

2006-12-07 Thread Chris
mike xu wrote: Hi, I have problem of open named pipe file in linux. Here is my sample code: $fifo_file = "/dev/pmsg"; @ $fp = fopen($fifo_file, 'w+b'); It's wb+ not w+b -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] fopen: space character in filename

2006-07-28 Thread Stut
Christian Calloway wrote: > this seems like an easy question, but I could sure as hell couldn't find any > responces to it through initial searched. I am running php on an XP system > and I need to open a file contained with a set of directories which may or > may not have a space character; so

Re: [PHP] fopen: space character in filename

2006-07-28 Thread Robert Cummings
On Fri, 2006-07-28 at 17:27, Robert Cummings wrote: > On Fri, 2006-07-28 at 16:55, Christian Calloway wrote: > > Hello all, > > > > this seems like an easy question, but I could sure as hell couldn't find > > any > > responces to it through initial searched. I am running php on an XP system > >

Re: [PHP] fopen: space character in filename

2006-07-28 Thread Robert Cummings
On Fri, 2006-07-28 at 16:55, Christian Calloway wrote: > Hello all, > > this seems like an easy question, but I could sure as hell couldn't find any > responces to it through initial searched. I am running php on an XP system > and I need to open a file contained with a set of directories which

Re: [PHP] fopen failing, permission denied

2006-02-28 Thread Chris
Dan Baker wrote: I have the following code snippet: $h = fopen("$path/file.txt", 'x+'); And it generates the following error: Warning: fopen(/home/./myarea/file.txt): failed to open stream: Permission denied The path is correct, but the php process doesn't seem to have file permissions i

Re: [PHP] fopen/fwrite and owner/group settings

2006-01-05 Thread Silvio Porcellana [tradeOver]
Mathijs wrote: > Hello there, > > I Have a problem with some file writeing. > > I Use fopen to create a new file, but that file gets the owner and group > the same as the apache owner and group. > > How can i change it so that the file gets the same owner/group as the > files i upload with FTP?

RE: [PHP] fopen on windows

2005-11-14 Thread Jay Blanchard
[snip] On Fri, November 11, 2005 2:51 pm, Jay Blanchard wrote: > $theFile = fopen("docs/InstallationInstructionMaster.txt", "r") || > die; Don't use || when you mean 'or' :-) Nor sure it really matters here, but better to follow the crowd and use 'or' here. [/snip] Okie dokie. Found there to be

RE: [PHP] fopen on windows

2005-11-14 Thread Richard Lynch
On Fri, November 11, 2005 3:23 pm, Jay Blanchard wrote: > // Left off the "b" because it ain't binary :) I think you will find this is the crucial difference if you go back to your original and take it out. Your file is text. It's not binary. On Windowz, that matters, for some odd reason. --

Re: [PHP] fopen on windows

2005-11-14 Thread Richard Lynch
On Fri, November 11, 2005 2:51 pm, Jay Blanchard wrote: > $theFile = fopen("docs/InstallationInstructionMaster.txt", "r") || > die; Don't use || when you mean 'or' :-) Nor sure it really matters here, but better to follow the crowd and use 'or' here. > while(!feof($theFile)){ > $theLine =

RE: [PHP] fopen on windows

2005-11-14 Thread Jay Blanchard
[snip] You need "or" not || here. The operator priorities are such that the above means ... which assigns the result of fopen() to $theFile, and then executes die if it's false -- which is much more satisfactory. ;) [/snip] Originally I did not have any '||' or 'or' in the conditional check, with

RE: [PHP] fopen on windows

2005-11-14 Thread Ford, Mike
On 11 November 2005 21:21, Nathan Tobik wrote: > I've always used: > > fopen("C:\\dir\\dir\\file.txt"); > > on windows, I'm not sure how PHP interprets the slashes internally > though... On Windows, "/" in filenames is internally translated by PHP to "\" -- which means you can write code that

RE: [PHP] fopen on windows

2005-11-14 Thread Ford, Mike
On 11 November 2005 20:52, Jay Blanchard wrote: > $theFile = fopen("docs/InstallationInstructionMaster.txt", "r") || > die; You need "or" not || here. The operator priorities are such that the above means $theFile = (fopen("docs/InstallationInstructionMaster.txt", "r") || die); which assign

RE: [PHP] fopen on windows

2005-11-11 Thread Jay Blanchard
[snip] Blank lines. Just to see if the problem is fgets(), try this: // Left off the "b" because it ain't binary :) $theFile = file_get_contents( "docs/InstallationInstructionMaster.txt", "r" ) or die; $lines = explode( "\n", $theFile ); foreach( $lines as $line ) { $line = explode( "\t"

RE: [PHP] fopen on windows

2005-11-11 Thread Nathan Tobik
I've always used: fopen("C:\\dir\\dir\\file.txt"); on windows, I'm not sure how PHP interprets the slashes internally though... Nate Tobik (412)661-5700 x206 VigilantMinds > $theFile = fopen("docs/InstallationInstructionMaster.txt", "rb") || die; -- PHP General Mailing List (http://www.php.n

Re: [PHP] fopen on windows

2005-11-11 Thread Jasper Bryant-Greene
Jay Blanchard wrote: [snip] Well, it's a pretty model example of a line-by-line file read. I can't see anything wrong with it, so perhaps the problem lies elsewhere. There's no other files with the same name in your include_path? Maybe something to do with auto_detect_line_endings or whatever

RE: [PHP] fopen on windows

2005-11-11 Thread Jay Blanchard
[snip] Well, it's a pretty model example of a line-by-line file read. I can't see anything wrong with it, so perhaps the problem lies elsewhere. There's no other files with the same name in your include_path? Maybe something to do with auto_detect_line_endings or whatever it's called, in php.in

Re: [PHP] fopen on windows

2005-11-11 Thread Jasper Bryant-Greene
Jay Blanchard wrote: $theFile = fopen("docs/InstallationInstructionMaster.txt", "r") || die; I'm not sure if it would make any difference, but I usually use "or" in this case rather than "||", and I know they have different operator precedence. while(!feof($theFile)){ $theLine = fg

Re: [PHP] fopen

2005-10-26 Thread Jochem Maas
John Taylor-Johnston wrote: It does what I want, but I worry 4096 may not be big enough. Possible? 4096 is the number of bytes fgets() will get, but the fgets() call is inside a while loop which keeps running until the 'filepointer' (as denoted by the handle $dataFile) in question has reached t

Re: [PHP] fopen

2005-10-25 Thread Joe Wollard
On Oct 26, 2005, at 12:54 AM, John Taylor-Johnston wrote: It does what I want, but I worry 4096 may not be big enough. Possible? Is there a way to detect the filesize and insert a value for 4096? $buffer = fgets($dataFile, $filesize); Is this what it is for? John http://ca3.php.net/fopen

Re: [PHP] fopen

2005-10-25 Thread Stephen Leaf
if all you want to do is read the entire file try $contents = file_get_contents($filename); On Tuesday 25 October 2005 11:54 pm, John Taylor-Johnston wrote: > It does what I want, but I worry 4096 may not be big enough. Possible? > Is there a way to detect the filesize and insert a value for 4096?

RE: [PHP] fopen problem

2005-06-24 Thread Shaw, Chris - Accenture
Are you using the a or a+ modes on fopen, because I have a sneaky feeling the file doesn't exist. -Original Message- From: Ross [mailto:[EMAIL PROTECTED] Sent: 24 June 2005 00:33 To: php-general@lists.php.net Subject: [PHP] fopen problem * This e-mai

Re: [PHP] fopen problem

2005-06-23 Thread Richard Lynch
On Thu, June 23, 2005 4:33 pm, Ross said: > Warning: fopen(counterlog.txt) [function.fopen]: failed to open stream: > Permission denied in c:\Inetpub\wwwroot\pillars\index.php on line 30 The PHP user does *NOT* have permission to open the counterlog.txt file. Exactly *HOW* you change permissions

Re: [PHP] fopen problem

2005-06-23 Thread Esteamedpw
can you show the code? did you chmod the files?

Re: [PHP] fopen for http://

2005-05-27 Thread Philip Hallstrom
I was wondering if anyone knew of a way to call a web site using fopen. Let me tell you how things are set up and what I'm trying to do. I can call fopen to read a site and then echo it back out. That's not a problem. The problem I run into is when I try to go to a restricted area of a site.

Re: [PHP] fopen for http://

2005-05-27 Thread Rory Browne
On 5/27/05, Jay Paulson <[EMAIL PROTECTED]> wrote: > Hello all- > > I was wondering if anyone knew of a way to call a web site using fopen. > Let me tell you how things are set up and what I'm trying to do. I > can call fopen to read a site and then echo it back out. That's not a > problem. T

RE: [PHP] fopen

2005-03-20 Thread Kim Madsen
-Original Message- From: John Taylor-Johnston [mailto:[EMAIL PROTECTED] Sent: Saturday, March 19, 2005 7:03 AM To: php-general@lists.php.net Subject: [PHP] fopen > What can I add to get more info from the die? Do I to specify a > pathname in $defaultfile? Start by _removing_ @ to get w

RE: [PHP] fopen and http://

2005-02-25 Thread Richard Lynch
Warren Vail wrote: >> Hi, I'm having a problem with fopen and http files. I keep getting the >> error: >> >> Warning: fopen(http://zed/htdocs/rgfindingaids/series594.html ) >> [function.fopen]: failed to open stream: HTTP request failed! >> HTTP/1.1 404 >> Not Found in /home/awilliam/public_html/r

RE: [PHP] fopen and http://

2005-02-25 Thread Warren Vail
this helps, Warren Vail > -Original Message- > From: Mulley, Nikhil [mailto:[EMAIL PROTECTED] > Sent: Friday, October 08, 2004 6:58 AM > To: Adam Williams; php-general@lists.php.net > Subject: RE: [PHP] fopen and http:// > > > May be the path is not the correct

Re: [PHP] fopen and redirects

2005-02-25 Thread Richard Lynch
Warren Vail wrote: > I am using fopen with a url to open a remote file (read only of course). > The url I am providing results in a redirect and the fopen seems to be > smart > enough to follow the redirect to return the actual file contents. How can > I > get at the redirected filename? > > The p

Re: [PHP] FOPEN

2005-02-17 Thread Richard Lynch
Diana Castillo wrote: >How can I read the contents of a web page that uses basic > authentication? > I want to use fopen() but dont know how to do this and also send the > username and password You may be able to do embed the username/password in your URL: $file = fopen("http://username:[

RE: [PHP] FOPEN

2005-02-17 Thread Mikey
http://uk.php.net/header should help you. BTW, you should address your replies to the list and not to individual ppl. Mikey > -Original Message- > From: Diana Castillo [mailto:[EMAIL PROTECTED] > Sent: 17 February 2005 12:36 > To: [EMAIL PROTECTED] > Subject: Re: [PHP]

Re: [PHP] fopen problem using ftp

2005-02-15 Thread The Disguised Jedi
Why not use the built in FTP functions instead of fopen? us2.php.net/ftp Those should be able to handle any of the address problems you have, seeing as they don't use the ftp://username:[EMAIL PROTECTED] syntax, they open a connection and work with the FTP system. -- The Disguised Jedi [EMAIL

Re: [PHP] fopen problem using ftp

2005-02-15 Thread Richard Lynch
Giulio wrote: > HI all, > > I have a script that uses fopen to acces for read a file using ftp: > > $filepointer = fopen($address,'r'); > > having $address string formed this way: > > $address = > "ftp:/ > /".$FTPuser.":".$FTPpassword."@".$FTPserver."/".$FileFolder"."/".$FileNa > me; You really do

Re: [PHP] fopen, fsockopen on my virtual host

2005-02-01 Thread Al
Richard Lynch wrote: Al wrote: Richard Lynch wrote: Al wrote: I've got a script that fetches a stream from a file on our virtual host. Its been working fine; but, yesterday they changed something and it no longer works. Can you define "no longer works" a bit more clearly... Error messages? Just ti

Re: [PHP] fopen, fsockopen on my virtual host

2005-01-31 Thread Richard Lynch
Al wrote: > Richard Lynch wrote: >> Al wrote: >> >>>I've got a script that fetches a stream from a file on our virtual host. >>>Its >>>been working fine; but, yesterday they changed something and it no >>> longer >>>works. >> >> Can you define "no longer works" a bit more clearly... >> >> Error mes

Re: [PHP] fopen, fsockopen on my virtual host

2005-01-31 Thread Jochem Maas
Al wrote: Richard Lynch wrote: ... $str= file_get_contents(localhost?page=processqueue&login=Pmin&password=x) $str = file_get_contents('http://localhost/?page=processqueue&login=Pmin&password=x'); > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

Re: [PHP] fopen, fsockopen on my virtual host

2005-01-31 Thread Al
Richard Lynch wrote: Al wrote: I've got a script that fetches a stream from a file on our virtual host. Its been working fine; but, yesterday they changed something and it no longer works. Can you define "no longer works" a bit more clearly... Error messages? Just times out? What? $fp= fsockopen(

Re: [PHP] fopen, fsockopen on my virtual host

2005-01-31 Thread Al
Richard Lynch wrote: Al wrote: I've got a script that fetches a stream from a file on our virtual host. Its been working fine; but, yesterday they changed something and it no longer works. Can you define "no longer works" a bit more clearly... Error messages? Just times out? What? $fp= fsockopen(

Re: [PHP] fopen, fsockopen on my virtual host

2005-01-31 Thread Richard Lynch
Al wrote: > I've got a script that fetches a stream from a file on our virtual host. > Its > been working fine; but, yesterday they changed something and it no longer > works. Can you define "no longer works" a bit more clearly... Error messages? Just times out? What? > $fp= fsockopen("www.our

Re: [PHP] fopen/fpassthur

2004-12-14 Thread Matt M.
> Hi all, > I have created a download manger to handle files, when a user clicks a link > the file is sent though fopen() and fpassthru() you could try http://us3.php.net/readfile -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fopen/fpassthur

2004-12-14 Thread Sebastian
at the script for me and find any flaws ;) thanks. - Original Message - From: "Richard Davey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 14, 2004 12:27 PM Subject: Re: [PHP] fopen/fpassthur > Hello Sebastian, > > Tuesday, December

Re: [PHP] fopen/fpassthur

2004-12-14 Thread Richard Lynch
Sebastian wrote: > Q> I hope you have some good data validation going on too :) > > I am not too sure about how secure it is. basically, the files are called > by > an ID > eg, download?type=file&id=3 > > so i query the db to get check if its a valid id and get the filename from > the db as well. >

Re: [PHP] fopen/fpassthur

2004-12-14 Thread John Holmes
Sebastian wrote: Q> I hope you have some good data validation going on too :) I am not too sure about how secure it is. basically, the files are called by an ID eg, download?type=file&id=3 so i query the db to get check if its a valid id and get the filename from the db as well. if its not found it

Re: [PHP] fopen/fpassthur

2004-12-14 Thread Richard Lynch
Richard Davey wrote: > no need to exit() - it's the last line of > your script anyway. There was a bug in PHP for a very brief period of time where scripts were not ending under some conditions after all the content was delivered. If one is running that version of PHP, exit; at the end of a scrip

Re: [PHP] fopen/fpassthur

2004-12-14 Thread Richard Davey
Hello Sebastian, Tuesday, December 14, 2004, 4:19:31 PM, you wrote: S> header("Content-type: application/octet-stream"); S> header("Content-disposition: attachment; filename=" . $file['filename']); S> header("Content-transfer-encoding: binary"); S> header("Content-length: " . filesize($file['path

Re: [PHP] fopen/fpassthur

2004-12-14 Thread Richard Lynch
Sebastian wrote: > Hi all, > I have created a download manger to handle files, when a user clicks a > link > the file is sent though fopen() and fpassthru() > like this: fopen() + fpassthru() == http://php.net/readfile > is this the most practical way of doing it? i don't want to display file

RE: [PHP] fopen by URL is disabled, is there another way of readi ng a remote webpage?

2004-10-20 Thread Vail, Warren
CURL? http://www.php.net/manual/en/ref.curl.php Warren Vail -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 20, 2004 10:25 AM To: Chuck Barnett Cc: PHP General List Subject: Re: [PHP] fopen by URL is disabled, is there another way of

Re: [PHP] fopen by URL is disabled, is there another way of reading a remote webpage?

2004-10-20 Thread Jennifer Goodie
-- Original message from "Chuck Barnett" : -- > Hi, my new server has fopen by url disabled. My ISP doesn't want to turn it > on. So is there a way to do an equivilant function some other way? I need > to read a remote webpage and manipulate it. > > Thanks, > Chuck

Re: [PHP] fopen by URL is disabled, is there another way of reading a remote webpage?

2004-10-20 Thread Greg Donald
On Wed, 20 Oct 2004 10:46:34 -0500, Chuck Barnett <[EMAIL PROTECTED]> wrote: > Hi, my new server has fopen by url disabled. My ISP doesn't want to turn it > on. So is there a way to do an equivilant function some other way? I need > to read a remote webpage and manipulate it. #!/usr/bin/php htt

Re: [PHP] fopen and http://

2004-10-08 Thread Andrew Kreps
On Fri, 8 Oct 2004 08:33:11 -0500 (CDT), Adam Williams <[EMAIL PROTECTED]> wrote: > So now it works except on the > very last line it processes, it prints "does not exist", so there is still > some sort of a hidden character but its not affecting fetching the URLs > from the web server. so i'm sti

RE: [PHP] fopen and http://

2004-10-08 Thread Mulley, Nikhil
May be the path is not the correct ,just check with the Web Directory you configured to be and if its htdocs then I would say that its better to remove the htdocs from the path in fopen statement. -Original Message- From: Adam Williams [mailto:[EMAIL PROTECTED] Sent: Friday, October 08,

Re: [PHP] fopen and http://

2004-10-08 Thread Adam Williams
On Fri, 8 Oct 2004, Hendrik Schmieder wrote: > What say phpinfo about Registered PHP Streams ? > >Hendrik > > Hi, I think I just figured out my problem...I had to use rtrim($line) because I think there was a \n or an invisible character at the end of the line that was being passed to

Re: [PHP] fopen and http://

2004-10-08 Thread Hendrik Schmieder
Adam Williams schrieb: Hi, I'm having a problem with fopen and http files. I keep getting the error: Warning: fopen(http://zed/htdocs/rgfindingaids/series594.html ) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/awilliam/public_html/rgfaidstest.ph

Re: [PHP] fopen and http://

2004-10-08 Thread Adam Williams
On Fri, 8 Oct 2004, Matt M. wrote: > > But I don't understand why I am getting that error about failed to open > > strem: HTTP request failed, when I can bring up the links fine in a > > browser on the server running the php script. So can anyone help me out? > > Thanks > > do you have allow_url

Re: [PHP] fopen and http://

2004-10-08 Thread Matt M.
> But I don't understand why I am getting that error about failed to open > strem: HTTP request failed, when I can bring up the links fine in a > browser on the server running the php script. So can anyone help me out? > Thanks do you have allow_url_fopen enabled? http://us4.php.net/manual/en/r

Re: [PHP] fopen problem, 5 line script

2004-09-16 Thread Chris Dowell
o:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 10:17 AM To: php php Subject: Re: [PHP] fopen problem, 5 line script * Thus wrote Mag: Hi, Can someone tell me what I am doing wrong here please? http://www.google.com/index.html","r";); $contents = fread($fileptr, filesize

Re: [PHP] fopen problem, 5 line script [SOLVED!]

2004-09-15 Thread Mag
Got it, 'case anybody else needs this: $page = file_get_contents('http://www.google.se/index.html'); if(strstr($page, 'href="/imghp?hl=sv&tab=wi&ie=UTF-8"')) { $resultt = 1; } else {

Re: [PHP] fopen problem, 5 line script

2004-09-15 Thread Mag
--- Curt Zirzow <[EMAIL PROTECTED]> wrote: > * Thus wrote Mag: > > Hi, > > Can someone tell me what I am doing wrong here > please? > > > > > $fileptr = > > fopen("http://www.google.com/index.html","r";); > > > > $contents = fread($fileptr, filesize($fileptr)); > >... > > > > This is the erro

RE: [PHP] fopen problem, 5 line script

2004-09-15 Thread Vail, Warren
I thought filesize required the file name, and not the fileptr??? Warren Vail -Original Message- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 10:17 AM To: php php Subject: Re: [PHP] fopen problem, 5 line script * Thus wrote Mag: > Hi, > Can s

Re: [PHP] fopen problem, 5 line script

2004-09-15 Thread Curt Zirzow
* Thus wrote Mag: > Hi, > Can someone tell me what I am doing wrong here please? > > $fileptr = > fopen("http://www.google.com/index.html","r";); > > $contents = fread($fileptr, filesize($fileptr)); >... > > This is the error I get: > Warning: filesize(): Stat failed for Resource id #1 > (errno

Re: [PHP] fopen problem, 5 line script

2004-09-15 Thread Mark
--- Mag <[EMAIL PROTECTED]> wrote: > Hi, > Can someone tell me what I am doing wrong here please? > > $fileptr = > fopen("http://www.google.com/index.html","r";); > > $contents = fread($fileptr, filesize($fileptr)); http://us2.php.net/filesize int filesize ( string filename) > > if(strstr(

Re: [PHP] fopen with login credentials being an email address

2004-07-09 Thread raditha dissanayake
Gunter Sammet wrote: Yes I had quotes. And you're right the interpretation of the URL is as you laid it out. Unfortunatelly I don't have control on the login credentials. Tried %40 to replace the @ but then it won't be accepted as a login. Thanks for your reply! You need to use CHAP authenticati

Re: [PHP] fopen with login credentials being an email address

2004-07-09 Thread Justin Patrin
Is your login page a real HTML page? In that case you could use PEAR's HTTP_Client package to do the login and move on. http://pear.php.net/package/HTTP_Client On Fri, 9 Jul 2004 10:17:25 -0600, Gunter Sammet <[EMAIL PROTECTED]> wrote: > I tried that before manually with %40 and it didn't work. I

Re: [PHP] fopen with login credentials being an email address

2004-07-09 Thread Gunter Sammet
Yes I had quotes. And you're right the interpretation of the URL is as you laid it out. Unfortunatelly I don't have control on the login credentials. Tried %40 to replace the @ but then it won't be accepted as a login. Thanks for your reply! G. "Curt Zirzow" <[EMAIL PROTECTED]> wrote in messa

Re: [PHP] fopen with login credentials being an email address

2004-07-09 Thread Gunter Sammet
I tried that before manually with %40 and it didn't work. It's now valid but Apache seems to not recognize the login credentials and sends me to the login page. And that's the one I need to skip. Thanks! G. "Justin Patrin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Try using

Re: [PHP] fopen with login credentials being an email address

2004-07-09 Thread Justin Patrin
Try using urlencode on the e-mail address. On Thu, 8 Jul 2004 23:30:33 -0600, Gunter Sammet <[EMAIL PROTECTED]> wrote: > Hi all: > Tried to use fopen like this: > > fopen([EMAIL PROTECTED]:[EMAIL PROTECTED]); > > Didn't work and I couldn't find anything out on the search engines. > > Any sugges

Re: [PHP] fopen with login credentials being an email address

2004-07-08 Thread Curt Zirzow
* Thus wrote Gunter Sammet: > Hi all: > Tried to use fopen like this: > > fopen([EMAIL PROTECTED]:[EMAIL PROTECTED]); I hope you have some sort of quotes around that. > > Didn't work and I couldn't find anything out on the search engines. You simply cant have @ or : in the username, it violate

Re: [PHP] fopen newbie question

2004-07-06 Thread Josh Close
Can you post your code so we can see what might be going on? -Josh On Mon, 5 Jul 2004 13:06:58 -0400, Joe Carey <[EMAIL PROTECTED]> wrote: > I'm trying to read a text file from one server from another. When I read > from server A to B it works fine and I get the text output that I'm looking > f

Re: [PHP] fopen successful..cant write to the file though permissions are ok..

2004-06-11 Thread Matt Matijevich
[snip] $filename"/tmp/newfile"); $filehandle=fopen($filename,"w"); fclose($filehandle); [/snip] is this the exact code you are trying to use? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fopen errors

2004-02-19 Thread John Nichel
Hunter, Jess wrote: Thanks for the reply, you are right, the file is going on a Linux box, but the source file is located on the client computer (windoze). You cannot open a remote file by using it's directory path on the remote system. The two ways to do this would be to a) (recommended) open it

Re: [PHP] fopen errors

2004-02-18 Thread John Nichel
admin wrote: I have a PHP front end with a MySQL back end with a longblob field. Okay? I am thinking the problem exists in the PHP part. Probably not. Here is the code I am using: $fileHandle = fopen($fileUpload, "r"); $fileContent = fread($fileHandle, $fileUpload_size); $fileContent = addslashe

Re: [PHP] fopen() Problems

2004-02-06 Thread Jason Wong
On Saturday 07 February 2004 07:08, [EMAIL PROTECTED] wrote: > I am using the below code (kind of sloppy..). I have tried for fopen r+, > w, and w+, but no matter what I do, the file is always truncated, and > previously entered data is erased. I have been unable to fix this. Assuming that you'r

RE: [PHP] Fopen and streams

2004-01-29 Thread Mike Migurski
>Secondly, where is a good place to read on the standards and formats used >by these different schemes. In the fsockopen() func, I made some writes >to 'GET / ' and 'HTTP 1.1' etc... After reading the script, I understand >what these imply, but not the importance, also, what other commmands are >a

RE: [PHP] Fopen and streams

2004-01-29 Thread firephreek
Ok, so, I solved the problem, but haven't necessarily figured it out. I was using fopen() on a unique device, and getting a stream error. Rewrote the func using the basic example for fsockopen. I can now get the data I need without the errors, but now, a new question: If indeed there was some sor

Re: [PHP] fopen

2003-12-29 Thread Gerard Samuel
On Monday 29 December 2003 09:50 am, Cesar Aracena wrote: > Now it gives me the following error message: > > Warning: fopen(websitename/esp/files/welcome.txt): failed to open stream: > No such file or directory in d:\wwwroot\websitename\esp\lib\functions.php > on line 6 > > But the file exists and

Re: [PHP] fopen

2003-12-29 Thread Cesar Aracena
Now it gives me the following error message: Warning: fopen(websitename/esp/files/welcome.txt): failed to open stream: No such file or directory in d:\wwwroot\websitename\esp\lib\functions.php on line 6 But the file exists and so does the folder it is into. What can be wrong? I also uploaded the

Re: [PHP] fopen

2003-12-28 Thread Gerard Samuel
On Sunday 28 December 2003 11:17 pm, Cesar Aracena wrote: > $fp = fopen("../files/welcome.txt", "a+"); > Change to $fp = fopen("../files/welcome.txt", "r"); Use "r" to read, when you use "a" it appends (or adds) to the file Its also suggested to use the "b" option to so it would look like $fp =

  1   2   3   >