Site down because of switch to ubuntu. Support not helping. Now what?

My site has been down for several days because DreamHost changed the OS from Debian to Ubuntu. I set the site many, many years ago and the company does not have the resources for a person to manage the site as it is a nonprofit NPR show.

Unfortunately the show is losing quite a bit of money due to the site being down. Support told me the problem is I’m running 5.2 however the code is not very crazy, I doubt there would be a problem running 5.6 but I am confused as to how I am to do that and support is no help:

Hello James,

Per our conversation.

After having someone look over the situation. We’ve found that your code
is simply out of date. Unfortunately, there is nothing we really can do
about the code.

The code seems to be wanting to use PHP 5.2, which Ubuntu does not have.

fcgi script
export PHPRC=/home/livingonearth/
exec /dh/cgi-system/php5.cgi $*

Options +ExecCGI
AddHandler php5-cgi .php4 .php3 .php .inc .html .htm .rss .xml .m3u
Action php-cgi /cgi-bin/php-wrapper.fcgi
Action php5-cgi /cgi-bin/php-wrapper.fcgi
AddType application/mp3 mp3
AddType audio/mp3 mp3
AddType audio/x-mpegurl m3u M3U
AddType audio/x-scpls pls PLS
AddType application/x-ogg ogg OGG
AddDefaultCharset UTF-8

The findings above are only the beginning of the investigation. You’ll
need to examine your PHP code to make sure it is compatible with PHP 5.5
and above.

Just a little additional information.

The reason for the upgrades is having outdated packages/OS poses security
threats on the server. Also old packages/OS no longer functioning
correctly with the ongoing changes in our infrastructure

In regards to the htaccess file we did temporarily rename the htaccess

Sorry for not being able to restore the site to a previous version and
let me know if there’s another question.

I am SCREWED until I get this site up. Any help would be greatly appreciated! DreamHost has already lost the show as a customer but we need the site to be working while we figure out the move.


Hi James, that’s so sad to hear! The site is down because PHP5.2 is not supported anymore, security issues are not fixed. This has nothing to do with Ubuntu or Debian.

I know many people love NPR and would be able to help port the website to a more modern version of PHP. I believe PHP version 5.2 is not supported anymore so I doubt you’ll find it anywhere and your best bet is to modernize the site, either porting to PHP 5.3 or rewrite it…

Is there any way you can publish your code somewhere? Or describe what it does, maybe there are newer ways to do the same things.

Hi, Thanks so much for your fast response! It seems like the code is compatible with all versions going forward, I am realizing what I needed this fcgi wrapper for was so that I could use a custom php.ini

The site was using the following code (with an earlier customer service interaction that might be helpful)
root@ps87097:~# cat
export PHPRC=/home/livingonearth/
exec /dh/cgi-system/php5.cgi $*

PHP5 does not exist on the server at this time after the upgrade has been
completed. They have recommended commenting out the line that calls for
this item in the .htaccess file:
6:18 Options +ExecCGI
AddHandler php5-cgi .php4 .php3 .php .inc .html .htm .rss .xml .m3u
Action php-cgi /cgi-bin/php-wrapper.fcgi
Action php5-cgi /cgi-bin/php-wrapper.fcgi
AddType application/mp3 mp3
AddType audio/mp3 mp3
AddType audio/x-mpegurl m3u M3U
AddType audio/x-scpls pls PLS
AddType application/x-ogg ogg OGG

otherwise the PHP for the actual site is very straightforward and fine on any platform.

If I can load php.ini somehow, and serve .html, .inc, .rss and .m3u files through php my problem is solved. Is that the information you were looking for?

Thanks again.
I lucked out, and I think I fixed it. Here’s how, if you’re curious:

include_path = ".:/usr/local/lib/php:/usr/local/php5/lib/pear:/home/livingonearth/“

I made a phprc in ~/.php/5.6/ to implement the above include_path (HIDDEN is changed from the original as you might expect just in case someone malicious found it)

I added the following to .htaccess which seems to be what this version of php was looking for to execute the file types used for library files through trial and error:

AddHandler fcgid-script php .php4 .php3 .php .inc .html .htm .rss .xml .m3u
FCGIWrapper “/dh/cgi-system/php56.cgi” .html
FCGIWrapper “/dh/cgi-system/php56.cgi” .inc
FCGIWrapper “/dh/cgi-system/php56.cgi” .htm
FCGIWrapper “/dh/cgi-system/php56.cgi” .rss
FCGIWrapper “/dh/cgi-system/php56.cgi” .xml
FCGIWrapper “/dh/cgi-system/php56.cgi” .m3u

that seemed to serve the site again in 5.6. am I missing anything? thanks so much!

Looks about right, if that works :slight_smile: Glad to see you solved the issue.

Seems to – is churning away, thanks! I wrote all the code to the site myself instead of using a CMS. It’s very straightforward PHP code however what breaks the site is adding a path to an include directory that I don’t want visible to the public that seems to break everything when there’s an update at DreamHost every several years. I’m guessing the one-click installers have a different method but this will break as soon as we’re pushed to a different version of PHP. I guess it’s time for me to set up some hardware for the show.

Thanks so much!