Author |
|
bagu
Joined: 06 Jan 2011 Posts: 193 Location: France
|
Posted: Mon 30 May '11 13:50 Post subject: How to use fcgi for php |
|
|
Hello,
I want to use fcgi to run php, but i don't understand how to make it working.
The how-to don't help me so i wonder if someone can explain me how to make it working.
Thanks in advance. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 30 May '11 14:17 Post subject: |
|
|
Here my working config. it is not a how to. Please ask if you wanna know this or that is.
Code: |
LoadModule fcgid_module modules/mod_fcgid.so
<IfModule fcgid_module>
FcgidInitialEnv PHPRC "c:/php/"
FcgidInitialEnv PATH "C:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
FcgidInitialEnv SystemRoot "C:/Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:/WINDOWS/TEMP"
FcgidInitialEnv TMP "C:/WINDOWS/TEMP"
FcgidInitialEnv windir "C:/WINDOWS"
FcgidIOTimeout 40
FcgidConnectTimeout 10
FcgidMaxProcesses 1000
FcgidOutputBufferSize 64
FcgidProcessLifeTime 120
FcgidMaxRequestsPerProcess 10000
FcgidMinProcessesPerClass 0
FcgidFixPathinfo 1
# Global Config Example
<Files ~ "\.php$">
Options Indexes FollowSymLinks ExecCGI
AddHandler fcgid-script .php
FcgidWrapper "c:/php/php-cgi.exe" .php
</Files>
</IfModule>
|
|
|
Back to top |
|
bagu
Joined: 06 Jan 2011 Posts: 193 Location: France
|
Posted: Mon 30 May '11 14:50 Post subject: |
|
|
I use such the same config but i get this error :
Quote: |
Program: D:\php\php-cgi.exe
R6034
An application has made an attemp to load the C runtime library incorrectly. |
Ok, i found the problem...
Because i'm on windows XP, i must use :
Code: | FcgidInitialEnv SystemRoot "C:\Windows" |
instead of :
Code: | FcgidInitialEnv SystemRoot "C:/Windows" |
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
|
Back to top |
|
bagu
Joined: 06 Jan 2011 Posts: 193 Location: France
|
Posted: Mon 30 May '11 18:03 Post subject: |
|
|
Already done
An other problem :
When i try to go on http://www.byjs.fr/admin/
it fail...Page not found...
But when i don't use fcgid, it work fine.
Any idea ?
EDIT : problem solved with :
FcgidFixPathinfo 0 |
|
Back to top |
|
bagu
Joined: 06 Jan 2011 Posts: 193 Location: France
|
Posted: Mon 30 May '11 21:44 Post subject: |
|
|
Hello,
i just see that php_admin_value don't work under fcgid...
I have this in my vhost :
Code: | php_admin_value error_log e:/www/wwwbagubiz/logs/php_error.log |
How can i do the same thing with fcgid ?
Thanks. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
|
Back to top |
|
bagu
Joined: 06 Jan 2011 Posts: 193 Location: France
|
Posted: Mon 30 May '11 23:34 Post subject: |
|
|
I don't understand how to make it working...
I have set this :
Code: | user_ini.filename = ".ht.user.ini" |
And i put a file called .ht.user.ini on the root directory of a virtualhost.
There is only one line in it :
Code: | php_admin_value error_log e:/www/wwwbagubiz/logs/php_error.log |
But, when i do a phpinfo, i have :
Code: | error_log d:/wamp/logs/php_error.log d:/wamp/logs/php_error.log |
So the value isn't modified.
Can you tell me what is wrong ?
Thanks in advance.
EDIT :
For the moment, and while I did not find how to run the thing i use :
Code: | [PATH="e:/www/wwwbagubiz/html"]
error_log = "e:/www/wwwbagubiz/logs/php_error.log" |
in my php.ini |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
|
Back to top |
|
bagu
Joined: 06 Jan 2011 Posts: 193 Location: France
|
Posted: Tue 31 May '11 13:09 Post subject: |
|
|
Ok, but in this topic,
Code: | FcgidInitialEnv PHPRC "/home/user2" |
Is made to use only the php.ini witch is in /home/user2 ? no ?
I want to do the same thing, but to alter the original php.ini
So there would be only one php.ini, but whose content is changed by file user.ini
I will take a look in Fcgid vars to see if one of them will do wath i search to do. |
|
Back to top |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Wed 28 Dec '11 8:03 Post subject: |
|
|
Why do you set:
FcgidOutputBufferSize 64
What is the advantage of this over the default 65000 |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 28 Dec '11 20:09 Post subject: |
|
|
bagu wrote: |
So there would be only one php.ini, but whose content is changed by file user.ini
I will take a look in Fcgid vars to see if one of them will do wath i search to do. |
Yes you can use a global ini and changes values per directory. But as the manual says: Quote: | Only INI settings with the modes PHP_INI_PERDIR and PHP_INI_USER will be recognized in .user.ini-style INI files. | So you can't changed everything, but many stuff. See http://de3.php.net/manual/en/configuration.file.per-user.php |
|
Back to top |
|