Mailing List Archive

doc: setting up php for cherokee
Hello list!

As I am looking at the documentation and website to upgrade them, I come
across a couple of caveats.

The website uses php and I have set up a virtual cherokee server to use
as my website and documentation patching environment. But... I do not
have php installed ;-)

And in the documentation I cannot find any simple howto on setting up
php in Cherokee.


I found some snippets here and there, but I would like to write a small
piece of documentation on setting up php from scratch. Of course I will
make sure this will find it's way into the doc section!

Please give me a small instruction on setting it up as cgi and fcgi.

Kind regards,

Milo van der Linden
doc: setting up php for cherokee [ In reply to ]
Hello list!

As I am looking at the documentation and website to upgrade them, I come
across a couple of caveats.

The website uses php and I have set up a virtual cherokee server to use
as my website and documentation patching environment. But... I do not
have php installed ;-)

And in the documentation I cannot find any simple howto on setting up
php in Cherokee.


I found some snippets here and there, but I would like to write a small
piece of documentation on setting up php from scratch. Of course I will
make sure this will find it's way into the doc section!

Please give me a small instruction on setting it up as cgi and fcgi.

Kind regards,

Milo van der Linden
doc: setting up php for cherokee [ In reply to ]
Hi Milo!

PHP is configured out of the box on Cherokee. There's an example of how the setup should be in cherokee-admin.
What will be needed for this configuration to work is an installed php-cgi. On Debian(like) systems installing the package php5-cgi should do the trick.

If by any chance there wasn't a correct entry for PHP in cherokee.conf, these are the parameters to repilcate it in cherokee-admin.
The single quotes denote literal values or input, so remember eliminating them.

Virtual Servers -> Choose 'default', or whatever virtual server you have created] -> Behaviour
->Add new rule:
Rule type: 'Extensions'
Extensions: 'php'
Handler: 'FASTCGI'
FastCGI specific:
Host 'localhost:1234'
Interpreter '/usr/bin/php-cgi -b 1234'
Environment
PHP_FCGI_CHILDREN = '5'

However, the default setup should include PHP support. Just install php-cgi and you are good to go.

Regards,
Taher

On Monday 28 July 2008 23:37:59, Milo van der Linden wrote:
> Hello list!
>
> As I am looking at the documentation and website to upgrade them, I come
> across a couple of caveats.
>
> The website uses php and I have set up a virtual cherokee server to use
> as my website and documentation patching environment. But... I do not
> have php installed ;-)
>
> And in the documentation I cannot find any simple howto on setting up
> php in Cherokee.
>
>
> I found some snippets here and there, but I would like to write a small
> piece of documentation on setting up php from scratch. Of course I will
> make sure this will find it's way into the doc section!
>
> Please give me a small instruction on setting it up as cgi and fcgi.
>
> Kind regards,
>
> Milo van der Linden

--
taher at unixwars.com
http://unixwars.com
doc: setting up php for cherokee [ In reply to ]
Thank you Taher!

Indeed, all I had to do was make sure I had php installed and cherokee
picked it up nicely.

I will make sure that a small note about getting php active gets to the
documentation ;-)

One more thing. The references media.html, partners.html and others from
the cherokee-project website do not work on my local instance. It seems
that for particular files, the cherokee.conf for media.php points to
media.html?

How do I set this up on my own copy?

Kind regards!

Taher Shihadeh wrote:
> Hi Milo!
>
> PHP is configured out of the box on Cherokee. There's an example of how the setup should be in cherokee-admin.
> What will be needed for this configuration to work is an installed php-cgi. On Debian(like) systems installing the package php5-cgi should do the trick.
>
> If by any chance there wasn't a correct entry for PHP in cherokee.conf, these are the parameters to repilcate it in cherokee-admin.
> The single quotes denote literal values or input, so remember eliminating them.
>
> Virtual Servers -> Choose 'default', or whatever virtual server you have created] -> Behaviour
> ->Add new rule:
> Rule type: 'Extensions'
> Extensions: 'php'
> Handler: 'FASTCGI'
> FastCGI specific:
> Host 'localhost:1234'
> Interpreter '/usr/bin/php-cgi -b 1234'
> Environment
> PHP_FCGI_CHILDREN = '5'
>
> However, the default setup should include PHP support. Just install php-cgi and you are good to go.
>
> Regards,
> Taher
>
> On Monday 28 July 2008 23:37:59, Milo van der Linden wrote:
>> Hello list!
>>
>> As I am looking at the documentation and website to upgrade them, I come
>> across a couple of caveats.
>>
>> The website uses php and I have set up a virtual cherokee server to use
>> as my website and documentation patching environment. But... I do not
>> have php installed ;-)
>>
>> And in the documentation I cannot find any simple howto on setting up
>> php in Cherokee.
>>
>>
>> I found some snippets here and there, but I would like to write a small
>> piece of documentation on setting up php from scratch. Of course I will
>> make sure this will find it's way into the doc section!
>>
>> Please give me a small instruction on setting it up as cgi and fcgi.
>>
>> Kind regards,
>>
>> Milo van der Linden
>
doc: setting up php for cherokee [ In reply to ]
Hi Milo.
I've just applied your patches to the documentation. Great work :)

