Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Fatal error: input in flex scanner failed


Recommended Posts

I getting the following error when I load the admin page:


:evil: Fatal error: input in flex scanner failed in /var/www/html/admin/includes/languages/english on line 1


If I change the "$language = 'english';" variable in application_top.php to "$language = 'english.php';" half the page loads but still errors out with "english.php.php".


I've pulled down the code three times and have removed admin and catalog all three times.


any help would be appreciated.




Link to comment
Share on other sites

  • 4 weeks later...

This problem is a nasty CHR (cruel hazing ritual)!


First, the error "input in flex scanner failed" occurs in PHP when one tries to "require" or "include" a directory instead of a file. I suspected this had something to do with the variable $language in /admin/includes/application_top.php. I grepped for '$language' in the 'includes' directory and found this line in the file 'application_top.php':


$include_file = DIR_WS_LANGUAGES . $language . '/' . basename($PHP_SELF); include(DIR_WS_INCLUDES . 'include_once.php');


Aha! Then it hit me: Any version of php after at least version 4.2.0 installs by default with 'register_globals' set to 'off' in the php.ini file. The cruelist of CHR's arrises from the use of the convenient $PHP_SELF variable in scripts. When register_globals is off, so is this variable. No matter. The value always exists in the $_SERVER variable! Here is a quick fix:


In your /admin/includes/local/configure.php file (you created one, didn't you?! Otherwise edit application_top.php) add the following line at the top:




Problem solved. Hope this helps!

Link to comment
Share on other sites

Most likely due to register_globals being off.


If you have root, set;




If not, speak (very nicely) to your host who might help you. Most likely running a version of PHP newer than 4.1.1



Link to comment
Share on other sites

AUGH!!! Ok, my fix will only partially work. As it turns out, there are other instances of code that are not written to support 'register_globals' turned 'off.' You will have to set 'register_globals' to 'on' if you wish to use the admin site. If you are running your site as a VirtualHost in Apache, simply set a local php flag variable to avoid turning on register_globals server-wide. Example:



...blah blah blah...

<Directory /path/to/document/root/>

<IfModule mod_php4.c>

php_admin_flag register_globals on





No more CHR's!

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...