Jump to content

[Solved] Johnny Php


se7enbot

Recommended Posts

It only affects PHP files because PHP files are executed through CGI (Apache passes them to PHP, PHP handles processing and tells Apache what to send). Not sure exactly why Apache does this for PHP (I'm assuming not allowing this provides security of some form), but it just really does not like PHP scripts when they're writable by the group.

 

All your other files (images, CSS, HTML, etc.) are just read from the hard disk and sent to the client.

 

EDIT: Beaten to it.

Edited by wolstech
Link to comment
Share on other sites

(Apache passes them to PHP, PHP handles processing and tells Apache what to send). Not sure exactly why Apache does this for PHP (I'm assuming not allowing this provides security of some form)

One of the fundamental principles of unix is that each tool should do only one job, and do it as perfectly as possible. Apache's purpose is to serve content over http/http2 protocol, and to be as secure and stable as possible. PHP is a separate process entirely, and it's purpose is to process scripts written in php and to be as secure and stable as possible. If apache also processed php scripts it would violate the one-tool-one-purpose unwritten rule. The idea is if you try to make one tool do too much then it won't be as perfect at all of it's different tasks. Since this is the case the kernel of linux does an exemplary job of linking these separate processes together with pipes and redirected stdout and stdin and stderr, etc.

 

See: https://en.wikipedia.org/wiki/Unix_philosophy#Do_One_Thing_and_Do_It_Well

Link to comment
Share on other sites

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.   Paste as plain text instead

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