Search

I'm still having difficulties with my recent 2.3 to 2.3.1 upgrade, I hadn't noticed until trying to access datasources tab but I seem to have a:

 Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in D:wampwwwmunki31symphonycontentcontent.blueprintsdatasources.php on line 878

and, also Events tab, although that error refers to the events blueprint php as might be expected.

So it's something to do with my still using php 2.x to support some other sites in my localhost. The offending lines seem to be:

        // Call the provided datasources to let them inject their filters
    // @todo Ideally when a new Datasource is chosen an AJAX request will fire
    // to get the HTML from the extension. This is hardcoded for now into
    // creating a 'big' page and then hiding the fields with JS
        if(!empty($providers)) {
            foreach($providers as $providerClass => $provider) {
                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));
                }
            }
        }

But doesn't that if statement say not to use the line as my PHPVERSIONID would be less than 50300?

Ah, PHPVERSIONID is supported from 5.2.7 but I'm running 5.2.6 for no good reason AFAIK so I'll go to get 5.2.7 and see what happens...

Well now running 5.2.7 the error has become:

Parse error: parse error in D:wampwwwmunki31symphonycontentcontent.blueprintsdatasources.php on line 878

@munki - Is there anyway that you can upgrade your PHP to 5.3 or higher? PHP has dropped support for 5.2 altogether and it is recommended that you use 5.3 or higher with the latest version of Symphony.

I can for this web site I'm having trouble with but there's others that can't. Problem is that Wampserver seems to go haywire when I switch between 5.2.x and 5.3

Might have to look at some other local server solution.

Online it's not a problem but locally it's a real hassle at the moment.

Migrated to php 5.3.x and lets never speak of those few sites that weren't compatible.

Symphony is working so I'm happy for now and am ready for future versions. Goodbye 5.2.x

If anyone else is interested I think the problem is that even though the if statement should allow php 5.2.x to use the code that it would be compatible with, the presence of the double colon in the other branch of the if statement causes >= 5.2.7 to fail.

The initial problem mentioned above was that <=5.2.6 doesn't like the phpversionid and fails there.

I have just run into the same issue :/

From what I read on this forum it seems possible to (temporarily!) work around these errors by changing/commenting-out some Symphony code, am I right?

I understand this is far from ideal and my client should really update to PHP 5.3+ but I am afraid this will not happen before the project deadline.

The alternative of downgrading to Symphony 2.2.5 seems like a lot of hassle and is also a short-term 'fix'.

Can somebody knowledgeable confirm if it is possible to safely (and temporarily) work around this issue?

TIA

The Problem is that $variable::staticMethod() is invalid in PHP 5.2.x. A simple if won't help there since the first block, although never executed, is still invalid.

I'd try changing

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 simply

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

This syntax should work in both PHP 5.3 and 5.2, it's just not the "modern way of doing it".

@phoque yeah that's what was puzzling me: the first if block should have never ben executed.

Now I understand it is still throwing an error for it is invalid in PHP < 5.3. Does this not make this check useless for PHP < 5.3? :/

Good to hear there's a workaround!

  • This does involve changing all the files where this check appears, no? (thankfully only 2 files a.t.m.)
  • Is there more PHP < 5.3 'invalid' functionality that I should check?

Thanks again @phoque.

It's the only instance I came across, but perhaps there could be something in an extension that I didn't use?

I've gone 5.3 and feel better for it already.

Good news. I temporarily fixed it and it seems the client is trying to update his PHP version.

Another thing: The requirements on the bottom of these Symphony pages still mention PHP 5.2 Now that 2.3 is the default this seems wrong, no?

Well 2.3 worked ok with the older php, it's the new 2.3.1 that doesn't and I guess from the inclusion of the if statement someone tried for compatibility. I think the current situation would be a bug/workaround one rather than inbuilt incompatibility on purpose. I suppose it depends if the big guys are intending to fix the issue, in which case the requirments would be correct.

I remember reading somewhere (in this site) that 2.3 was the last version to support php 5.2 so I was stressing out about it a while ago as I had hosting issues. Although it's not the main focus of my work, and I'm next to useless as a contributer to this community, I've come to lurve Symphony and couldn't bear to be left behind. So, new hosting a while back and now new local hosting.

I'd be wary of changing the core stuff as future updates would need changing too, and maybe they wouldn't have the if statement or any 5.2 workaround. I guess in your case David, it's been necessary to fix this for the client where in my case it was my local server that was having trouble so it wasn't so bad.

Hopefully your client will update php or you'll have to keep an eye out if the two files are updated in future.

Symphony 2.3 is indeed the last major version to support PHP 5.2. The introduction of the version compatibility issue in the minor update for 2.3.1 is unintentional. Minor version updates should never break compatibility.

We will need to issue a Symphony 3.2.2 with changes that maintains compatibility support with PHP 5.2. In the mean time, please use Nil's suggestions as a hotfix until a new minor update is released.

I did phoque comment #6 and it worked!

Hey, I just ran into the same issue and upgrading to PHP 5.3 did the trick for me.

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