Results 1 to 6 of 6
  1. #1

    php-cgi isn't work with mod_rewrite


    I have been using apache and php-cgi and it works well together but when I tried to use
    mod_rewrite it stopped working and I got "Internal Server Error" result.
    Apache error log showed "FastCGI: incomplete headers (0 bytes) received from server"

    I think that mod_rewrite rules are ok because when I refer to some HTML file then it all works.

    Apache 2.2.14 and php 5.2.11

    Thanks for any advice.

  2. #2
    Join Date
    Oct 2009
    Try to add the following handler in the .htacess file .

    AddHandler php-cgi .php .htm

  3. #3
    Thanks for reply.

    I handle .php with
    AddType application/x-httpd-fastphp .php
    and then for each VirtualHost
    Action application/x-httpd-fastphp /fcgi-bin/php
    If I add AddHandle code, browser shows error that doesn't know how to handle file with application/x-httpd-fastphp type.

  4. #4
    Join Date
    Oct 2009

    Please try adding the following and see if the error persists
    AddHandler php-cgi .php
    Action php-cgi /cgi-bin/php
    Windows/Linux Expert; Plesk/Cpanel/Ensim Guru.
    ..and an expert spam tracker.

  5. #5
    I've deleted "Action application/x-httpd-fastphp /fcgi-bin/php" and added your two lines
    (I've used /fcgi-bin/php instead of /cgi-bin/php).
    Apache responds with the same error - "Internal server error" in the browser and "Incomplete headers..." in the log.

  6. #6
    Does anybody know what to do ?
    Or would I rather try different forum ?

Similar Threads

  1. how do i enable mod_rewrite to work with wordpress?
    By nocloud in forum Hosting Security and Technology
    Replies: 1
    Last Post: 02-18-2006, 05:53 PM
  2. [for hire] mod_rewrite (SEO) / php work
    By layouts4sale in forum Employment / Job Offers
    Replies: 1
    Last Post: 10-15-2005, 09:46 AM
  3. mod_rewrite will simply NOT work (already searched)
    By josue in forum Programming Discussion
    Replies: 4
    Last Post: 06-29-2004, 01:59 PM
  4. Simple mod_rewrite example won't work
    By null in forum Programming Discussion
    Replies: 3
    Last Post: 05-15-2004, 08:46 AM
  5. [for hire] MOD_REWRITE work.
    By layouts4sale in forum Employment / Job Offers
    Replies: 3
    Last Post: 05-22-2003, 01:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts