Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Use of undefined constant JSON_UNESCAPED_UNICODE [SOLVED]
Hi all
I just upgraded a website form 4.6.2 tp 4.7.3 and now i cant connect to admin and there is error lik below:
Notice: Use of undefined constant JSON_UNESCAPED_UNICODE – assumed ‘JSON_UNESCAPED_UNICODE’ in /home/worldgates/public_html/textpattern/lib/constants.php on line 922
Notice: Use of undefined constant JSON_UNESCAPED_SLASHES – assumed ‘JSON_UNESCAPED_SLASHES’ in /home/worldgates/public_html/textpattern/lib/constants.php on line 922
This server runs PHP version 5.3.29. Textpattern needs PHP version 5.4.0 or better.
I am using php 7.2 (I tryed 7.1, 7.0 amd 5.6 but the error still the same)
I have also uploaded the textpattern folder twice to be sure it s not a upload problem.
Any idea where is the problem ?
Offline
Re: Use of undefined constant JSON_UNESCAPED_UNICODE [SOLVED]
A long shot: Do you get the error message This server runs PHP version 5.3.29
when you switch to php 7.2, 7.1, 7.0 or 5.6?
If so, check whether you have a directive in your .htaccess
that is perhaps overriding the setting in your control panel. You should be able to verify what is actually active by uploading a phpinfo file and running that file (delete again after use).
TXP Builders – finely-crafted code, design and txp
Offline
Re: Use of undefined constant JSON_UNESCAPED_UNICODE [SOLVED]
Thanks jakob,
Yes i got the message about php version.
I am using the standard htaccess shipped with textpattern, the upgrade failed, i uploaded the txp 4.6.2 and got the website working again!
Strange.
Offline
Re: Use of undefined constant JSON_UNESCAPED_UNICODE [SOLVED]
Dragondz wrote #319204:
Yes i got the message about php version.
Just checking we’re not talking at cross-purposes: do you mean, you got This server runs PHP version 5.3.29
when you have switched to PHP 7.2 in the control panel? (i.e. the version in the error message doesn’t match your setting in your control panel).
Then check for any .htaccess
files in other folders higher up in your textpattern path that might be setting an AddHandler directive that is affecting your textpattern installation. Also check if your control panel might be injecting something like that somewhere.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Use of undefined constant JSON_UNESCAPED_UNICODE [SOLVED]
Hi
phpinfo() say that the php version is 5.3.29! hum i will check whats wrong with the hosting.
Cheers.
Offline
Re: Use of undefined constant JSON_UNESCAPED_UNICODE [SOLVED]
Upgrade Succeeded,
Thanks Jacob.
Offline
Re: Use of undefined constant JSON_UNESCAPED_UNICODE [SOLVED]
Excellent!
TXP Builders – finely-crafted code, design and txp
Offline
Re: Use of undefined constant JSON_UNESCAPED_UNICODE [SOLVED]
Dragondz wrote #319207:
Upgrade Succeeded,
Out of curiosity – what was the actual issue ? PHP not updating when you asked for it through the control panel of your host?
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Use of undefined constant JSON_UNESCAPED_UNICODE [SOLVED]
Hi,
I changed the php version thrue cpanel to php7.2 but it hadent make it, then on cpanel i used multiphp to use php7.2 on my hosting and it succeeded.
To be sure wich php version you have check txp diagnostic or use phpinfo() function.
Offline
Re: Use of undefined constant JSON_UNESCAPED_UNICODE [SOLVED]
@ Dragondz
Thank you. So basically PHP was stuck to an old version despite attempts to change it through the CP.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Use of undefined constant JSON_UNESCAPED_UNICODE [SOLVED]
@phiw13
Yes.
Offline