Back Home

Open Designs

Community. Driven.

  1.  
    This is a funny little question that my friend thought up.
    Can you crash a server with a php script math function to divide by zero?
  2.  
    No. PHP would throw an error, e.g.

    Warning: Division by zero in /path/to/script.php on line X
  3.  
    LOL! That probably happened in PHP 0.1 beta!
  4.  
    lol.
    • CommentAuthorEcko
    • CommentTimeMay 11th 2008 edited by Ecko on the 11th May 2008 at 00:18:46 EDT
     
    How about making a script that plays with imaginary numbers?
  5.  
    No, about the worst you can do on a properly configured server is start an infinite loop. At that point, PHP will use all the memory it is allotted, and stop.

    On a really poorly configured server, you could execute server commands to delete important files and shutdown the system.