Jump to content

Recommended Posts

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???

 

Link to comment
https://forums.phpfreaks.com/topic/83286-permissions/
Share on other sites

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);

?>

Link to comment
https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423747
Share on other sites

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?)

Link to comment
https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423762
Share on other sites

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.

 

Link to comment
https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423766
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423829
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.