Erlang Mailing Lists

Author Message

<  Yaws mailing list  ~  PHP over FastCGI interface in YAWS

Guest
Posted: Mon Dec 21, 2009 11:37 am Reply with quote
Guest
Hi, it's me again. ;)

I'm trying to connect YAWS with PHP through FastCGI interface. I need an accelerator within PHP so FCGI is the only option I can use. I've found manual describing Rails with YAWS installation (http://wiki.github.com/klacke/yaws/run-rails-under-yaws) but with PHP it’s unusable. I suspect YAWS has higher priority at internal PHP interpreter and still tries execute php-cgi binary although I set up fcgi_app_server correctly in configuration.

Of course, PHP processes are spawned by spawn-fcgi from lighttpd distribution and they seem to work correctly (correct me if I'm wrong).

For any case - I've renamed my php file do .fcgi extension, YAWS returned:
-----------
*** handle_ut: type=fcgi
-----------

So it works with fcgi extension but returned to browser:
"No input file specified."

When I kill spawned processes:
CGI failure: {connect_to_application_server_failed,econnrefused}

Which means fcgi extension under YAWS communicates with spawned php-cgi processes.

I've tried to define PATH_TRANSLATED and SCRIPT_FILENAME variables in console, before I started YAWS. (according to http://osdir.com/ml/web.server.yaws.general/2005-07/msg00012.html). But still failed.

To sum up:
- how force YAWS to execute php extension as FastCGI responder, not through executing cgi-binary?
- how to solve "no input file specified" error under FastCGI

Cheers,
Przemysław "eRIZ" Pawliczuk
--
JID: eriz//pcinside.pl
www: http://eriz.pcinside.pl




------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list

Post received from mailinglist
nesrait
Posted: Mon Dec 21, 2009 2:44 pm Reply with quote
User Joined: 02 May 2009 Posts: 33 Location: Portugal
I can only talk about this part :

Quote:
- how force YAWS to execute php extension as FastCGI responder, not through executing cgi-binary?
- how to solve "no input file specified" error under FastCGI

Last week I ported yaws_cgi to ewgi_cgi (http://github.com/davide/ewgi/blob/master/src/middleware/ewgi_cgi/ewgi_cgi.erl) and came across/fixed the same issue(s) over there.
I did limited testing but perhaps someone can take a look at what I'm doing in that file and port it back to Yaws?

Regarding the internal [php] cgi prioritization over fastcgi last time I checked there was some work torwards supporting "extmod"s - something like a per-file-extension appmod, but that seems to be gone now.

Cheers,
Davide Smile

Post received from mailinglist
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum