Fatal error: Uncaught exception 'WURFL_Storage_Exception'

jacktang
Posts: 4
Joined: Mon Jan 14, 2013 5:56 pm

Fatal error: Uncaught exception 'WURFL_Storage_Exception'

Postby jacktang » Mon Jan 14, 2013 5:58 pm

Fatal error: Uncaught exception 'WURFL_Storage_Exception' with message 'Couldn't show tables from database 202 (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '202 LIKE 'wurfl_object_cache'' at line 1)' in E:\dwbet\3rd-parties\wurfl\WURFL\Storage\Mysql.php:72 Stack trace: #0 E:\dwbet\3rd-parties\wurfl\WURFL\Storage\Mysql.php(51): WURFL_Storage_Mysql->initialize() #1 E:\dwbet\3rd-parties\wurfl\WURFL\Storage\Factory.php(43): WURFL_Storage_Mysql->__construct(Array) #2 E:\dwbet\3rd-parties\wurfl\WURFL\WURFLManagerFactory.php(142): WURFL_Storage_Factory::create(Array) #3 E:\dwbet\3rd-parties\wurfl\WURFL\WURFLManagerFactory.php(57): WURFL_WURFLManagerFactory::persistenceStorage(Array) #4 E:\dwbet\3rd-parties\wurfl\includes\header_config_inc.php(15): WURFL_WURFLManagerFactory->__construct(Object(WURFL_Configuration_ArrayConfig)) #5 E:\dwbet\tracking202\includes\devices_detect_inc.php(19): include_once('E:\dwbet\3rd-pa...') #6 E:\dwbet\tracking in E:\dwbet\3rd-parties\wurfl\WURFL\Storage\Mysql.php on line 72

jacktang
Posts: 4
Joined: Mon Jan 14, 2013 5:56 pm

Re: Fatal error: Uncaught exception 'WURFL_Storage_Exception

Postby jacktang » Mon Jan 14, 2013 6:04 pm

throw new WURFL_Storage_Exception("Couldn't show tables from database $this->db (".mysql_error($this->link).")");

kamermans
Posts: 393
Joined: Mon Jun 06, 2011 9:50 am

Re: Fatal error: Uncaught exception 'WURFL_Storage_Exception

Postby kamermans » Mon Jan 14, 2013 8:18 pm

Thanks for the report, we are trying to reproduce it now. Perhaps the problem is that your database name is a number, and is not escaped properly in the API.
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!

kamermans
Posts: 393
Joined: Mon Jun 06, 2011 9:50 am

Re: Fatal error: Uncaught exception 'WURFL_Storage_Exception

Postby kamermans » Mon Jan 14, 2013 11:54 pm

I have reproduced the bug and as I expected it is due to the way numeric database names are handled (or not handled) in SQL statements. The solution is to explicitly escape the database name in the database abstraction layer. We have fixed the bug in the upstream version, but this issue is so narrowly-focused, that we will not be releasing a new version for this issue. In the meantime, please put the attached Mysql.php file (inside the ZIP file) in your WURFL/Storage folder and the problem will be resolved.
Attachments
Mysql.zip
Bugfix for numeric database names in MySQL storage engine
(1.7 KiB) Downloaded 784 times
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!

jacktang
Posts: 4
Joined: Mon Jan 14, 2013 5:56 pm

Re: Fatal error: Uncaught exception 'WURFL_Storage_Exception

Postby jacktang » Tue Jan 15, 2013 1:30 am

kamermans wrote:I have reproduced the bug and as I expected it is due to the way numeric database names are handled (or not handled) in SQL statements. The solution is to explicitly escape the database name in the database abstraction layer. We have fixed the bug in the upstream version, but this issue is so narrowly-focused, that we will not be releasing a new version for this issue. In the meantime, please put the attached Mysql.php file (inside the ZIP file) in your WURFL/Storage folder and the problem will be resolved.
thanks you very much

but then i put the attached Mysql.php,

It appears the new error:

Warning: XMLReader::open() [xmlreader.open]: Unable to open source data in E:\dwbet\3rd-parties\wurfl\WURFL\Xml\AbstractIterator.php on line 90

Warning: XMLReader::read() [xmlreader.read]: Load Data before trying to read in E:\dwbet\3rd-parties\wurfl\WURFL\Xml\VersionIterator.php on line 29

Warning: XMLReader::open() [xmlreader.open]: Unable to open source data in E:\dwbet\3rd-parties\wurfl\WURFL\Xml\AbstractIterator.php on line 90

Warning: XMLReader::read() [xmlreader.read]: Load Data before trying to read in E:\dwbet\3rd-parties\wurfl\WURFL\Xml\DeviceIterator.php on line 58

Fatal error: Call to a member function getCapabilities() on a non-object in E:\dwbet\3rd-parties\wurfl\WURFL\CustomDeviceRepository.php on line 72

kamermans
Posts: 393
Joined: Mon Jun 06, 2011 9:50 am

Re: Fatal error: Uncaught exception 'WURFL_Storage_Exception

Postby kamermans » Tue Jan 15, 2013 3:59 pm

This error seems to be related to file permissions. Are you using Apache on Windows or some other webserver?
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!

jacktang
Posts: 4
Joined: Mon Jan 14, 2013 5:56 pm

Re: Fatal error: Uncaught exception 'WURFL_Storage_Exception

Postby jacktang » Tue Jan 15, 2013 9:29 pm

kamermans wrote:This error seems to be related to file permissions. Are you using Apache on Windows or some other webserver?
i use windows2003 on vps ,it is not apache ,it is Internet Information Services

kamermans
Posts: 393
Joined: Mon Jun 06, 2011 9:50 am

Re: Fatal error: Uncaught exception 'WURFL_Storage_Exception

Postby kamermans » Wed Jan 16, 2013 1:00 am

Perhaps the issue now is that the data is not being uncompressed properly from the ZIP file, and that is causing the XML parser to fail parsing. Can you please unzip the resources/wurfl.zip file to that same directory, then point your config at that wurfl.xml file? Sorry for the difficulty - IIS/Windows is supported, but since it is rather uncommon to use the PHP API on IIS, the setup can be a little challenging.
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!


Who is online

Users browsing this forum: No registered users and 14 guests