CGextensions error

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
jraderma
Forum Members
Forum Members
Posts: 18
Joined: Sat Jan 24, 2015 10:53 pm

CGextensions error

Post by jraderma »

I've searched for this on the forum and found some topics, but they are too old to make a new post. I'm getting the dreaded error:

Code: Select all

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in ../modules/CGExtensions/lib/class.cg_exception.php on line 38

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in ../modules/CGExtensions/lib/class.cg_exception.php on line 44
Firstly, I am using PHP 5.3.29, so that's not what is causing the error (I think). However, I have narrowed it down to a cause. If my pages are served up as HTTPS, it throws the error. If HTTP, everything is fine. I've got a few pages on my site that transmit credit card data to a payment gateway, so the HTTPS is imperative.

Here is my setup:
Cms Version: 1.11.11

Installed Modules:

CMSMailer: 5.2.2
FileManager: 1.4.5
MenuManager: 1.8.6
ModuleManager: 1.5.8
News: 2.14.4
Printing: 1.1.2
Search: 1.7.11
ThemeManager: 1.1.8
TinyMCE: 2.9.12
CGExtensions: 1.42.2
jQuery: 1.2.0
FormBuilder: 0.8.1.1
Captcha: 0.5.0
CGCalendar: 1.10.0.1
youtubeplayer: 1.3
CMSPrinting: 1.0.5
MicroTiny: 1.2.7

Config Information:

php_memory_limit:
process_whole_template:
max_upload_size: 64000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true

Php Information:

phpversion: 5.3.29
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 90M
max_execution_time: 30
output_buffering: 0
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 65M
upload_max_filesize: 64M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)

Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.1.39
Server Db Grants: Could not find a suitable "GRANT ALL" permission. This may mean you could have problems installing or removing modules. Or even adding and deleting items, including pages
Server Time Diff: No filesystem time difference found

Thanks for any help!
Jon
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: CGextensions error

Post by staartmees »

Your modules aren't up-to-date. All current CG-modules need php5.4 or higher.
jraderma
Forum Members
Forum Members
Posts: 18
Joined: Sat Jan 24, 2015 10:53 pm

Re: CGextensions error

Post by jraderma »

Actually, I was really careful to only update CGCalendar and CGExtensions to the versions that supported PHP 5.3, since I'm not in a position to take the site to PHP 5.4 right now.

I just wonder if it's a simple incongruence between the script syntax that forces SSL and CGExtensions.
jraderma
Forum Members
Forum Members
Posts: 18
Joined: Sat Jan 24, 2015 10:53 pm

Re: CGextensions error

Post by jraderma »

Now it's gone to a new level. I backed up, upgraded CGCalendar to 1.10.4 and then upgraded CMSMS to 1.11.12 because I saw an update on HTTPS and namespaces. Now when I try to serve up ANY https page, I get a fatal PHP error:

Code: Select all

Parse error: syntax error, unexpected T_FUNCTION in /home/domain/lib/html_entity_decode_php4.php on line 307
I noticed the html_entity_decode_php4.php file was new with 1.11.12 upgrade to be PHP5.x compatible. But I'm wondering if the string being sent to the function is improperly formatted or something.

I'm desperate at this point. All the PR around the launch of the site is set with launch date of January 30. I can revert to the 1.11.11 backup if I need to, but that still threw out the errors stated in my original post at the top of this thread.

Thanks!
Jon
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: CGextensions error

Post by Jo Morg »

jraderma wrote:I'm desperate at this point. All the PR around the launch of the site is set with launch date of January 30. I can revert to the 1.11.11 backup if I need to, but that still threw out the errors stated in my original post at the top of this thread.
What you call errors on your original post are not errors but warnings. If you don't have any visible real errors with the site functionality, the only thing you really needed at that point was to remove the visibility of the php errors, which in production sites should only be logged.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
jraderma
Forum Members
Forum Members
Posts: 18
Joined: Sat Jan 24, 2015 10:53 pm

Re: CGextensions error

Post by jraderma »

Jo Morg wrote:What you call errors on your original post are not errors but warnings. If you don't have any visible real errors with the site functionality, the only thing you really needed at that point was to remove the visibility of the php errors, which in production sites should only be logged.
Thanks for your reply, Jo.

So if I revert back to the previous version, would I turn off error reporting in php.ini, or in the CMSMS config file? This appears to be applicable to PHP5.3 and should give me warnings, but not errors or parsing errors:

Code: Select all

error_reporting(E_ERROR | E_PARSE);
If that temp fix would get me by, I'm wondering if when I am able to switch to PHP5.4 and upgrade all CG modules if all of this will go away and I can turn error reporting for warnings back on.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: CGextensions error

Post by Jo Morg »

jraderma wrote:So if I revert back to the previous version, would I turn off error reporting in php.ini, or in the CMSMS config file?
I would recommend in php.ini, and turning it on when needed on config.php, (which CMSMS already does with debug flag on, IIRC).
jraderma wrote:If that temp fix would get me by, I'm wondering if when I am able to switch to PHP5.4 and upgrade all CG modules if all of this will go away and I can turn error reporting for warnings back on.
Possibly, but then I would use some caution. I would clone the site (files and DB) to a temp dir to do some tests, assuming that you can (as I can in my server) change php version by setting a flag on .htaccess. This way it takes much less time and effort to revert back if needed... actually if it doesn't work you just wait for a new release and test again without affecting the production site.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
jraderma
Forum Members
Forum Members
Posts: 18
Joined: Sat Jan 24, 2015 10:53 pm

Re: CGextensions error

Post by jraderma »

Jo,

Thank you again for your advice. I just did the latter first, copied the old site and then applied a change to PHP5.4 in the .htaccess file. WOOSH, all warnings disappeared! So I guess that answers my question. That led me to try and use the .htaccess script in the subfolders of the site assets that must remain on PHP5.3 for now. Much to my relief, that worked too!

Thanks! You saved my bacon...
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: CGextensions error

Post by Jo Morg »

jraderma wrote:Thanks! You saved my bacon...
NP.
jraderma wrote:If that temp fix would get me by, I'm wondering if when I am able to switch to PHP5.4 and upgrade all CG modules if all of this will go away and I can turn error reporting for warnings back on.
I'd be wary with turning errors on for display as it can be a valuable tool for hackers to get a notion of the site's file system...
I would never display errors on a production site, having the possibility to just log them... Just a though.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Post Reply

Return to “Modules/Add-Ons”