We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Site crash 1.8.2 version php parse error | Forum

Luke Cole
Luke Cole Jul 11 '16
I've tried searching this but my site crashed today and looking for help... I contacted tech support for my hosting company and this is what they found.

[11-Jul-2016 17:19:04 US/Michigan] PHP Parse error: syntax error, unexpected ''The list of ' (T_ENCAPSED_AND_WHITESPACE) in /home/xxxx/public_html/ow_pluginfiles/base/lang_1.php on line 3925

After checking the mentioned "lang_1.php" file, I have noticed that the same is missing some of the last rows and this is why the error in question appears. 


The Forum post is edited by Luke Cole Jul 11 '16
dave Leader
dave Jul 11 '16
Have you added any plugins recently or made any changes recently anywhere in the code?


also can you provide us with what they area around that line number looks like, maybe even send me that file if you want and i will compare it to my copy. 


You can also replace that file if you want from your 1.8.2 oxwall download if you have it to see if that solves the issue. If you do not have it let me know and i will send you the file from my version download. 



The Forum post is edited by dave Jul 11 '16
Luke Cole
Luke Cole Jul 11 '16
No hadn't touched plugins or any code for over a week. I hadn't seen it, the tech support at fastcomet said that the line was blank, but they were able to compare it to a backed up copy and fixed it for now... I'm just wondering what could have cause it to just delete the code when no one had touched it...
dave Leader
dave Jul 11 '16
not sure, try to keep an eye on things and watch your error log both on cpanel and also in the ow_log folder.  If it happens again have your host check the server logs to see if someone might have your login info for cpanel or an ftp connection, that is just a guess so dont panic.  


Let us know if this happens again please :)  glad you got it fixed for now. 

The Forum post is edited by dave Jul 11 '16
ross Team
ross Jul 11 '16
Luke, have you enabled dev mode before you had this issue? 
Luke Cole
Luke Cole Jul 26 '16
Thank you, I'll keep an eye on it. No, Ross, I hadn't.
Aliya Team
Aliya Aug 1 '16
For future reference:

@Luke Cole ,

PHP Parse error: syntax error, unexpected ''{$text_key_here}' (T_ENCAPSED_AND_WHITESPACE), expecting ')' in /public_html/ow_pluginfiles/base/lang_{$langID_here}.php on line {$line_number_here}


{$text_key_here} points to a line where unexpected syntax error appeared. Ex: syntax error, unexpected ''base+suspend_notificat' (T_ENCAPSED_AND_WHITESPACE)

{$langID_here} points to a language file where error appeared. Ex: lang_1.php

- Common cause: system was not able to finish writing into specified lang.php  file due to memory limits or server downtimes/fatal errors.

-Known to happen during: software updates , enabled DEV mode. Overall any action that leads to language cache generation.

Apart from updates and DEV mode language cache is re-generated when:

- Save is clicked in Admin Panel >> Settings >> Languages.

- New plugin is installed.


SOLUTION: finish generating language cache. Choose one of the following:

1. click "Save" in Admin panel >> Settings >> Languages.

2. if #1 won't help, go to ow_includes/config.php and set DEV mode to 8 instead of false. Refresh any site page.

When error is resovled put DEV mode back to "false".


More information about lang.php files bellow.


LANG_1.PHP/LANG_{$languageId}.PHP
-File type: .php
- Cached: yes.
- Location: ow_pluginfiles/base/lang_{$languageId}}/1.php .
- Permissions: 777 (ow_pluginfiles) / 777 (base) /666 (lang_.php file).
- Related to: core platform.
- Platform updates: do not erase lang_1.php file.
- Related database tables: listed bellow

lang_1.php file stores cached version of languages keys for default English language from: _base_language, _base_language_key, _base_language_prefix and _base_language_value database tables.

lang_{$languageId}.php file stores cached version of languages keys for any additional installed languages.Ex: lang_2.php, lang_31.php and so on.


Cached files are responsible for increasing content delivery speed to an end user and significantly decreasing amount of database requests.



The Forum post is edited by Aliya Aug 1 '16