Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Essential PHP Security

Posted by samzenpus on Mon Feb 13, 2006 02:04 PM
from the raise-shields dept.
Michael J. Ross writes "Given the remarkable popularity of PHP for developing dynamic Web sites, as well as the ever-increasing need for security on those same sites, one would think that there would be great demand for — and comparable supply of — books that explain how to create secure sites using PHP. However, such is not the case, and even the most extensive general purpose PHP books may only devote a single chapter to this critical topic, if that much. Essential PHP Security, written by PHP expert Chris Shiflett, aims to fill the gap." Read the rest of Michael's review.
Essential PHP Security
author Chris Shiflett
pages 109
publisher O'Reilly Media
rating 7
reviewer Michael J. Ross
ISBN 059600656X
summary A concise introduction to PHP security principles and practices.


O'Reilly has a Web page for the book, where they offer a sample chapter (Chapter 4: Sessions and Cookies), in PDF format, as well as the book's table of contents, index, errata, and links to the online version of the book, in O'Reilly's Safari service. As of the writing of this review, the confirmed errata is reassuringly sparse, and the unconfirmed errata is nonexistent, which speaks well of the author keeping on top of reader feedback — a worthy quality not shared by all technical writers. The author also has his own Web site dedicated to the book, where he has posted a table of contents, brief reader reviews, and two free chapters in PDF format: Chapters 2 (Forms and URLs) and 4.

In the book's forward, Andi Gutmans briefly explains how increasing Internet usage has resulted in a corresponding increase in security risks, for individuals and businesses operating online. He also notes that most of the security problems related to PHP-based applications, are not the result of weaknesses in the language itself, but rather in the way that developers have used the language in creating those applications. The intent of the book is to bring together the guidelines and lessons learned for writing secure PHP code, into a single volume. He concludes by noting that most of the principles presented in the book apply equally well to other Web development languages.

The bulk of the book's material is organized into seven chapters, focusing on the following topics: forms and URLs, databases and SQL, sessions and cookies, includes, files and commands, authentication and authorization, and shared hosting. These are preceded by an introduction, which oddly is labeled as a chapter. The true chapters are succeeded by three appendices, which cover the topics of configuration directives, functions, and cryptography. A short index rounds out the volume.

In the introduction, Shiflett presents the security-related PHP features, principles, and best practices that he uses as a foundation throughout the rest of the book, when focusing on the specific PHP topics covered by all of the subsequent chapters. The two features of PHP discussed are: register globals, of which most experienced PHP developers know the dangers, and PHP's error reporting capabilities. The four principles espoused by the author for writing secure PHP systems are: safeguard redundancy, minimum privileges, clarity through simplicity, and minimizing data exposure. The heart of the book appears to be his four recommended practices: tempering usability with security, tracking input and output data, filtering all input, and escaping or encoding output to preserve its meaning.

The seven topic chapters that follow the introduction provide fairly terse coverage of how those principles and practices are put to use, when designing and implementing forms, URLs, SQL commands, sessions, cookies, etc. Each subtopic within them is discussed briefly, and illustrated with code snippets.

If anyone is well-suited to writing such a work, it is Chris Shiflett, a well-known authority on PHP security, a respected contributor to the PHP community, founder and spokesman of the PHP Security Consortium, and founder and President of Brain Bulb, a PHP consulting firm.

In light of the author's expertise, one would presume that he would make every effort to write the definitive volume on PHP security — covering every conceivable topic, including: execution of system commands, verification of user IDs and authorization, e-mail spamming via Web forms, (the related topic of) exclusion of bots, and remote procedure calls. However, Essential PHP Security does not discuss those critical matters specifically. Moreover, the topics chosen are discussed in a rather cursory manner. The code samples throughout the book are generally quite minimal, with little to no explanation as to how they work. In addition, many of the techniques presented are but variations on the theme of "filter user input." These weaknesses may be why the book clocks in at only 109 pages. In fact, the seven core chapters comprise only 71 pages, leaving the reader to wonder how PHP security could possibly be adequately plumbed by such a short treatment.

On the other hand, there is something to be said for terse writing, as wizened fans of Kernighan and Richie's C language classic can attest. In agreement would be any developer who has purchased one of the many 700+ page technical tomes that turn out to be padded with excessive margins, poorly-tested code, and pointless appendices lifted from the respective products' documentation. Perhaps Shiflett intended his book to be more a primer on PHP security, rather than a comprehensive coverage — and hence the title of the book. As such, it would primarily be of value to PHP developers unfamiliar with basic security pitfalls and defenses. Regardless, any PHP developer would be wise to begin with this book as a first step towards PHP security mastery, but even wiser if they were to follow it up with more substantial works, as well as keeping current by reading security-focused Web sites and other current publications.

