ohdang888 Posted December 26, 2007 Share Posted December 26, 2007 ok...i'm REALLLLYYYYY confused about permissions. i use apche with xammp. i've been having toruble with some forms lately, partly its because of permissions. i've tried to google it but nothing understandable comes up... its in .htaccess, right? but do i hve to copy and paste that document into every folder of the site, or do i only i have one .htaccess...??? what part of the code do i change to allow people to write on files in certain parts of my site??? Quote Link to comment https://forums.phpfreaks.com/topic/83286-permissions/ Share on other sites More sharing options...
teng84 Posted December 26, 2007 Share Posted December 26, 2007 http://www.php.net/manual/en/function.chmod.php maybe! Quote Link to comment https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423742 Share on other sites More sharing options...
ohdang888 Posted December 26, 2007 Author Share Posted December 26, 2007 so do i need to put that code on the top of each and every page. also, i have a comment system, so people have to be able to write on that. so would it be this?>? <?php // Everything for owner, read and execute for others chmod("/somedir/somefile", 0755); ?> Quote Link to comment https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423747 Share on other sites More sharing options...
teng84 Posted December 26, 2007 Share Posted December 26, 2007 also, i have a comment system, so people have to be able to write on that. so would it be this?>? write where folder or text file? Quote Link to comment https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423751 Share on other sites More sharing options...
DyslexicDog Posted December 26, 2007 Share Posted December 26, 2007 There are file privileges that you need to change. What OS is your server running? Quote Link to comment https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423753 Share on other sites More sharing options...
ohdang888 Posted December 26, 2007 Author Share Posted December 26, 2007 the comments are stored in a database. Quote Link to comment https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423755 Share on other sites More sharing options...
ohdang888 Posted December 26, 2007 Author Share Posted December 26, 2007 windows vista home premeium Quote Link to comment https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423756 Share on other sites More sharing options...
drummer101 Posted December 26, 2007 Share Posted December 26, 2007 windows vista home premeium What OS is your webserver on (unless you're running it off your home comp) you don't have to worry about chmod on windows anyways Can you give us a hint as to what permission problems you've been having? (error messages and the likes?) Quote Link to comment https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423762 Share on other sites More sharing options...
ohdang888 Posted December 26, 2007 Author Share Posted December 26, 2007 for example. i'm creating a gaming site (more for learning purposes).... with tons of games eing added, i don't want to have to do it manually... i want to create a form that will have field where i can enter all the unique info for that webpage. heres what i have so far <?php // Everything for owner, read and execute for others chmod("../create", 0700); ?> <?php $name = $_POST["name"]; $folder= $_POST["folder"]; mkdir('c:/xammp/htdocs/create/new/$folder', 0700); $newindex = "index.php"; $fh1 = fopen($newindex, 'w') or die("can't create file"); fwrite($fh1,$name); fclose($fh1); ?> <html> <form method="post"> Name of game:<input type="text" size="15" maxlength="30" name="name"/> <br/> folder name:<input type="text" size="15" maxlength="30" name="folder"/> <br/> <input type="submit" name="submit" value="Submit"/> that code in lcoated in "mysite/create". but its not working. Quote Link to comment https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423766 Share on other sites More sharing options...
ohdang888 Posted December 27, 2007 Author Share Posted December 27, 2007 whats wrong with it? Quote Link to comment https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423811 Share on other sites More sharing options...
trq Posted December 27, 2007 Share Posted December 27, 2007 Use a database to store your content, creating folders and index.php pages for each page of your website is rediculous, you may as well go back to using html. PHP and MySql can help you create dynamic websites without the need to make new files. Your really missing the entire point here. Quote Link to comment https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423829 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.