How is FastCGI supposed to work? - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: System Setup & Installation (/forum-32.html) +--- Thread: How is FastCGI supposed to work? (/thread-3549.html) Pages: 1 2 |
How is FastCGI supposed to work? - MrMarv - 06-17-2008 05:56 AM Hi Guys and Ladies, I am currently installing Omega RC5 on my FreeBSD 7 Box. After some changes every little here and there the installation process worked. My Problem now is: PHP Files are not beeing parsed and output as plain text. Regarding to this I added these following lines to /usr/local/etc/apache22/Includes/00_master.conf AddType application/x-httpd-php .php .phtml AddType application/x-httpd-php-source .phps into to <IfModule mod_php5.c> section. After this my php files are parsed but another Problem came out of the sudden. Browsing to index.php outputs: "Warning: session_start() [function.session-start]: open(/usr/local/www/ispcp/gui/phptmp//sess_399c18f14a6c8107b1a5938feeb49224, O_RDWR) failed: Permission denied (13) in /usr/local/www/ispcp/gui/include/ispcp-lib.php on line 27" Which totally makes sense since this directory is only writeble for user "vu2000" and my phpfiles are run using user "www", the apache user. (i found out using phpinfo) For me it seems like there is a missconfiguration somewhere between Apache(2.22.8) and the php interpreter. Booth the mod_php5 and the fcgi are loaded as the server header says: "Server: Apache/2.2.8 (FreeBSD) mod_ssl/2.2.8 OpenSSL/0.9.8e mod_fastcgi/2.4.6 PHP/5.2.6 with Suhosin-Patch" My question is: How is the setup supposed to be and what settings need I to set so that php is run as vu2000? It would be quite interesting to see your config files in this case! If you need further information dont hesitate contact me! Many thanks in advance! Marv RE: How is FastCGI supposed to work? - MrMarv - 06-18-2008 04:44 AM Hey, after some working it was not able to figure out which module or whatsoever handles php files. My /usr/local/etc/apache22/httpd.conf (please have a look on the modules...) http://nopaste.bsdforen.de/1213726945 and the included /usr/local/etc/apache22/Includes/00_master.conf http://nopaste.bsdforen.de/1213728992 as well as ispcp.conf http://nopaste.bsdforen.de/1213727376 This config will prevent php from being parsed! As you might have seen in 00_master.conf i tried with setting mod_php5 to handle the files. This worked greatly... besides that all the scripts are running as www which prevents the whole script from working, not to speak about the security risk of running a hosting environment like this. You could make me very happy with posting your working configs, or even an excerpt of them! Greetings! RE: How is FastCGI supposed to work? - Cube - 06-18-2008 05:13 AM You should not use mod_php5 but fastcgi_ispcp. Do not use the default fastcgi-config. I have no clue about FreeBSD, but on Debian this one can be loaded with "a2enmod fastcgi_ispcp". RE: How is FastCGI supposed to work? - MrMarv - 06-18-2008 05:36 AM Hi! Cube Wrote:You should not use mod_php5 but fastcgi_ispcp. Do not use the default fastcgi-config. I have no clue about FreeBSD, but on Debian this one can be loaded with "a2enmod fastcgi_ispcp". There is a module called "fastcgi_ispcp" ? It seems that i do not have this one, i searched the whole system but nothing there. What do you exactly mean by "Do not use the default fastcgi-config"? Which part in my config is this then? As Debians "a2enmod" only makes symlinks from /etc/apache22/mods-available to mods-enabled AFAIR, could you please tell my what is this module? Regards! Marv RE: How is FastCGI supposed to work? - Cube - 06-18-2008 06:00 AM I described it not exactly enough. There is no module fastcgi_ispcp, there's only fastcgi. But there is the default-config in mods-available (fastcgi.conf, fastcgi.load) and the ispcp-version (fastcgi_ispcp.conf, fastcgi_ispcp.load) and that's the one you should use. RE: How is FastCGI supposed to work? - MrMarv - 06-18-2008 06:18 AM Cube Wrote:I described it not exactly enough. There is no module fastcgi_ispcp, there's only fastcgi. But there is the default-config in mods-available (fastcgi.conf, fastcgi.load) and the ispcp-version (fastcgi_ispcp.conf, fastcgi_ispcp.load) and that's the one you should use. YEAY! You made my day! After locating the config file, including it and resetting all the changes i made it seems to work perfekt now! Neither the fastcgi_ispcp.conf nor fastcgi.conf were included in my apache config since they have been placed in some strange dirs. This might be a FreeBSD related bug/misconfiguration. I really thank you! Now i am going to have some fun with my fresh CP! I have the unproven feeling that i will come back to this forum very soon... i would not be surprised of some upcoming errors Greetings! RE: How is FastCGI supposed to work? - StevenE - 06-19-2008 07:00 PM hm, seems like I've a quite similar problem. I include fastcgi.conf but the php5-fcgi-starter give me the following Code: exec: /usr/local/bin/php-cgi: not found what should this file be? sorry got no idea RE: How is FastCGI supposed to work? - ephigenie - 06-20-2008 07:11 AM You need to have a php(5) interpreter with fastcgi support enabled. This is usually called php-cgi or php5-cgi try looking into the ports tree perhaps you haven't compiled it yet. If yes - look at the path - maybe you've to correct it to the right one. Then edit the php5-fcgi-starter and the fastcgi_ispcp.conf RE: How is FastCGI supposed to work? - blocker - 06-20-2008 02:34 PM When you build php5 from port you must mark "Build CGI version" without it the port wil not build php-cgi file StevenE Wrote:hm, RE: How is FastCGI supposed to work? - blocker - 06-20-2008 03:02 PM MrMarv Wrote:YEAY! You made my day! could you tell us where is fastcgi-Ispcp.conf ? it should be in apache22/extra dir, and yes it had to be manually included in httpd.conf after put # in load php module. since by default it will be run without fastcgi |