PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Switching From PHP to CGI - Large Website

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Switching From PHP to CGI - Large Website

    Following successfully repairing our search facility, which had been inactive for some time due to php memory limits, we became increasingly aware of the benefits of a CGI search for large websites (after staring at the FAQ for hours on end).

    And so, we decided recently to make the switch, as our memory limit on php has to be set to 128mb, which can't be good for the server.

    On the index, we have selected CGI/Linux, and uploaded all of the files to the cgi-bin directory on the server. The CHMOD settings are as recommended, and we no longer get a 500 internal server error, but a simple blank page.

    Following speaking to the host of our dedicated server, they informed us that the suEXEC module was to blame for this behaviour, and recommended placing the files in a location only accessable by the admin, var/www/...etc etc. Following doing this, and changing the cgi-bin alias to point to the new location, we're still having no luck.

    The search can be seen at www.landlordzone.co.uk/cgi-bin/search.cgi

    The current search is also available at www.landlordzone.co.uk/zoom/search.php

    Do you have any suggestions, or are we going to have to stick with PHP?

  • #2
    All the common CGI problems and solutions can be found here.

    The server error 500 (which you seem to be getting at the moment) is too general to know what the exact problem is. Servers return error 500 for just about every possible error.

    suEXEC is not part of the standard Apache install. And we aren't totally familar with it.

    But after doing some reading, it seems that there are about 19 different reasons why suEXEC might not run a CGI. This is in addition to the half a dozen reasons we mentioned on our FAQ page for a CGI not working.

    Plus you are going to be something of a Linux Guru to understand what suEXEC does. The Apache people decided not to include it into Apache due the complexity of getting it right.

    But having said that. The CGI is a better solution for a large site as it performs so much better (once you get it installed).

    Comment


    • #3
      suEXEC should be producing log files which indicate the error. You should consult these log files for more information on what the problem is, or contact your host in regards to accessing these logs.

      Also of note, though it may seem like you are getting a blank page and not a "500 Internal Server Error", this is actually not the case. If you do a "wget" or use this web sniffer tool to examine the HTTP response, the server is actually still returning a "500 Internal Server Error" as part of its HTTP response. The only difference is that your browser (presumably Internet Explorer, but we have found similar behaviour with Firefox) is not displaying the error, and likely thinks there should be a custom error message to display (but since there isn't one, they end up showing nothing).
      --Ray
      Wrensoft Web Software
      Sydney, Australia
      Zoom Search Engine

      Comment

      Working...
      X