Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 31st October 2010, 06:50
maineac maineac is offline
Junior Member
 
Join Date: Oct 2010
Location: Near Chicago
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to maineac
Unhappy Getting PHP to work with Cherokee

Let me first thank falko for the nice Howto on getting this set up. However, it would be nice, when you get to the part where you check your php using info.php if you would give some hints for where to look if it doesn't work.

I am installing this on Ubuntu 10.4 using PHP5 and Cherokee v1.08 which is a little newer than the version on the Howto. There was a little difference in the way you enable PHP on Cherokee. Under the default virtual server behaviors you need to select "Rule Managment" instead of Wizards. Then you can add a rule, look for languages and pick PHP. It's pretty straight forward from there.

But it still doesn't work. When I type in the url "http://localhost/info.php" I get an "Unable to Connect" message. If I try the same url without the "/info.php" I get the classic Cherokee Test Page.

If I try "php info.php" from a terminal on the web root I get the information printed out on the terminal.

Incidentally, "info.php" looks like this:
Code:
<?php
phpinfo();
?>
Just as a note, I did install the FastCGI php5-cgi as you recommended.

I am using FireFox 3.6.12 for a browser.

Does anyone have any idea where I can look to find out why this doesn't work?
Reply With Quote
Sponsored Links
  #2  
Old 1st November 2010, 11:36
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

I've just written the tutorial for Ubuntu 10.10 (will be published soon), and there I had to do
Code:
killall php-cgi
and then restart Cherokee.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 2nd November 2010, 06:14
maineac maineac is offline
Junior Member
 
Join Date: Oct 2010
Location: Near Chicago
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to maineac
Default

falko,

I've gone a little beyond that now. But I ran "Killall cgi-php" as root and found no cgi-php process running.

One thing that wasn't clear on the Ubuntu 10.4 Howto or the Cherokee documents is how to set the URL you want to use for your virtual server. I've figured this out with the help of some folks on //freenode.irc#cherokee.

If you set the Nickname of the server to "home.myserver.net" and Host Match method to "Match Nickname" the URL will be "http://home.myserver.net". Note that any string you use will work PROVIDED the string maps to an IP address, either in your DNS or your hosts file.

I have verified that php works on a command line

I have verified that Firefox will find an html file on my URL through the Cherokee server by adding an index.html and setting the Directory Indexes to "index.php,index.html".

Now if I use the URL without a file I get the 404 URL not found error. (i.e. http://myserver.test)

If I add the index.html (http://myserver.test/index.html) I get the static webpage, index.html.

My Settings are:

Under the Rulesets, the Extensions PHP rule handler is FastCGI, the Document Root is "/usr/lib/cgi-bin" (which does contain a link named 'php' to php5). The "Information Services" is set to Nick:"PHP Interpreter", Host: 127.0.0.1:47990.

Any ideas on why it doesn't work?
Reply With Quote
  #4  
Old 2nd November 2010, 06:31
maineac maineac is offline
Junior Member
 
Join Date: Oct 2010
Location: Near Chicago
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to maineac
 
Default I've found the solution

I removed "/usr/lib/cgi-bin" from the Document Root. It is now blank, and the server will serve my php page!

I didn't see that mentioned in the Howto, but perhaps it is something that was supposed to be properly set by the wizard. With the version of Cherokee I am using (1.0.8) there was not wizard for setting the Behavior rules.
Reply With Quote
Reply

Bookmarks

Tags
cherokee, php

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newly Installed ISPConfig3 on Ubuntu 8.04 : login redirect fail ? cripperz Installation/Configuration 5 22nd March 2009 13:15
Slightly Confused (DNS & Server Help) JohnnyBGoode Installation/Configuration 26 14th August 2007 10:54
PHP scripts don't work, please help. CombatGod Installation/Configuration 9 11th May 2006 18:37
Downgrade php5 to php4.4.2 llizards Installation/Configuration 4 14th March 2006 00:58
all my site go to /var/www/ Absolusteph Installation/Configuration 14 11th March 2006 22:27


All times are GMT +2. The time now is 19:35.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.