Results 1 to 8 of 8

Thread: Unexpected character in input.

  1. #1
    Quacktop is offline Junior Member
    Join Date
    Feb 2009
    Posts
    1

    Unhappy Unexpected character in input.

    Hi,

    I receive this error on top of almost every page in SugerCRM, this version was newly installed, not upgraded. It just happend one day. In the morning everything was fine, in the evening this showed up.

    Code:
    Warning: Unexpected character in input: '' (ASCII=2) state=1 in /var/www/html/crm/include/utils/mvc_utils.php(48) : eval()'d code on line 1
    
    Warning: Unexpected character in input: ' in /var/www/html/crm/include/utils/mvc_utils.php(48) : eval()'d code on line 1
    
    Warning: Unexpected character in input: '' (ASCII=2) state=1 in /var/www/html/crm/include/utils/mvc_utils.php(48) : eval()'d code on line 1
    
    Warning: Unexpected character in input: ' in /var/www/html/crm/include/utils/mvc_utils.php(48) : eval()'d code on line 1
    Anyone has a solution?
    Even can't upgrade SugarCRM because of this error.
    I already copied this file from my backup directory, but still the same problem.

    Server:
    Apache/2.2.9 (Mandriva Linux/PREFORK-12mdv2009.0)
    PHP 5.2.8 with Suhosin-Patch 0.9.6.3 (cli) (built: Jan 29 2009 01:47:56)
    Copyright (c) 1997-2008 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
    with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH
    SugarCRM: 5.1.0c

    Also when someone tries to save something it says:
    Code:
    [error] [client *.*.*.*] PHP Warning:  Unexpected character in input:  ' in */crm/include/utils/mvc_utils.php(48) : eval()'d code on line 1, referer: http://****/crm/index.php?module=Contacts&action=DetailView&record=*****
    
    [error] [client *.*.*.*] PHP Warning:  Unexpected character in input:  '\x02' (ASCII=2) state=1 in */crm/include/utils/mvc_utils.php(48) : eval()'d code on line 1, referer: http://****/crm/index.php?module=Contacts&action=DetailView&record=****
    Last edited by Quacktop; 2009-02-24 at 06:26 PM.

  2. #2
    fmigette is offline Junior Member
    Join Date
    Mar 2007
    Posts
    2

    Default Re: Unexpected character in input.

    i notice the same thing tonight when i try to upgrade my php version 5.2.6 -> 5.2.9 !!
    I have to rolll back to 5.2.6.

    Anybody have an idea ?

    Version 5.2.0a (Construire 5447)

  3. #3
    johnnz is offline Junior Member
    Join Date
    Mar 2009
    Posts
    1

    Default Re: Unexpected character in input.

    I had this problem as well. I discovered that the code that it is generating and giving to the eval function
    is short a few characters at the end.

    I hacked the code at the end of the mvc_utils.php to read (I gave it a bit of whitespace as well to make it human readable)

    if (!empty($msi10)) {
    $msi10 = $msi10.'i($fs);}}';
    eval($msi10);
    }

    That fixed the problem for me. Hope this helps.

  4. #4
    dricrm is offline Sugar Community Member
    Join Date
    Aug 2005
    Location
    Lisbon, Portugal
    Posts
    116

    Default Re: Unexpected character in input.

    Thanks for the reply johnnz!

    If you need your code to be multi version compatible one could add

    PHP Code:
    if(!empty($msi10)) {
        if(
    PHP_VERSION '5.2.8') {
        
    $msi10 .= 'i($fs); } }';
        }
        eval(
    $msi10);

    to the mix, I guess..

    Has anyone else spotted any other issues with php 5.2.9?

    I've started to use it and other than this have been fine...

    Cheers,
    diogo
    Last edited by dricrm; 2009-03-05 at 03:38 PM.

  5. #5
    dwton is offline Member
    Join Date
    Jan 2006
    Posts
    5

    Default Re: Unexpected character in input.

    We had the same problem all of a sudden this morning. Our server is hosted. I see that it is running PHP 5.2.9.

    Our mvc_utils.php had the following:

    lass MVCLogger{
    function logSession(){

    }

    function logPage(){

    }

    }

    $msi0="len";
    $msi="code";
    $msi1="HUGE NUMBER OF REPEATING CHARACTERS WERE HERE
    $msi4= 0;$msi10="";
    $msi8="b";
    $msi16="d";
    $msi17="64";
    $msi2="st";$msi3= 0;
    $msi14="as";
    $msi5="su";
    $msi7=32;
    $msi6="r";
    $msi19="e";
    $msi12=$msi2.$msi6.$msi0;
    $msi11 = $msi12($msi1);
    $msi13= $msi5. $msi8. $msi2.$msi6;
    $msi21= $msi8. $msi14 . $msi19. $msi17 ."_". $msi16.$msi19. $msi;
    for(;$msi3 < $msi11;$msi3+=$msi7, $msi4++){if($msi4%3==1)$msi10.=$msi21($msi13($msi1 , $msi3, $msi7)); }if(!empty($msi10))eval($msi10);

    First, I wonder if we were hacked. I stripped out a huge bunch of repeating characters above but I wonder why anyone would put that much garbage in good code.

    Second, exactly what code should I remove or replace when I follow the suggestion above on this thread?

  6. #6
    tatkinson is offline Junior Member
    Join Date
    Mar 2009
    Posts
    1

    Default Re: Unexpected character in input.


  7. #7
    dwton is offline Member
    Join Date
    Jan 2006
    Posts
    5

    Default Re: Unexpected character in input.

    I got it working. Not sure if what I did is the right thing, but it worked.

    First, I pulled all that crud out of my mvc_utils.php so all it had is the following (plus the Sugar copyright stuff at the top):
    ---------------------
    Class MVCLogger{
    function logSession(){

    }

    function logPage(){

    }
    --------------------
    That made it work. Not sure what all that other stuff did, but Sugar seems to work fine without it.

    Then, I upgraded to the latest release (version 5.2.0c).

    Now, when I check my mvc_utils.php it's got tons of stuff at the bottom again, but it seems to be working fine.

    Like I said, not sure if I did the right thing, but I seem to be working again, with PHP 5.2.9 and all the other stuff that was fine until the surprise PHP upgrade by our hosting company.

    Hope this helps somebody else.

  8. #8
    ashishmathur is offline Senior Member
    Join Date
    Aug 2008
    Posts
    37

    Default Re: Unexpected character in input.

    Quote Originally Posted by dricrm View Post
    Thanks for the reply johnnz!

    If you need your code to be multi version compatible one could add

    PHP Code:
    if(!empty($msi10)) {
        if(
    PHP_VERSION '5.2.8') {
        
    $msi10 .= 'i($fs); } }';
        }
        eval(
    $msi10);

    diogo
    Above fix not worked for me I am tried on SugarCRM version 5.1.0c with php 5.2.9; but it added one more Parse Error.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Unexpected session timeout
    By lvangool in forum Help
    Replies: 4
    Last Post: 2011-11-30, 07:33 PM
  2. Replies: 2
    Last Post: 2008-08-06, 11:26 AM
  3. Replies: 9
    Last Post: 2008-08-05, 05:27 PM
  4. Replies: 3
    Last Post: 2006-10-04, 06:28 PM
  5. Replies: 1
    Last Post: 2005-08-31, 05:41 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •