Fw: [PHP] File Write Permission Errors - HELP! URGENT!!!
Phil Powell
soazine at erols.com
Mon Nov 25 18:21:16 EST 2002
----- Original Message -----
From: "Phil Powell" <soazine at erols.com>
To: "Zac Hillier" <zac at affectors.net>
Sent: Monday, November 25, 2002 6:18 PM
Subject: Re: [PHP] File Write Permission Errors - HELP! URGENT!!!
> I got it but the solution was a lot more complicated than I imagined..
turns
> out that NO PHP script on the remote site can write to files due to
> permissions set up by Apache.. you have to go through a stub executable to
> do it, so your URL is not /chat/chat.php, it's
> /cgi-bin/cgiwrap/ppowell/php4.cgi/~ppowell/chat/chat.php and then you can
> write to the file!
>
> Phil
> ----- Original Message -----
> From: "Zac Hillier" <zac at affectors.net>
> To: "Phil Powell" <soazine at erols.com>
> Sent: Monday, November 25, 2002 8:03 AM
> Subject: Re: [PHP] File Write Permission Errors - HELP! URGENT!!!
>
>
> > try removing the quotes from around the a
> >
> > $fileID = fopen($path . "/nicknames.txt", a)
> >
> > ----- Original Message -----
> > From: "Phil Powell" <soazine at erols.com>
> > To: "Zac Hillier" <zac at affectors.net>
> > Sent: Monday, November 25, 2002 12:43 PM
> > Subject: Re: [PHP] File Write Permission Errors - HELP! URGENT!!!
> >
> >
> > > *This message was transferred with a trial version of CommuniGate(tm)
> Pro*
> > > Yes it does.. the permissions in the /chat folder are correct, but I
> still
> > > cannot create or write to either file!
> > >
> > > Phil
> > > ----- Original Message -----
> > > From: "Zac Hillier" <zac at affectors.net>
> > > To: "Phil Powell" <soazine at erols.com>
> > > Sent: Monday, November 25, 2002 7:42 AM
> > > Subject: Re: [PHP] File Write Permission Errors - HELP! URGENT!!!
> > >
> > >
> > > > Check that your server has the correct permissions on the folder.
> > > >
> > > > Zac
> > > > ----- Original Message -----
> > > > From: "Phil Powell" <soazine at erols.com>
> > > > To: <talk at nyphp.org>; <php-general at lists.php.net>
> > > > Sent: Monday, November 25, 2002 12:29 PM
> > > > Subject: [PHP] File Write Permission Errors - HELP! URGENT!!!
> > > >
> > > >
> > > > Hi I have the following code that breaks:
> > > >
> > > > // PLACE NICK INTO NICKNAMES.TXT AND START OFF MESSAGES.TXT
> > > > $fileID = fopen($path . "/nicknames.txt", "a") or die("Could not
> open
> > "
> > > .
> > > > $path . "/nicknames.txt");
> > > > chmod($path . "/nicknames.txt", 0755);
> > > > fputs($fileID, $nickname . "\
"); fflush($fileID);
fclose($fileID);
> > > > $fileID = fopen($path . "/messages.txt", "a") or die("Could not
> open
> > "
> > > .
> > > > $path . "/messages.txt");
> > > > fputs($fileID, "*** WELCOME \\"" . $nickname . "\\" TO THE ROOM
> ***");
> > > > fflush($fileID); fclose($fileID);
> > > >
> > > >
> > > > I am getting the following error:
> > > > Warning: fopen("/users/ppowell/web/chat/nicknames.txt", "a") -
> > Permission
> > > > denied in /users/ppowell/web/chat/chat.php on line 163
> > > >
> > > > I am attempting to write onto the files if they exist, if not,
create
> > them
> > > > on the fly. I need the solution in the next 5 minutes - sorry, kind
> of
> > an
> > > > emergency!
> > > >
> > > > If anyone can help, please tell me what to do, the PHP manuals are
not
> > > > giving me a clear solution as to how to write to a file that does
not
> > yet
> > > > exist that has to have the permissions of 0755 for both files.
> > > >
> > > > Thanx
> > > > Phil
> > > >
> > >
> > >
> >
>
More information about the talk
mailing list