FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Server PHP file functions issues?

 


cr3ativ3
Ok, I have been recently trying to get a secure file script working on these servers without and resolve. 777 is a unsafe chmod level so I tried using 755 which other sites said is secure and should still work but no it complains unable to write because its 755 then I use 775 which also doesn't work the only level that will work for writing is 777 so I decided to chmod the folder to 777 right before writing then chmod back to 755 but it can't seem to chmod it now so.....

I also tried using ftp functions but it appears if you ever want to write something using ftp you have to have a local copy of the file I wish you could just like store something in a variable then create a file on the site and write to it using ftp's write functions. But ya.

So is there anything you guys can think of other then using a database?
fromegame
You can make a folder (for example xxx.frih.net/folder1/) CHMODDED TO 755!

Then make another subfolder (for example xxx.frih.net/folder1/folder2) and CHMOD THAT TO 777.

Now it's just safe as a hacker can't connect to the first folder, so also not to the second folder. PHP is so smart to do this, though.

I don't know if you can also place the PHP script in de root (xxx.frih.net). But I think you need to place the php file in de folder1 directory.

Hope this clears some things up.

Good Luck!
cr3ativ3
Oh I see now thanks.
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.