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
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
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,
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
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
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
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,
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.
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
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.
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)
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.
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
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
[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
# [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
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
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
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
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
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);
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/
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
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
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
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
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
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
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
[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
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 =
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.
--
[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
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 =
[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
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
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/)
[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
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
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?
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
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
can you show the code? did you chmod the files?
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
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
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
-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
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
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
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
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
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 =
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 '.'
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
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
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=
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=
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=
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:
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?
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
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
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'] .
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
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
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
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
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
-- 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
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
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?
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
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
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
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,
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
: 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
--- 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)
* 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
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
--- 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:
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
{
* 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
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
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
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
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.
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
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.
[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
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
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 =
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
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
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
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
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
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 =
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
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 - 100 of 216 matches
Mail list logo