On Tuesday 29 July 2008 16:58:11, Milo van der Linden wrote:
> I will make sure that a small note about getting php active gets to the
> documentation ;-)

Great!

> One more thing. The references media.html, partners.html and others from
> the cherokee-project website do not work on my local instance. It seems
> that for particular files, the cherokee.conf for media.php points to
> media.html?
>
> How do I set this up on my own copy?

By that I'm understanding that you have some rewrite rules active. It is unlikely if you haven't configured that explicitly in Cherokee-Admin.
Could the absolute paths specified in the web pages be to blame?
Whenever I edit anything I usually create de html pages with make and then launch the containing directory as document root (with: cherokee -r `pwd`). Then you can view them at http://localhost/ directly.

This trick comes in handy. It's really fast to share things on your local network this way for everyone to access whenever it is needed :)
--
taher at unixwars.com
http://unixwars.com
doc: setting up php for cherokee [ In reply to ]
Taher Shihadeh wrote:
> Hi Milo.
> I've just applied your patches to the documentation. Great work :)
Jippie! I am trilled!
>
> On Tuesday 29 July 2008 16:58:11, Milo van der Linden wrote:
>> I will make sure that a small note about getting php active gets to the
>> documentation ;-)
>
> Great!
>
>> One more thing. The references media.html, partners.html and others from
>> the cherokee-project website do not work on my local instance. It seems
>> that for particular files, the cherokee.conf for media.php points to
>> media.html?
>>
>> How do I set this up on my own copy?
>
> By that I'm understanding that you have some rewrite rules active. It is unlikely if you haven't configured that explicitly in Cherokee-Admin.
> Could the absolute paths specified in the web pages be to blame?
No, it seems that the cherokee-project website has some rewrite rules. I
don have them.

> Whenever I edit anything I usually create de html pages with make and then launch the containing directory as document root (with: cherokee -r `pwd`). Then you can view them at http://localhost/ directly.
>
> This trick comes in handy. It's really fast to share things on your local network this way for everyone to access whenever it is needed :)
doc: setting up php for cherokee [ In reply to ]
On Tuesday 29 July 2008 18:29:45, Milo van der Linden wrote:

> >> One more thing. The references media.html, partners.html and others from
> >> the cherokee-project website do not work on my local instance. It seems
> >> that for particular files, the cherokee.conf for media.php points to
> >> media.html?
> >>
> >> How do I set this up on my own copy?
> >
> > By that I'm understanding that you have some rewrite rules active. It is unlikely if you haven't configured that explicitly in Cherokee-Admin.
> > Could the absolute paths specified in the web pages be to blame?
> No, it seems that the cherokee-project website has some rewrite rules. I
> don have them.

I'm sorry but I'm kind of lost here.
Is this related to http://code.google.com/p/cherokee/issues/detail?id=68 ?

Is this a problem on cherokee-project.com? (checking http://www.cherokee-project.com/media.html: OK. Checking link to media.html from http://www.cherokee-project.com/index.html : OK).
AFAIK, rewrite rules were eliminated once we switched to static content.

Is it a problem in your local copy? (accessing http://localhost/media.html ?) I don't get what you were saying about the media.php file. Only the static files are uploaded to the webserver, so no .php files there.

cherokee -r `pwd` skips the config file, so just the basic configuration (defined by BASIC_CONFIG in the source code) is used (i.e. no PHP support), and with that I can assure you I'm seeing nothing wrong in my copy. Anyhow I usually don't see what's just in front of my face so....

Please clarify, or send your cherokee.conf (or both) ;)

Cheers.
--
taher at unixwars.com
http://unixwars.com
doc: setting up php for cherokee [ In reply to ]
Hi Milo!

On Tuesday 29 July 2008 20:26:13, Taher Shihadeh wrote:
> > No, it seems that the cherokee-project website has some rewrite rules. I
> > don have them.
>
> I'm sorry but I'm kind of lost here.
> Is this related to http://code.google.com/p/cherokee/issues/detail?id=68 ?

Was it finally related to this or has the problem been solved? :)

Cheers!
--
taher at unixwars.com
http://unixwars.com
doc: setting up php for cherokee [ In reply to ]
Hello Taher!

I will be out for the day. It is lovely weather here and my wife, kid
and me will be going to the beach. So please forgive me if my replies
come a bit late.

The issue and the rewrite are not related. I will take some time later
on to better describe the problem.

Kind regards,

Milo

Taher Shihadeh wrote:
> Hi Milo!
>
> On Tuesday 29 July 2008 20:26:13, Taher Shihadeh wrote:
>>> No, it seems that the cherokee-project website has some rewrite rules. I
>>> don have them.
>> I'm sorry but I'm kind of lost here.
>> Is this related to http://code.google.com/p/cherokee/issues/detail?id=68 ?
>
> Was it finally related to this or has the problem been solved? :)
>
> Cheers!