Page 1 of 1

[solved]Parse error in html_entity_decode_php4.php, line 307

Posted: Mon Feb 23, 2015 6:13 am
by Dunsinane
Hi,

I'm running CMS Made Simple 1.11.12. I'm using PHP 5.2.17, and MySQL 5.1.73-cll. This is all working with Apache 2.2.17 running on Linux.

Today I saw that there was an upgrade available to CMSMS 1.11.13, so I used the diff package to upgrade by FTP as usual...

That led to the following error message when I refreshed the cmsms-admin-panel on my website:
Parse error: syntax error, unexpected T_FUNCTION in /home/MYSITE/public_html/fj-cms2/lib/html_entity_decode_php4.php on line 307
After some attempts to repair the situation, the actual website (not the admin panel) said:
Site down for maintenance.

I tried:

- overwriting CMSMS with full version of 1.11.13, that did not help

- overwriting CMSMS back to version 1.11.12, that did not help

- making a fresh install of CMSMS 1.11.13 in another directory. When I accessed the install-folder, the same error appeared after the first click on the Submit-button, which should affirm the selection of the language during installation procedure:

Parse error: syntax error, unexpected T_FUNCTION in /home/MYSITE/public_html/fj-cms2/lib/html_entity_decode_php4.php on line 307

- making a fresh install of CMSMS 1.11.12 in another directory. When I accessed the install-folder, the same error appeared after the first click on the Submit-button, which should affirm the selection of the language during installation procedure:

Parse error: syntax error, unexpected T_FUNCTION in /home/MYSITE/public_html/fj-cms2/lib/html_entity_decode_php4.php on line 307



And now I am baffled, what could be wrong?

I suspected the PHP version, 5.2.17 is old, but according to the installation guide on the cmsms-website, the oldest acceptable PHP-version is 5.2.4, which is even older...


Other than that, I do not have a clue... do any of you? ;-)

Re: Parse error in html_entity_decode_php4.php on line 307

Posted: Mon Feb 23, 2015 10:01 am
by velden
I think you should have come across this error on version 1.11.12 too.

I think it is related to your php version (though you are right cmsms should work on php 5.2). I do recommend to consider upgrading to a recent version of php (at least 5.4+). Before doing so check the requirements of your modules first!

I will ask in Dev Team about this issue and report back to you.

Re: Parse error in html_entity_decode_php4.php on line 307

Posted: Mon Feb 23, 2015 1:00 pm
by Dunsinane
velden wrote:I think you should have come across this error on version 1.11.12 too.

I think it is related to your php version (though you are right cmsms should work on php 5.2). I do recommend to consider upgrading to a recent version of php (at least 5.4+). Before doing so check the requirements of your modules first!

I will ask in Dev Team about this issue and report back to you.
Thanks for the follow-up. Meanwhile, I will inform with my web host, to see if a PHP-upgrade can be expected any time soon.

Some additional info:
The CMSMS site worked on the server as 1.11.12, that is, 1.11.12 was reached by incremental upgrades starting from a full install of version 1.9.4.3 in 2011.
It worked, but, I guess since 1.11.11, whenever I made a change in the back-end that affected the database, the first visit to a web page at the front-end would take approximately 20 seconds to load, and would show up without the css being implemented. A re-fresh of the same front-end web page would show-up fine and immediately. After that first visit, the whole front-end website would show up fine and quick. After any subsequent change in the back-end, the "first front-end visit & re-fresh"-ritual had to be performed.
This flaw made me doubt about the PHP-version already...

Re: Parse error in html_entity_decode_php4.php on line 307

Posted: Fri Mar 13, 2015 2:20 pm
by Dunsinane
Some time has passed, but I can gladly inform you that this issue has been solved.

By adding a .htaccess-file to the CMSMC-directory, with this line in it:

Code: Select all

AddHandler application/x-httpd-php56 php
Now PHP 5.6 is active for CMSMS in that directory only... :)

And that solved all problems...

Re: [solved]Parse error in html_entity_decode_php4.php, line

Posted: Mon Apr 13, 2015 7:27 am
by thermicroll
Dunsinane wrote: By adding a .htaccess-file to the CMSMC-directory, with this line in it:

Code: Select all

AddHandler application/x-httpd-php56 php
Now PHP 5.6 is active for CMSMS in that directory only... :)

And that solved all problems...
I have same error and same php version of user Dunsinane.
i create a .htaccess file in main CMSMC directory (where admin,doc,install,lib,etc folders are) with suggested line, but when i put it on the server, i cannot neither see the cmsms page in which i select the languages, as attached.
someone can help me?? it is very important!!!

Re: [solved]Parse error in html_entity_decode_php4.php, line

Posted: Mon Apr 13, 2015 11:02 pm
by Jo Morg
thermicroll wrote:I have same error and same php version of user Dunsinane.
i create a .htaccess file in main CMSMC directory (where admin,doc,install,lib,etc folders are) with suggested line, but when i put it on the server, i cannot neither see the cmsms page in which i select the languages, as attached.
someone can help me?? it is very important!!!
This and the image that you posted mean that your server either doesn't have a PHP handler for PHP 5.6 or that the handler is not properly configured on your server. For either of this reasons PHP files are being served as text files.

I strongly advise you to:
  1. make a full back up of files and DB;
  2. remove that line from your .htaccess;
  3. create a clone of your site on the same server;
  4. upgrade the clone site to CMSMS 1.12;
  5. test thoroughly;
  6. move the clone site to the production site;
  7. eventually upgrade your server PHP to at least 5.3, but recommended 5.4.11 (you'll probably need the host support to assist you as this is not a CMSMS issue);
HTH

P.S.: next time please open a new topic and document your case as well as possible. Don't hijack someone else's thread just to say "I have the same problem" when it might not be the same at all. Each case is different. Besides the OT was solved and his solution obviosly didn't work for you, making it a different problem. Thank you

Re: [solved]Parse error in html_entity_decode_php4.php, line

Posted: Fri Apr 17, 2015 9:43 am
by thermicroll
Jo Morg wrote:
I strongly advise you to:
  1. make a full back up of files and DB;
  2. remove that line from your .htaccess;
  3. create a clone of your site on the same server;
  4. upgrade the clone site to CMSMS 1.12;
  5. test thoroughly;
  6. move the clone site to the production site;
  7. eventually upgrade your server PHP to at least 5.3, but recommended 5.4.11 (you'll probably need the host support to assist you as this is not a CMSMS issue);
Thanks Jo!! Are there other easier way, in order to avoid all those steps, and continue using current PHP version?
thanks in advance!

Re: [solved]Parse error in html_entity_decode_php4.php, line

Posted: Fri Apr 17, 2015 10:28 am
by Jo Morg
thermicroll wrote:Thanks Jo!! Are there other easier way, in order to avoid all those steps, and continue using current PHP version?
There is nothing difficult about this. Most of us do this almost on a daily basis. It is time consuming, of course... the upgrade itself is a one step operation, but if anything goes wrong, and things CAN go wrong (and given a half a chance they do go wrong) you will see that all those steps were time well spent, that will save you a lot more time in the end. Cloning the site is not absolutely necessary, but would allow you to do all the work on the background without having the site "closed for maintenance" for long periods of time.
So basically it's your call... but at least DO backup. It provides you a safe net to get back to.