Search

Hello,

With Symphony 2.3 slowly dropping support for PHP 5.2 I wonder what would be the best way to run the latest version of Symphony in shared hosting environments that support 5.2 PHP only?

Unfortunately I am on a shared hosting plan, and my server won't be upgraded to PHP 5.3 any time soon. I tried adding AddHandler php53-cgi .php to my .htaccess file to run PHP 5.3 as a CGI version but this entails a massive loss in performance.

So what's the best way to deal with this?

How attached are you to your provider? Many providers currently offer 5.3 support (and they should!) so switching seems like the only viable solution here, if your current host does really not want to upgrade you to 5.3...

Another option would be to ask if they have a php-fcgi script available somewhere. From what I read, it is possible to select this script as the handler using htaccess, too. FastCGI is at least comparable to mod_php speed (especially on a not-so-busy site with mediocre hardware).

And, finally, you could host the website temporarily on amazon or appfog using their free plans, and switch back to your normal provider before the free plans expire :)

My host offered to relocate me to another server with PHP 5.3 installed. But that will be a nightmare because I have a number of external domains pointing to my current server IP address. Anyway, if that's the only way, I will probably go for it.

How about some of my older sites running Symphony 2.2 or earlier. Will they run smoothly in a PHP 5.3 environment?

I am going to ask about that php-fcgi script now. Let's see what they say...

Thanks for your help by the way!

I'm curious about what errors you are getting in PHP5.2. Although we are moving to drop PHP5.2, the idea is that the Symphony 2.3.x branch should still be compatible. I was aware of a regression I created during the 2.3.1 release cycle but was under the impression that it was fixed before packaging the 2.3.1 release.

If you give some details about the error, I'll see what I can do so that Symphony works on PHP5.2 again :)

If you can move to PHP5.3, I would highly highly recommend it though! Symphony will run on PHP5.3 since about 2.0.6, so you should not encounter any difficulties.

I basically got this error. So I followed phoque's suggestion and commented out a number of lines in order to get it working on PHP 5.2, e.g. from this:

if (PHP_VERSION_ID >= 50300) {
    $providerClass::buildEditor($this->Form, $this->_errors, $fields, $handle);
}
// PHP 5.2 does not support late static binding..
else{
    call_user_func_array(array($providerClass, 'buildEditor'), $this->Form, array(&$this->_errors, $fields, $handle));
}

to this:

call_user_func_array(array($providerClass, 'buildEditor'), $this->Form, array(&$this->_errors, $fields, $handle));

The files concerned were content.blueprintsdatasources.php and content.blueprintsevents.php. Since I did that everything seems to be running smoothly again.

But I don't want to go through all the hassle with every new Symphony installation :-(

So I asked my host to transfer me to another server with PHP 5.3 installed on it.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details