Michael J. Ross is a freelance writer, computer consultant, and the editor of PristinePlanet.com's free newsletter."


You can purchase Essential PHP Security from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • Don't use a shared host.

    'Nuff said.
  • As Ben Franklin once said... (Score:4, Funny)

    by Dr. Photo (640363) on Monday February 13 2006, @02:16PM (#14709350)
    (Last Journal: Wednesday October 22 2003, @08:13AM)
    "Those who use essential PHP and expect security deserve neither."

    (*sniff, sniff*... mmm... do I smell karma roasting?)
  • a first for everything (Score:3, Informative)

    by Anonymous Coward on Monday February 13 2006, @02:16PM (#14709358)
    this is the first time i've already owned a book before a slashdot review of it came up. It gives me that warm and fuzzy feeling inside.

    I think the reviewer hit just about everything important about this book. The only thing I would add is I didnt feel the discussion about sessions was in depth enough. Nothing about how session data is actually stored on the server or how to secure it.

    other than that great book, because it is so short everything is easy to find.

    • Better session system (Score:5, Interesting)

      by DavidPesta (673248) on Monday February 13 2006, @02:35PM (#14709570)
      For sessions, I find it more practical to drop the native PHP session system and create my own session system by connecting a user cookie to a database entry. Then you can have better access to the session data and more security, even encrypting the session data inside the database if you want. You can also modify the cookie "key" every so often to hinder someone who may have compromised the user's machine and is looking for session cookies.

      Also the advantages of doing this:
      1. You are given the option to separate the user sessions database from page navigation/scripts on different servers if you anticipate massive amounts of traffic someday and want a cluster of servers.
      2. It is not less efficient than the PHP session system. The native PHP sessions are file-based and also access the disk. With the user account_id as a primary key as a part of their cookie, session data access is very fast, perhaps faster in some cases.

      It wouldn't surprise me if that is why the author doesn't talk about PHP sessions much. Extremely high-traffic applications shouldn't use them IMO.
      [ Parent ]
  • Christ Shiflett (Score:5, Informative)

    by Bogtha (906264) on Monday February 13 2006, @02:18PM (#14709367)

    What are the credentials of Chris Shiflett? He's widely touted as a "PHP security expert", but Stefan Esser [php-security.org] has a beef with him, and claims that this book contains serious flaws and misunderstandings [php-security.org].

    I understand that people in the public eye like book authors are vulnerable to any crank that comes their way, but the problems that Stefan has highlighted do seem to point to a severe credibility problem, and Stefan, while prone to flaming, certainly knows what he is talking about.

    In the interests of fairness, you should also read Chris Shiflett's response [shiflett.org].

  • Two thumbs up (Score:4, Informative)

    by knightinshiningarmor (653332) on Monday February 13 2006, @02:19PM (#14709387)
    I have read this book in the past month, and it is very good at explaining PHP security from a very general perspective. It talks about encryption theory, SQL injection in genereal, filesystem permissions, etc. Very good read/reference for web developers who aren't as familiar with system/network security.
  • Looking for a more holistic approach? (Score:4, Informative)

    by psydeshow (154300) on Monday February 13 2006, @02:24PM (#14709437)
    (http://psydeshow.org/)
    If you're looking for a system-wide approach to PHP Security, one that covers everything from shell commands and service tuning up through application-level security policy implementation, you should check out Apress' Pro PHP Security [apress.com].

    Cheers!
  • The problem is not PHP security (Score:4, Informative)

    by Anonymous Coward on Monday February 13 2006, @02:29PM (#14709497)
    The problem is Not PHP Security, but general Coding practice. If you code bad, you will do it in any language. There are lots of thumb up rules (like defensive programming, checking value input, never trusting anyone, etc...) - know these, and you will not need to read books like these.
    A good code on that (and a lot more) probably would be Code Complete, and Code Complete2
    • There are two kinds of audiences for books like these (my wild speculation to follow):

      1. Developers switching languages who need to know how to implement these security practices in a new language - when I moved from ASP to PHP and others (thank God!) I had to rebuild much of my code library in a new language. Obvious things (to me) like input validation were just a little more difficult without a resource. I've had formal programming education and plenty of real-world experience - now it's just a matter of porting the concepts from one technology to another.

      2. New developers that don't have any idea about secure programming practices - many web developers become programmers to meet their clients' needs. These developers often go from designing and building static websites to building database-driven apps. Whereas your brochure site usually doesn't need to validate input, your web app does - from SQL injection to cross-site scripting, these concepts are foreign to someone.
      [ Parent ]
    • Re:The problem is not PHP security by masklinn (Score:3) Monday February 13 2006, @03:31PM
  • PHP Security Book Roundup (Score:4, Informative)

    by Anonymous Coward on Monday February 13 2006, @02:37PM (#14709592)
    In the interest of completeness, here's a complete round-up of all the books dedicated to PHP security currently on the market:

  • Support the Author (Score:5, Informative)

    by shiflett (151538) on Monday February 13 2006, @02:47PM (#14709703)
    (http://shiflett.org/)
    If you want to save some money and also support the author (me), please use this link:

    http://phpsecurity.org/buy [phpsecurity.org]

    You get the book for less than $20. :-)
  • cursory mannerisms (Score:2)

    by digitaldc (879047) * on Monday February 13 2006, @02:51PM (#14709744)
    Moreover, the topics chosen are discussed in a rather cursory manner. The code samples throughout the book are generally quite minimal, with little to no explanation as to how they work.

    Here! This is what I mean! YOU figure out the rest!!

    [html]
    [head]
    [title]
    PHP Code sample etc. etc. etc.
  • Response to the Review (Score:5, Interesting)

    by shiflett (151538) on Monday February 13 2006, @02:55PM (#14709785)
    (http://shiflett.org/)

    I wanted to reply to one thing, because it's a very valid point:

    In light of the author's expertise, one would presume that he would make every effort to write the definitive volume on PHP security -- covering every conceivable topic, including: execution of system commands, verification of user IDs and authorization, e-mail spamming via Web forms, (the related topic of) exclusion of bots, and remote procedure calls.

    I deliberately chose to focus this book on the 80%, and I'm actually happy that I did. PHP's reputation suffers because of security concerns, and I'm sure you'll see some of that expressed here. I want PHP developers who read this book to focus on what's most important, and the principles and practices that they learn along the way should prepare them to deal with more minor concerns.

    The execution of system commands is covered, but you're right that email injection is missing. HTTP response splitting is another. The second edition might include these, but they really boil down to the same thing as so many other vulnerabilities. If you filter input and escape output, neither are a concern. (After a recent change to header(), HTTP response splitting is no longer a concern, but we'll have to work with older versions of PHP for quite some time.)

    Thanks for reading, and I hope it helps!

  • Essential PHP Security (Score:1, Funny)

    by Iron E (948355) on Monday February 13 2006, @03:06PM (#14709897)
    #!/usr/bin/perl -w
  • by ben_1432 (871549) on Monday February 13 2006, @03:08PM (#14709917)
    The real problem with PHP and security is that it's perceived as insecure. There are countless stories of people losing their forums, blogs, websites etc to hackers, defacers and script kiddies.

    This book might address how to code in PHP more securely, but that is not going to address the much more perceivable problem of "THIS SITE HAS BEEN H4X0RZED".

    What's needed is for some *real* professionals to sit down and go through all the popular open source packages - phpbb, nuke etc - and identify and remove as many problems as possible.

    That would obviously be a huge effort, but it's a necessary step imho.

    At the least, a solid, secure framework should be released that the softwares could be based on so there is a rigorous, thorough filtering of all input/output, and the onus is partially removed from the people who mean well but write shitty software.
  • The problem is not PHP (Score:3, Funny)

    by loconet (415875) on Monday February 13 2006, @03:17PM (#14710015)
    (http://www.loconet.ca/)
    As an experienced PHP developer who has been involved in many small and large projects, usually involving several other programmers, I can say that the problem with PHP's security is not PHP itself but rather the inability of exploits to punch the programmer in the face.

  • by SmallFurryCreature (593017) on Monday February 13 2006, @03:49PM (#14710323)
    (Last Journal: Friday August 17, @05:34AM)
    Two students developed a new website for a volunteer organisation as part of their education. Something like an internship, anyway for them it was a temp job. They didn't finish it and since I volunteerd in the past for doing work for them I am now putting the finisching touches on it.

    Yuck.

    To look at the code I am once again reminded why I always feel sick when someone tells me that I am going to have to work together with a person with a degree. As far as I know they passed with this project yet it is totally and utterly crap. Oh of course it does not work cross-browser. Yes it has many bits of codes wich don't actually doesn't do shit. A 100 line switch statement that always does the same thing for instance but that ain't the worst of it.

    The worst of it is that security is non-existent. They use the old '?page=page1' in the url to switch content. I like this approach in itself as it leaves you with only 1 code file wich is accessible from the outside. I also like to make fucking sure that 'page' is filled only with values that I expect. They just insert it in an sql statement and execute it.

    Shudder.

    Could a book teach guys like this about security? NO.

    It is not the first time I see shit like this. To many IT students just are to young and naive to think about security. Or rather to not think about security but just do it. Nobody had to teach me that trusting userinput is bad. I know it is. How?

    Well, I don't know I just do. Perhaps it is all the years of low level cracking of games where you alter a string somewhere to give you more health/money whatever. Perhaps it is just being a suspicious bastard.

    Security is not a set of easy to follow rules, security is not trusting people.

    PHP is a usefull enough language that unfortunally in its basic install comes with some features that can really bite you in the ass. I always disable them on any server I control and then have to spend a lot of time correcting everyone elses code to work on a secured server. Oh and if I see one more person use PHP native sessions I am going to kill that motherfucker. Especially when it is used to store 1 value. Just use a fucking cookie instead of glogging the HD in resource eating insecure way.

    ANyway, the review of the book? Well it covers the very basics. If you still need to be told this, just stay away from the web. This is akin to a cooking book telling you not to have a boiling pot of water on the first burners of your stove when a little kid is around. What I read of it all falls into the 'duh' category.

  • by pmc255cool (951391) on Monday February 13 2006, @04:31PM (#14710757)
    Save yourself some money by buying the book here: Essential PHP Security [amazon.com]. And if you use the "secret" A9.com Instant Reward discount [amazon.com], you can save an extra 1.57%!
    • 1 reply beneath your current threshold.
  • HackThisSite.org? (Score:1)

    by SheeEttin (899897) <sheeettinNO@SPAMgmail.com> on Monday February 13 2006, @04:31PM (#14710764)
    (http://sheeettin.ath.cx/)
    So, I guess HTS [hackthissite.org] will have to update some of their hacking challenges.
  • Shared server admin (Score:1, Interesting)

    by Anonymous Coward on Monday February 13 2006, @05:25PM (#14711365)
    What about administrator perspective? I administer a LAMP site with lots of daily hammering in the style of "index.php?wget; chmod 755; ./script;blah...". Some of it actually got through, and it launched a DOS attack on some other site. Although server is grsecurityised, apache runs under nobody, there are still problems. How can I contain each virtual host in its own environment, cpu time limiting, stuff like that? Any keywords for google?
  • by tinkertim (918832) on Monday February 13 2006, @10:54PM (#14713525)
    (http://echoreply.us/)
    I can't but get a little sick when I see a whole book written on something so incredibly simple.

    The reason you see PHP being exploited is not the security of the host OS, not the security of PHP (well almost never) , its the lack of knowledge by the person owning the computer hosting the sites and companies like The Planet [theplanet.com] who hand them out to literally anyone with a Paypal account or credit card number.

    I can in 20 minutes show any experienced Linux system administrator how to run PHP completely wide open as far as functionality is concerned on a shared hosting environment and how to do it relatively safely.

    Your average web hosting company is a business person who has money to buy servers with idiot proof (nearly) control panels such as C-Panel / WHM [cpanel.net].

    They're also likely to come with RHEL, Centos 3 or 4 or Fedora. Very rarely do I see a Debian server used in a shared hosting situation (That should also tell you something).

    These boxes are not secure yet they go immediately into production.

    SO! To anyone who cares, (and reads this far) here is Tinkertim's checklist :

    1 - Egress filtering (firewall the damn box),

    2 - Get rid of that fat, bloated leaky modular kernel. Monolithic kernels are too easy to build not to do it. Don't forget to keep iptables, test with your firewall when done.

    3 - Seek and loop world writeable directories, or mount them as noexec. Even doing that is not going to save you all of your trouble. As nobody I can run /bin/sh -x /tmp/mybot.sh just fine on most linux distros even if /tmp is noexec. So dammit go toss the 3 lines of code in /bin/sh that keps uid/gid 99 from doing that.

    4 - Don't even THINK about using apache/proxy on a shared hosting setup. Thats just incredibly stupid and self destructive.

    5 - Look around in /dev ... make sure you took ALL the tools away that helps people get bad code onto your box in the first place. /dev/tcp is just as lethal as leaving wget available on a fedora / RHEL installation. Use mknod and make them safe. Same with /dev/udp .. remake them.

    6 - Get rid of what you don't need. Rename what you do and use scripts to help govern them. Lynx / wget / POST / GET (and everything else RHEL/Centos comes with) can be used to do dastardly things. Take advantage of user / group ownership that is found in Unix.

    7 - lsof is your friend. Write a script to check for open accepting inet sockets that don't belong.

    8 - (finally) VERIFY YOUR ORDERS ... stop making instant setup hosting accounts. Use fraud screening services. Remember a security hole is only a problem if you sell space to someone who's intention is to exploit it.

    Web hosts are the scurge of the planet. I know , I am one :) But I do things a bit differently than most. There's things you (yourself) can do if your stuck on shared hosting to ensure and nudge your host into securing their boxes.

    I may just re-post later or re submit with that list too. I'm off the soap box now. My point is this. We (shared web hosts) made this problem. We have a responsibility to admit it and stop it. I'll work on some checklists and scripts to do it for the lazy bastards and GPL them. Tired of people getting rich writing books making hype about what (should be) a very trivial issue.

  • Must-have for all the PHP developers (Score:3, Insightful)

    by garyli (954345) on Monday February 13 2006, @10:58PM (#14713545)
    Chris Shiflett has definitely created a masterpiece that I personally believe only he is capable of. His experience and precise, easy-to-read manner of writing are unparalleled when it comes to PHP security.

    One of the things I liked about this book is that you don't need to be sat next to your PC to read it. Though it has many nice and clear code examples, it's mainly about principles and theory. Excellent to have on the bedside table.

    It isn't a very thick book, but is written in a clear and accessible style, and I found myself going 'aha' all the way through. I read it quickly but have a feeling that I'll return to it often until all those best practices are memorised and I'm 'doing' them.

    What is most useful about this book is the aggregation in one place of descriptions of all of these security attacks and vulnerabilities in PHP code, along with suggestions on dealing with them.

    The only specific attack missing which I would like to have seen information about is email spamming through website forms. However the general principles described in the book will help prevent these attacks as well.

    This book will definitely be a long-term desktop reference for me and mandatory reading for all the PHP developers in my work place. I would definitely reccomend this book to aspiring PHP developers and think it would also benefit some of the more experienced folks out there.

    --
    Webmaster of Spy [e-spy-software.com]

  • by malraid (592373) on Monday February 13 2006, @11:33PM (#14713697)
    ... other fine books like the Amish Phone Book or List of Human Rights in Comunist China
     
      Laugh, it's funny....
  • hah (Score:1, Flamebait)

    by Heembo (916647) on Tuesday February 14 2006, @02:55AM (#14714190)
    I'm sorry - with all the PHP holes over the last year - PHP and Security seems like a contradiction in terms!
  • by Jordan Catalano (915885) on Monday February 13 2006, @02:48PM (#14709705)
    (http://nothingtoseehere.us/)
    I have a feeling people read the first few words of my post, saw that it looked whiny, and completely missed the joke (therefore labeling it "offtopic", which baffles me). Sad. It wasn't that bad a joke.
    [ Parent ]
  • Re:Wrong answer (Score:2, Insightful)

    by psbrogna (611644) on Monday February 13 2006, @03:13PM (#14709967)
    Out of curiosity, what's wrong with gluing together components? The painting by numbers analogy to programming can work as long as the template and palette is acceptable. Granted, you still have to understand how the systems behaves in its entirety, but you have to in either case.
    [ Parent ]
  • Re:What's the big deal? (Score:2, Informative)

    by larry bagina (561269) on Monday February 13 2006, @03:13PM (#14709968)
    (Last Journal: Friday October 19, @09:21PM)
    [ Parent ]
  • Re:Wrong answer (Score:2, Insightful)

    Lets see, I work in the security area for my employer and have done web development (not design) work as well. I say that PHP can be used to create rich dynamic sites that are secure. So, now, would you care to back up your accusation of PHP as a programming language being insecure with some real facts?

    Sure, there have been holes in countless PHP applications. However, this is not the fault of the language. In fact, almost all of these problems come down to programmers not properly validating user input before processing it. This is true of pretty much all languages. PHP gets a bad name because its easy to learn and people pick it up and write insecure apps with it. Thats like blaming the hammer when the house falls down.

    [ Parent ]
    • 1 reply beneath your current threshold.
  • Re:Wrong answer (Score:5, Insightful)

    by dk.r*nger (460754) on Monday February 13 2006, @03:46PM (#14710292)
    Would you mind accommodating your +1 Insightful and tell the world why?
    The same reason that MySQL is crap, because you really, really need stored procedures, views and transactions to keep track of 20.000 messages in 1.500 threads?
    The same reason that Java sucks for everything, always and C never does?
    The same reason that compiled languages are always better than interpreted ones?

    Of course, that reason I'm referring to is arrogance.

    Don't get me wrong. I'm actually halfway to a MSc in Computer Science, and frequently have my ego challenged by kids and their flash 'applications', drag'n'drop VB crap and funny web apps that trust me to let it pass critical information in the URL.. These kids tend to think that I'm learning useless crap because they already know. Naturally I'm all warm inside when I get to give their 'application' 500% speedup by adding an index to a table.

    But what makes PHP itself unsecure? Yes, PHP wants to be proporly configured. And if you let 50 kids run amok on the same server, sure they'll fuck something up (though never outside of the PHP user).

    Now imagine a production webserver, to where only qualified developers has access, and only tested PHP code is put on. Works for me, has for a long time.

    Oh, and concluding that all PHP is paint by numbers because it's a scripting language is just ignorant.
    #include stdio.h anyone? Not enough of a real man to write your own IO routines, so you're stuck with gluing together libc stuff "in a paint-by-numbers style"? bah..
    [ Parent ]
  • Re:Wrong answer (Score:1)

    by 228e2 (934443) on Monday February 13 2006, @03:46PM (#14710293)
    This isnt Jeopardy. give us an "answer" to the question, or i cant see why this shouldnt be modded as flamebait ;/
    [ Parent ]
  • by creimer (824291) on Monday February 13 2006, @04:21PM (#14710644)
    (http://www.creimer.ws/ | Last Journal: Friday January 26 2007, @12:40PM)
    It's a definitely a web browser problem. Unfortunately, because I'm using PHP and the way my template is laid out, CSS is not working on Safari. Unlike a security problem, this probably won't be fixed soon unless I re-work my template.
    [ Parent ]
  • http://jigsaw.w3.org/css-validator/validator?uri=h ttp%3A%2F%2Fwww.creimer.ws%2F [w3.org]

    ( Enter your web site URL into http://jigsaw.w3.org/css-validator/ [w3.org] )

    It looks like you have some parse errors in your CSS.

    Maybe those are causing Safari to mis-render it ?
    [ Parent ]
  • Re:Wrong answer (Score:1)

    by vgaphil (449000) on Monday February 13 2006, @04:34PM (#14710801)
    Why? What should we use?
    [ Parent ]
  • by LordLucless (582312) on Monday February 13 2006, @05:33PM (#14711463)
    So you're not saying that PHP is insecure, you're saying that all scripting languages (loosely-typed, interpreted not compiled) are insecure.
    [ Parent ]
  • Mod parent WRONG (Score:3, Funny)

    by scragz (654271) on Monday February 13 2006, @06:12PM (#14711877)
    (http://scragz.com/)
    There's a wonderful utility that secures PHP. . .http://tomcat.apache.org/ [apache.org]

    FYI to other readers of parent comment, that does nothing to help secure PHP or your PHP code. It won't even run my sample application below:
    <?php
    if (isset($_POST['name'])) {
        exec("echo 'your name is: '. $_POST['name']");
    }
    ?>
    <form action="./" method="post"><input name="name" /></form>
    [ Parent ]
  • by creimer (824291) on Monday February 13 2006, @07:02PM (#14712292)
    (http://www.creimer.ws/ | Last Journal: Friday January 26 2007, @12:40PM)
    So Safari is choking on the CSS file even though the elements causing a parse error are not being used? Is Safari that sensitive to the CSS file?
    [ Parent ]
  • by jshpro2 (948112) on Monday February 13 2006, @08:32PM (#14712849)
    Every variable in PHP has a type as well, and using an undeclared variable gives an E_NOTICE level error, PHP recommends running in E_ALL which will cause scripts to output errors when you use uninitialized variables. FYI PHP does check the syntax of your script, if you try to run a script with a parse error it will not run at all. Whether or not a developer chooses to run their applications with E_ALL error reporting is their problem, there's also pros to running an interpreted script over compiled code.
    [ Parent ]
  • 13 replies beneath your current threshold.