Forum Moderators: coopster

Message Too Old, No Replies

Error Code Deciphering

         

Neo541

12:29 am on Apr 16, 2003 (gmt 0)

10+ Year Member



[15-Apr-2003 20:26:57] PHP Warning: fopen(<deleted>/data/data.csv): failed to create stream: HTTP wrapper does not support writeable connections. in /big/dom/<deleted>/www/aformmail.php on line 97

Does anyone know what this means? I'm stumped!

grahamstewart

12:37 am on Apr 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You are trying to open a file for writing. You may have specified the file name as starting with 'http://'

You can't open a file for writing using the http protocol.

If its a local file then make sure you specify it with a local path ('/usr/web/file') not an http:// path.

If you don't need to write to the file, then make sure you use fopen(filename, 'r');

Neo541

12:50 am on Apr 16, 2003 (gmt 0)

10+ Year Member



I tried the local version, and it gave me this:

[15-Apr-2003 20:49:00] PHP Warning: fopen(/big/dom/<deleted>/www/data/data.csv): failed to create stream: Permission denied in /big/dom/<deleted>/www/aformmail.php on line 97

Any thoughts?

grahamstewart

1:28 am on Apr 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sounds like you don't have permission to read the file.
Remember that php may not run under your username, it often runs as 'nobody/nobody'.

So to make a file readable you must set its permissions to make it readable to everybody. Likewise if you want to write to it then everyone must be able to write to it.

eaden

10:07 am on Apr 16, 2003 (gmt 0)

10+ Year Member



what he said, so try "chmod 770" or "chmod 777" the file in your ftp client.

Neo541

9:13 pm on Apr 16, 2003 (gmt 0)

10+ Year Member



try "chmod 770" or "chmod 777" the file in your ftp client.

I tried those, and it didn't do any good...I have no idea what's going on, and my web host just said it's a "coding problem." I've tried two or three different scripts that work on other servers, and still have the same error!

DrDoc

9:27 pm on Apr 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try deleting the current file and user PHP to create an empty file with the same name. Then upload your file and let it overwrite the one created by PHP.

Again, make sure permissions are set to 777 for both the file and subdirectory.

jatar_k

9:36 pm on Apr 16, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I have had a similar problem to this. DrDoc is right but I wouldn't be surprised if you can't upload the file, it may tell you that you don't have permission.

I just use a little creation script while developing that makes the needed files and a clean up script that deletes them. Then I can create and delete them allowing php to do whatever it needs to them because the ownership/permissions are correct.

Neo541

10:03 pm on Apr 16, 2003 (gmt 0)

10+ Year Member



I had no trouble following DrDoc's instructions, but it didn't seem to do any good..:(