PHP session_start() error

Our site was working a few days ago before a move to a new DH server and is now getting the following error:

Fatal error: Call to undefined function session_start() in /home/domain/ on line 2

I can’t find any mentions in the forums, wiki or other DH support locations except for a single forum post with zero replies.

Any help would be appreciated.

Please contact DreamHost Support. We’ll fix that right up.

May I please ask if this issue is due to a misconfiguration? Or is this something that’s an issue with the server itself after an upgrade?

The same thing happened to me after my server was upgraded to Ubuntu over the weekend. I have submitted a support ticket but no reply yet so my client’s web app has been non-functional for more than 24 hours now.

Our site also had this error (and others) after Dreamhost updated our servers to Ubuntu. The move broke just about all our webpages, including standard installs like WordPress and phpBB, the latter failing because MySQL was unavailable to PHP.

The cause of the problem ended up being a custom php.ini file, combined with a modified .htaccess file, both setup as per Dreamhost’s instructions. Once those modifications were removed, the problem went away.

Dreamhost support said the modifications were somehow triggering PHP 5.2 to activate. I’m not sure that’s true, since logging phpinfo() revealed that our site was using PHP 5.3.27, but for whatever reason those modifications did trigger MySQL to become unavailable to PHP.

After that was cleared up, we still had problems. Our php.ini file was being used to adjust PHP’s include path. Without it code like this was failing:

We could modify all our pages to use something like this:

But we have over 1000 php files, so editing them all wasn’t desirable. Instead we had to change to using a custom phprc file located at: ~/.php/5.4/phprc

That now enforces our customized PHP include_path and everything is working smoothly.

I hope that helps,
~Martin Wierschin

Thanks! Yes, it turns out the problem was running PHP through a wrapper, which like you I had set up in order to use a custom php.ini. I got rid of the wrapper, and moved my php.ini customisations into a phprc file. Everything seems to be working now.

same here