[PHP] php fopen https error

2013-09-25 Thread Markus Falb
With RHEL/CentOS 5 php I get an SSL Error RHEL/CentOS 5 php is at 5.1.6 with security fixes backported. ?php $handle = fopen(https://maps.google.com;, r); $contents = stream_get_contents($handle); fclose($handle); ? will result in something like Warning: stream_get_contents(): SSL: fatal

Re: [PHP] php fopen https error

2013-09-25 Thread Shawn McKenzie
I believe this was a bug, is only a warning that may be suppressed and may have been fixed in 5.2.0. Are you aware that PHP is at 5.5.4 and that 5.1.6 is over 7 years old? -Shawn On Wed, Sep 25, 2013 at 9:09 AM, Markus Falb markus.f...@fasel.at wrote: With RHEL/CentOS 5 php I get an SSL

Re: [PHP] php fopen https error

2013-09-25 Thread Shawn McKenzie
Just as I thought: 5.2.0 Fixed bug #39039 SSL: fatal protocol error when fetching HTTPS from servers running Google web server). (Ilia) On Wed, Sep 25, 2013 at 10:03 AM, Shawn McKenzie shawn.mcken...@gmail.comwrote: I believe this was a bug, is only a warning that may be suppressed and may

Re: [PHP] php fopen https error

2013-09-25 Thread Markus Falb
On 25.9.2013 17:12, Shawn McKenzie wrote: Just as I thought: 5.2.0 Fixed bug #39039 SSL: fatal protocol error when fetching HTTPS from servers running Google web server). (Ilia) Thanks, but ... I am not sure how what I am supposed to do with this information. #39039 says it is a bug and it

Re: [PHP] php fopen https error

2013-09-25 Thread Markus Falb
On 25.9.2013 17:03, Shawn McKenzie wrote: I believe this was a bug, is only a warning that may be suppressed and may have been fixed in 5.2.0. Are you aware that PHP is at 5.5.4 and that 5.1.6 is over 7 years old? Please understand that some Distributions do the only backport security stuff

Re: [PHP] php fopen https error

2013-09-25 Thread Shawn McKenzie
I thought I covered that. The bug was fixed 7 years ago. Upgrade PHP, I doubt there is a patch. I understand that not all coders or distributions will have the latest version of PHP, but come on, how many thousands of bugs have been fixed in 7 years? You're going to run into more.

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

[PHP] fopen and load balancing

2013-02-10 Thread Adam Tong
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 servers are not load balanced. I know that he could load the

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

[PHP] fopen() on a network share?

2009-06-15 Thread Brian Dunning
Running on Windows... I have a network share, \\sharename\foldername, and I want to write a file. How do I format the pathname with fopen() for this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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.

[PHP] fopen not working corectly on remote IIS

2008-11-11 Thread Starsites
Hi I have this problem for 6 months now and still no answer that solve the problem With the php I retrieve the information viewers enter in form field on a previous page after the submit. php then should take that info and proces it into a single line. After it is processed it should be

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)

[PHP] fopen never ends?

2008-02-19 Thread Paul van Brouwershaven
When you run the folling script, it will never ends? I have seen this more then once, I know that there is no service running at the target host, but why is the script not printing the failed message? It's only with a few ip-number I have this problem. if ($fp = fopen('https://81.23.227.9',

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.

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

2007-12-27 Thread Albert Wiersch
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. What would cause this behavior? Why does fopen() occasionally fail to

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

[PHP] fopen function and charset

2007-10-02 Thread Mauricio Muriel
Hi. 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? Regards -- Mauricio

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

[PHP] fopen and fwrite r+

2007-01-13 Thread Richard Kolseth
I'm collecting data from a form and using it to write to a flat file like so: Quote: //this removes line breaks in an text field box and substitutes double breaks $postbody = str_replace(\r\n, br/br/,$postbody); $thepost = $postitle | $postdate | $postbody | $author \r\n; if ($posttype==add)

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

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

2006-12-07 Thread mike xu
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); } There is an

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/

[PHP] fopen: space character in filename

2006-07-28 Thread Christian Calloway
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 or may not have a space character; so for example: fopen

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

[PHP] fopen failing, permission denied

2006-02-28 Thread Dan Baker
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 the folder. Is

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

[PHP] fopen/fwrite and owner/group settings

2006-01-05 Thread Mathijs
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 in advanced -- PHP

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

[PHP] fopen on windows

2005-11-11 Thread Jay Blanchard
$theFile = fopen(docs/InstallationInstructionMaster.txt, r) || die; while(!feof($theFile)){ $theLine = fgets($theFile, 4096); echo $theLine . br\n; } fclose($theFile); The above code appears to work, but all that is output is lines of line breaksno data. The file is a tab

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

[PHP] fopen

2005-10-25 Thread John Taylor-Johnston
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 #http://ca3.php.net/fopen $filename = /var/www/html2/assets/about.htm ; $dataFile =

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

[PHP] fopen problem

2005-06-23 Thread Ross
I have a bit of a problem when using fopen, fwrite and fclose locally I get the flowing warnings Warning: fopen(counterlog.txt) [function.fopen]: failed to open stream: Permission denied in c:\Inetpub\wwwroot\pillars\index.php on line 30 Warning: fwrite(): supplied argument is not a valid

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

[PHP] fopen for http://

2005-05-27 Thread Jay Paulson
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 problem I run into is when I try to go to a restricted

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

[PHP] fopen problems

2005-03-24 Thread AJ Lemke
Hello all, I have an install of php on a Red Hat Ent. server that is giving me fits. I have been trying to use the fopen command to retreive files from external sites and have been getting this error: Warning: fopen(http://us3.php.net/images/php.gif): failed to open stream: HTTP request failed!

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_

[PHP] fopen

2005-03-18 Thread John Taylor-Johnston
Hi, FOpen question. My script is dying. Our results file could not be opened for writing What can I add to get more info from the die? Do I «have» to specify a pathname in $defaultfile? John $defaultfile = ffmail.txt; #default file to write to @ $results = fopen($datafilename, a); #open

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

[PHP] fopen and redirects

2005-02-24 Thread Warren Vail
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 is the file contains html

[PHP] FOPEN

2005-02-17 Thread Diana Castillo
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 -- Diana Castillo Global Reservas, S.L. C/Granvia 22 dcdo 4-dcha 28013 Madrid-Spain Tel : 00-34-913604039 Ext 216 Fax :

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 =

[PHP] fopen problem using ftp

2005-02-15 Thread Giulio
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; This script always worked for me, it has now stopped

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

[PHP] fopen, fsockopen on my virtual host

2005-01-31 Thread Al
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. $fp= fsockopen(www.oursite.org, 80, $errno, $errstr, 30); I can use any remote site and fscockopen works fine. Anyone have a suggestion as

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

[PHP] fopen/fpassthur

2004-12-14 Thread Sebastian
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: header(Content-type: application/octet-stream); header(Content-disposition: attachment; filename= . $file['filename']); header(Content-transfer-encoding:

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

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

2004-10-20 Thread 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

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

[PHP] fopen and http://

2004-10-08 Thread Adam Williams
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.php on line 15

  1   2   3   4   >