CMS Made Simple 1.4 : Parse error: parse error, unexpected

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
IvanVersluis
New Member
New Member
Posts: 6
Joined: Fri Aug 15, 2008 10:47 am

CMS Made Simple 1.4 : Parse error: parse error, unexpected

Post by IvanVersluis »

Hi,

Recently I upgraded CMSMadeSimple from version 1.04 to 1.4. The website was running on a Ubuntu JeOS 7.04 machine and moved the website content and the database back to the hosting provider.

Everything is working fine except for the Search function and couple minutes ago I also got a error message when trying to get the server info report in text.

Error message1:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/www/hubo-roneijgelsheim/site/lib/smarty/Smarty_Compiler.class.php(270) : regexp code on line 5

Fatal error: preg_replace() [function.preg-replace]: Failed evaluating code: '{php' . str_repeat(" ", substr_count('{* You can also instantiate custom behaviour on a module by module basis by looking at the $entry->module and $entry->modulerecord fields in $entry ie: {if $entry->module == ''News''}{News action=''detail'' article_id=$entry->modulerecord detailpage=''News''} *}', " ")) .'}' in /home/www/hubo-roneijgelsheim/site/lib/smarty/Smarty_Compiler.class.php on line 270

http://www.hubo-roneijgelsheim.nl/site/index.php?mact=Search%2Ccntnt01%2Cdosearch%2C0&cntnt01returnid=15&cntnt01searchinput=deuren&submit=Versturen

Error message2:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/www/hubo-roneijgelsheim/site/lib/smarty/Smarty_Compiler.class.php(270) : regexp code on line 23

Fatal error: preg_replace() [function.preg-replace]: Failed evaluating code: '{php' . str_repeat(" ", substr_count('{literal} function fnSelect(objId) { fnDeSelect(); if (document.selection) { var range = document.body.createTextRange(); range.moveToElementText(document.getElementById(objId)); range.select(); } else if (window.getSelection) { var range = document.createRange(); range.selectNode(document.getElementById(objId)); window.getSelection().addRange(range); } } function fnDeSelect() { if (document.selection) document.selection.empty(); else if (window.getSelection) window.getSelection().removeAllRanges(); } fnSelect(''copy_paste_in_forum''); {/literal}', " ")) .'}' in /home/www/hubo-roneijgelsheim/site/lib/smarty/Smarty_Compiler.class.php on line 270

I am not sure if this has something to do with my hosting provider settings or my config.php file. I had some issue when dumping my sql export file back to the hosting mysql server and removed coupe of settings like collation.

See attached text file for server report.

Any suggestion is welcome.

Thank you.

Ivan Versluis
www.networknet.nl
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: CMS Made Simple 1.4 : Parse error: parse error, unexpected

Post by Dr.CSS »

Not clear, you had this running on home/local comp. then tried to move to host?...

You should have upgraded to 1.2.1 from 1.0.4, if that was it, as it has moved custom templates for new to News admin interface and a couple of other things then upgrade to latest...

If you moved it and the DB and made any changes like collation etc. it may not work correctly, also if moving you should always clear cache in site and or do it manually with FTP client looking in tmp, tmp/template_c should be no files in either place...
IvanVersluis
New Member
New Member
Posts: 6
Joined: Fri Aug 15, 2008 10:47 am

Re: CMS Made Simple 1.4 : Parse error: parse error, unexpected

Post by IvanVersluis »

Hi Mark, thank you for replying.

I had the website running locally on my private machine and than I upload the website to the hosting provider. I agree with you that I skipped couple of versions and I may have broke something.

I download and installed version 1.21 on the same server and database. All installation steps were OK until I opened the website. I receive the following error:

Code: Select all

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/www/versluis/cms-1.21/lib/smarty/Smarty_Compiler.class.php(270) : regexp code on line 2

Fatal error: preg_replace() [function.preg-replace]: Failed evaluating code: '{php' . str_repeat(" ", substr_count('{* Don''t remove this! Metadata is entered in Site Admin/Global settings. *}', " ")) .'}' in /home/www/versluis/cms-1.21/lib/smarty/Smarty_Compiler.class.php on line 270
This is the same error message as I got on my migrated site. The version of mysqld is 3.23.53; could this be the problem?

Thanks.
alby

Re: CMS Made Simple 1.4 : Parse error: parse error, unexpected

Post by alby »

IvanVersluis wrote: I download and installed version 1.21 on the same server and database. All installation steps were OK until I opened the website. I receive the following error:
Try to restore full database on a local mysql version 5 and export via phpmysqladmin with 4.0 compatibility
Restore on server with with version (I think that you must drop a few lines only)

IvanVersluis wrote: This is the same error message as I got on my migrated site. The version of mysqld is 3.23.53; could this be the problem?
I used 3.23.58 until a few months ago ...

Alby
IvanVersluis
New Member
New Member
Posts: 6
Joined: Fri Aug 15, 2008 10:47 am

Re: CMS Made Simple 1.4 : Parse error: parse error, unexpected

Post by IvanVersluis »

Thanks alby for your reply. I tried your suggestion and it got worse; the latest version 1.4.1 failed to open after the installation and I started to debug the error messages. I enabled debug on the fresh install; and I did not get any information back as it failed when opening the page. I start searching for the error text and logparsered all source files; no result and than I started looking into the database and the admin pages. I found that the comments in the template caused this error.

After fixing the starting problem I got the same error on my new installed website with Search and than I started to look into the Modules area and found the comment which caused my problem. I removed it and it fixed my problem.

For more details check my blog post http://www.networknet.nl/apps/wp/archives/470.

Ivan Versluis
alby

Re: CMS Made Simple 1.4 : Parse error: parse error, unexpected

Post by alby »

IvanVersluis wrote: After fixing the starting problem I got the same error on my new installed website with Search and than I started to look into the Modules area and found the comment which caused my problem. I removed it and it fixed my problem.
Very strange.
Which version of PHP?

Alby
IvanVersluis
New Member
New Member
Posts: 6
Joined: Fri Aug 15, 2008 10:47 am

Re: CMS Made Simple 1.4 : Parse error: parse error, unexpected

Post by IvanVersluis »

Hi Alby,

I finally finished the website  :).

Here are the details:
- WARNING: PHP Safe mode is enabled.  I get this error message when logging into Admin panel
- CMS Version 1.4.1
- Current PHP Version (phpversion):  5.0.2
- Mysqld server 4.1.11

I hope this will help. I still get those errors but not in the website to public.

Thanks Ivan
alby

Re: CMS Made Simple 1.4 : Parse error: parse error, unexpected

Post by alby »

IvanVersluis wrote: - WARNING: PHP Safe mode is enabled.  I get this error message when logging into Admin panel
Safe mode is not supported by CMSMS
You've probably problems with ModuleManager, upload of files, etc...
Ask to your provider to disable safe mode

Alby
Post Reply

Return to “CMSMS Core”