Re: moving from mod_php to mod_fcgid : rewrite problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ben

Do other PHP scripts function as expected when executed via mod_fcgid?
Or do they all return the error string, "No input file specified" and a
404 response?

Actually my website redirect all urls to /index.php, so there is only one php file (that loads many others). This way I implement a request controller easily.

My PHP framework functions the same way via mod_php as it does with
mod_fcgid and mod_fastcgi. I achieved this by using a well-known
technique to rewrite the URLs (I place these directives into the
site-root's .htaccess file):

<IfModule mod_rewrite.c>
   RewriteEngine on
   Options All

   # Modify the RewriteBase if you are using a subdirectory and the
   # rewrite rules are not working properly:
   # WARNING: Do not include a trailing slash on this directive if you
   # include a path other than /!
   #RewriteBase /

   # Rewrite URIs of the form 'index.php?q=x' (except for real
   # files/directories):
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d

   RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>


Yes I understand now that query_string is more portable than path_info. Thanks for the tip.


I'm not sure that this is a problem with the PATH_INFO variable since
the error occurs even before php has any chance to start executing (the
test.php is not executed at all in test1)

This may be for the reasons outlined in the article that I cited above.
If you'd like to post your CGI wrapper script, I'd be happy to take a
look. Alas, you may lack access to this script, in which case, it's a
moot point. Although, I must say, it seems unlikely that your host would
have misconfigured the wrapper script. (Then again, we've all seen worse.)


See the answer of Benoit Georgelin, he kindly added the script to this thread. Hoping this is the beginning of a solution. I know absolutely nothing about these wrapper scripts.

--
Riccardo Cohen
+33 (0)6 09 83 64 49
Société Realty-Property.com
1 rue de la Monnaie
37000 Tours
France

<http://www.appartement-maison.fr>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux