OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Parse error: syntax error, unexpected T_NS_SEPARATOR

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Parse error: syntax error, unexpected T_NS_SEPARATOR

Postby hamsavijay » Sat Sep 07, 2013 2:12 pm

Hi,
I have been trying over the last few weeks to understand why some strange things happening to our journal site www.ijvss.maftree.org

Our editors were unable to upload new articles for forthcoming issue using XML plugin - Articles & Issues XML Plugin under Journal manager panel:
The error is:
Parse error: syntax error, unexpected T_NS_SEPARATOR in /home/maftree/public_html/ijvss/cache/t_compile/%%C1^C1B^C1B116CB%%index.tpl.php on line 5

looking at the difference between previous version cache and current file, there seems to be something dropped such as "pageTitle" and few other variables replaced by "/".

Editor tried to follow manual process of one-click submission using "Create Issue" under Editor panel
Parse error: syntax error, unexpected T_NS_SEPARATOR in /home/maftree/public_html/ijvss/cache/t_compile/%%12^12B^12BC9318%%createIssue.tpl.php on line 5

We've tried various fixes such as utf-8 or utf8 character set, this has always been unable to fix. There are some sections of the journal were working fine - such as author submissions, crossref export plugin, editorial assignments, peer review request, etc.

Spoke to our hosting provider and said nothing major change happened. The current versions of hosting server are PHP version 5.3.17, MySQL version 5.1.65-cll

We also find the PDF reading is also not working, even so, downloaded pdf was failing to open.

Any help from expert users will be highly appreciated. We are happy to share the access of journal login as well as webhost login details for a quick remedy.

Kind Regards,
Priya
hamsavijay
 
Posts: 18
Joined: Fri Jul 03, 2009 3:14 pm

Re: Parse error: syntax error, unexpected T_NS_SEPARATOR

Postby asmecher » Sat Sep 07, 2013 5:39 pm

Hi Priya,

Can you send me the contents of that cache file?

What is your SAPI config and file permissions?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8815
Joined: Wed Aug 10, 2005 12:56 pm

Re: Parse error: syntax error, unexpected T_NS_SEPARATOR

Postby hamsavijay » Sat Sep 14, 2013 5:55 pm

Alec,
Thanks for your reply.

I'm chasing the hosting provider for SAPI configuration. Is there a way I can find this using cPanel? is it php.ini contents?
<?php
ini_set('display_errors', E_ALL);
$contents = file_get_contents('http://url-to-galley');
echo 'Read ' . strlen($contents) . " bytes.\n";
;suhosin.simulation On
allow_url_fopen = On
allow_url_include = On
upload_max_filesize = 32M
?>

Few usual versions are:
Apache version 2.2.23
PHP version 5.3.17
MySQL version 5.1.65-cll
Architecture x86_64


I've annexed both the files with this reply. Thanks.
Attachments
%%12^12B^12BC9318%%createIssue.txt
File 2
(17.94 KiB) Downloaded 12 times
%%C1^C1B^C1B116CB%%index.txt
file 1
(2.61 KiB) Downloaded 14 times
hamsavijay
 
Posts: 18
Joined: Fri Jul 03, 2009 3:14 pm

Re: Parse error: syntax error, unexpected T_NS_SEPARATOR

Postby hamsavijay » Sun Sep 15, 2013 9:23 am

Alec,
The permissions were set as per the pkp ojs instructions. I've tried a fresh install on another sub-directory on the same shared server and it ended up with error similar to viewtopic.php?f=8&t=10433 We are working to find out the real issue and trying to fix it as quickly as possible as it is a production journal.

I also attached output of php info where it provides the commands of SAPI and other over riding commands by the shared host provider.

Regards
Priya
Attachments
http maftree.org phpinfo.pdf
(382.72 KiB) Downloaded 13 times
hamsavijay
 
Posts: 18
Joined: Fri Jul 03, 2009 3:14 pm

Re: Parse error: syntax error, unexpected T_NS_SEPARATOR

Postby asmecher » Mon Sep 16, 2013 11:43 am

Hi Priya,

You appear to have magic_quotes_gpc enabled in your PHP configuration. Try disabling it, flushing your template cache, and running OJS again.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8815
Joined: Wed Aug 10, 2005 12:56 pm

Re: Parse error: syntax error, unexpected T_NS_SEPARATOR

Postby hamsavijay » Wed Sep 18, 2013 1:56 pm

Thanks, Alec. Our hosting is on the shared server plan. After speaking with the provider we got to know that they can't change this setting as this will affect others. Is there any other work around to this through OJS config file? Otherwise, we've to look into VPS hosting or other host provider. Thanks, Priya
hamsavijay
 
Posts: 18
Joined: Fri Jul 03, 2009 3:14 pm

Re: Parse error: syntax error, unexpected T_NS_SEPARATOR

Postby asmecher » Wed Sep 18, 2013 2:37 pm

Hi Priya,

We haven't confirmed that this is the cause, but I strongly suspect that it is. The magic_quotes features in PHP are deprecated as of 5.3 and removed in 5.4. Most shared hosts provide ways of allowing users to override PHP configuration options via specific php.ini configuration files, but your host may not. In any case, it can't be overridden in OJS's configuration. The problem lies somewhere between your PHP configuration and the Smarty library that OJS uses to manage templates.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8815
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 5 guests