#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Honolulu, HI USA
    Posts
    6
    Rep Power
    0
    I need to verify for my boss that PHP is not single-threaded like CGI because we're developing an internet-based application that will potentially handle MANY simultaneous hits (to a database/php3 files, etc). Isn't it true that PHP is multi-threade when compiled as an Apache module (otherwise what would be the point of using php with multithreaded databases like postgreSQL?) Someone please confirm this for me!!
    thanks,
    amelia
  2. #2
  3. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    62
    Apache itself at present is not multithreaded (the next version will be). While I know many people grasp at 'multithreaded' as a catchword for high-performance computing, the multiple process model has been doing very well for Apache even now.

    On the other hand, I know that PHP4.0 will work with multithreaded servers also. I believe PHP is multithreaded, but I couldn't say for sure what methods they use. At least it doesn't need to start up a new process every time PHP code is executed from a page (THE major drawback of CGI). I will say, that with PHP4, using the Zend Optimizer, and using persistent database connections, you will probably NOT find a more efficient way to serve web content. Maybe server-side Java with Oracle, on very high-end Sun Machines could outpace PHP in this area, but not much else comes close. Other than that, the only thing faster would be custom server software.

    If you want an example, the Lycos MP3 search site is powered by PHP. (http://www.zend.com/zend/cs/lycos.php)

Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 11:45 PM
  2. Executing PHP script using crontab with PHP module
    By crazyIvan in forum PHP Development
    Replies: 0
    Last Post: January 23rd, 2004, 09:27 AM
  3. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 02:14 PM
  4. Passing string from PHP to Javascript
    By ka8oad in forum JavaScript Development
    Replies: 4
    Last Post: January 17th, 2004, 04:12 PM
  5. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 02:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo