Regarding PHP security risks, I would say they're no worse than the other languages you mention. Any language can pose security risks if care is not taken, but PHP is not to my knowledge any risker than Python or Perl.
As to why they're part of the default open source stack -- well, because they're so handy and are good for quick creation and modification opf programs, they are a very useful part of the open source toolkit. Because they are so useful, they got included in the default stack. We're just lucky they all start with the letter "P!"
Dig Deeper on Linux servers
Related Q&A from Bernard Golden
Expert Bernard Golden answers a question regarding best practices for Xen. Continue Reading
An open source software and applications expert describes his observations about the progress the Linux Foundation has been making towards creating ... Continue Reading
Find out why one open source software and applications expert doesn't think that Red Hat's and Canonical's refusals to partner with Microsoft will ... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.