slj90 Posted February 9, 2015 Share Posted February 9, 2015 Two questions today.Firstly, what is the cgi-bin used for and when should it be used? Should I put all my PHP scripts in there, for example the code that registers a user? What about HTML pages with PHP on them like the registration form itself?Secondly, when should I be changing CHMOD settings? Will my hosting service already of set them up correctly or do I need to change settings for certain pages etc.?Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/294473-cgi-bin-chmod/ Share on other sites More sharing options...
kicken Posted February 9, 2015 Share Posted February 9, 2015 The cgi-bin directory is a bit of a "the old days" thing. It was a location that would be configured to allow scripts or executable to be run via CGI. Files outside this directory typically had to be static or only use server-side-includes. These days you can usually put your scripts anywhere and the cgi-bin is obsolete. As far as chmod, it depends on what you're referencing. Again, in "the old days" your scripts that lived in the cgi-bin needed to have the execute bit set in order to run, so they were typically set to 755. These days this is unnecessary so you would typically just leave them at their default which is usually 664 or 644. You may need to change them for other reasons such as to allow writing to an uploads directory or similar. There are other ways to handle those situations typically as well. Quote Link to comment https://forums.phpfreaks.com/topic/294473-cgi-bin-chmod/#findComment-1505275 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.