DH dev environment - how to: php5 as CGI?


#1

I’m thinking about using DH. Before I switch, I want to make sure my sites will work. I want to make a dev server that closely mirrors DH’s setup. From what I have gathered in the Wiki, I have gotten pretty close.

My last thing to configure is to run PHP5 as a CGI process under Apache2. I can’t for the life of me figure out how to do this.

Does anyone have any simple insight? Can it be done at the virtual host level within apache, does it need to be at a global level? I’ve got the php5-cgi .deb package, what else would I need?

Thanks,
Steve

current dev setup:

  • VMWare
  • Debian etch
  • Apache2 (as apache module)
  • Php5
  • MySQL 5
  • Phpmyadmin
  • VSFTP
  • Postfix/Squirrelmail

#2

Though I haven’t done it myself, you might find this article helpful, with a few changes to account for the fact that you want to run php5 instead of php4.

Free unique IP and $67 off with promo code [color=#CC0000]FLENSFREEIP67[/color] or use [color=#CC0000]FLENS97[/color] for $97 off. Click here for more options


#3

http://wiki.dreamhost.com/Installing_PHP5


Get [color=#CC0000]$97[/color] Off with promo code :[color=#CC0000]97USA[/color] :cool: -->choose your plan (promo code included)


#4

I’ve tried the scripts, but they fail without good error codes. I think I am missing some basic packages.

Even if I ratchet down all of the packages for php, configure fails.

Does anyone know what flavor/version of Debain they are using?


#5

2.4.32-grsec+f6b+gr217+nfs+a32+fuse23+tg+++opt+c8+gr2b-v6.194

Save [color=#CC0000]$97[/color] on all plans by using promo code: SRVR97. More Here


#6

You can use the DreamHost Wiki to find more information.

Max discounts with [color=#CC0000]E97[/color] or [color=#CC0000]O97[/color] code. U will never find better one. Check it and U will see!
Webhosting infos, who sucks, who oversells?


#7

Jeez dude - you’ve already spent more time than your first year’s hosting’s worth.

$97 off, 22.40$ for one year service and you can get your money back within 97 days.

Just sign up, try it and see what it does.

Sounds like you’re wasting time.

Wholly - Use promo code WhollyMindless for full 97$ credit. Let me know if you want something else!


#8

It was something basic. Apache2 in etch doesn’t enable Action directives by default.

You can use the debian package php5-cgi (in your own dev environment).

Debain basic config:
apt-get install apache2 php5-cgi php5-cli

add any other parts you need, like php5-mysql php5-gd …

Apache tweak:
a2enable actions

if you don’t have the actions module enabled, then Apache barfs when you put it in your .htaccess file. Go figure.

.htaccess file:
AddHandler phpfive .php
Action phpfive /cgi-bin/php5

my previous 500 errors were because the module Actions was not ebabled. The debian tweak to the apache config is good and bad. I like the organization, but it makes debugging trickier.