Re: [PHP] fopen and load balancing

2013-02-12 Thread ma...@behnke.biz
Adam Tong adam.to...@gmail.com 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

Re: [PHP] fopen and load balancing

2013-02-11 Thread ma...@behnke.biz
Adam Tong adam.to...@gmail.com 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

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,

Re: [PHP] fopen and load balancing

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

Re: [PHP] fopen and load balancing

2013-02-10 Thread Adam Richardson
On Sun, Feb 10, 2013 at 5:41 PM, Adam Tong adam.to...@gmail.com 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

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 network share? On Mon, Jun 15, 2009 at 7

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,

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

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

2009-06-15 Thread Andrew Ballard
On Mon, Jun 15, 2009 at 7:24 PM, Shawn McKenzienos...@mckenzies.net 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

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

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)

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

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 log of all

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

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 create

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.fopenhttp://localhost/Source/test/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

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

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

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

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($fp);

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.fopenhttp://localhost/Source/test/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: 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 may

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 and I need

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 for

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 in

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

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 assigns TRUE to

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

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

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 =

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

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

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.net/)

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, $line

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

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

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

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

Re: [PHP] fopen problem

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

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

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

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 have to specify a pathname in $defaultfile? Start by _removing_ @ to

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 problem

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 ,just check with the Web Directory

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

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] FOPEN how do I

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 =

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 don't need all those '.'

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

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=

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=

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=

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=processqueuelogin=Pminpassword=x) $str = file_get_contents('http://localhost/?page=processqueuelogin=Pminpassword=x'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

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 messages? Just times out?

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=fileid=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
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/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
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 script

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

Re: [PHP] fopen/fpassthur

2004-12-14 Thread Sebastian
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 14, 2004, 4:19:31 PM, you wrote: S header(Content

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

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 You

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

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?

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_fopen

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

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 the

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

Re: [PHP] fopen problem, 5 line script

2004-09-16 Thread Chris Dowell
: 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? ?php $fileptr = fopen(http://www.google.com/index.html,r;); $contents = fread($fileptr, filesize($fileptr

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? ?php $fileptr = fopen(http://www.google.com/index.html,r;); $contents = fread($fileptr, filesize($fileptr)); http://us2.php.net/filesize int filesize ( string filename)

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? ?php $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=2 - No

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 someone

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? ?php $fileptr = fopen(http://www.google.com/index.html,r;); $contents = fread($fileptr, filesize($fileptr)); ... This is the error I get: Warning:

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=svtab=wiie=UTF-8')) { $resultt = 1; } else {

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

2004-07-09 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 violates the

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

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

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.

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

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

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

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 =

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

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

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

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

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 =

Re: [PHP] fopen url

2003-12-10 Thread prashant
in this regard as soon as possible ??? Thanks, Prashant S Akerkar - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, November 08, 2003 3:37 PM Subject: Re: [PHP] fopen url On Saturday 08 November 2003 08:21, John Hagstrand wrote: Thanks

Re: [PHP] fopen custom 404 issue

2003-12-10 Thread Jason Wong
On Thursday 11 December 2003 08:48, Mike D wrote: I am trying to read in a particular page to a variable. How do you handle if the page is a 404 and then redirects to a custom error page? Am I supposed to use fsockopen and read headers or ?? Ideally I need to pull the end-result page to search

  1   2   3   >