Re: Creating Files Windows vs Unix

From: Date: Thu, 15 Mar 2001 07:11:41 +0000
Subject: Re: Creating Files Windows vs Unix
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-43979@lists.php.net to get a copy of this message
I believe it is a *nix server. I haven't looked into directory permissions before but that is an area I will definately look into. If this was a problem with the directory permissions, would the problem still disappear if a file with the correct name was already in the directory? -Thanks Andrew V. Romero To reply personally, remove all numbers from address. ICQ# 54080914 David Robley wrote: > On Thu, 15 Mar 2001 17:20, Andrew V. Romero wrote: > > Today I was uploading my completed script to my school's server at > > > > http://www.u.arizona.edu/~avr/school/questionanswer.phtml?questionFileN > >ame=testQA and noticed when I fill in the form and hit submit, I get a > > lot of errors such as unable to access current working directory, > > unable to access my file, and unable to find file identifier. In > > problem shooting, I changed the permissions of all the files for this > > script so that everyone can read write and execute them but I still get > > the errors. I suspect it has to do with the way my script creates a > > file. In qa.php3 I have the following line which seems to create a file > > if it does not exist: > > $answerFile = "$questionFileName-A.txt"; Then I go along and open this > > later with $wa=fopen("$answerFile","a"); > > In problem shooting I tried uploading a blank file with the name > > $questionFileName-A.txt and it worked just fine after that, but that > > will not work for my long term goals On my home computer with win98, > > apache, and php this seems to work without a hitch (even if the file > > doesn't exist), but appartently it doesn't work for my school's server. > > I was wondering why it works on my computer but not on the server (I > > suspect it may have something to do with security)?? > > > > To get around this, I supose I need a few lines of code that first test > > if my file exist and then if it doesn't I will have to create it using > > the touch command?? Any other ideas? > > Is this a *nix server? In which case you may have problems with the > directory permissions. Note that the directory as well as file > permissions must be set to allow the webserver user to read and write if > you wish to create files. Also the directory structure must at least > allow access down the tree to the point where you are working. > > -- > David Robley | WEBMASTER & Mail List Admin > RESEARCH CENTRE FOR INJURY STUDIES | > http://www.nisu.flinders.edu.au/ > AusEinet | > http://auseinet.flinders.edu.au/ > Flinders University, ADELAIDE, SOUTH AUSTRALIA > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#43979) next »