Tables not being created

Installing and configuring Tera-WURFL on your server.

Tables not being created

Postby dsoprea » Fri Mar 18, 2011 3:58 am

I was experiencing all of the symptoms in the viewtopic.php?f=2&t=9#p23 post, but this post abruptly stopped without a solution.

I've tried having Tera acquire the new XML file, and I've directly downloaded one myself. As I'm really only interested in identifying the presence of a mobile user, I also build a custom XML with just that capability. From all indications, the installation part of the import process seems to fail every time (if the method requires the XML file to be uploaded, that displays), but I get a blank screen when I expect the import to be taking place. This is on my own Ubuntu server, the memory-limit is substantial, and the installation path is set to be world-writable right now. However, I'm completely stuck. There are no errors in the PHP error-log except for the table-missing error:

[18-Mar-2011 03:26:23] PHP Fatal error: Uncaught exception 'Exception' with message 'Error: Table 'terawurfl.TeraWurflCache' does
n't exist' in /var/vhosts/randomingenuity/www/tw/DatabaseConnectors/TeraWurflDatabase_MySQL5.php:354
Stack trace:
#0 /var/vhosts/randomingenuity/www/tw/TeraWurfl.php(288): TeraWurflDatabase_MySQL5->getDeviceFromCache('SonyEricssonK70...')
#1 /var/vhosts/randomingenuity/www/tw/check_wurfl.php(51): TeraWurfl->getDeviceCapabilitiesFromAgent('SonyEricssonK70...')
#2 {main}
thrown in /var/vhosts/randomingenuity/www/tw/DatabaseConnectors/TeraWurflDatabase_MySQL5.php on line 354

The wurfl.log file is zero-length:

-rwxrwxrwx 1 555 www-data 0 2011-02-21 17:27 custom_web_patch_uas.txt
-rwxrwxrwx 1 555 www-data 90 2011-02-21 17:27 custom_web_patch.xml
-rwxrwxrwx 1 555 www-data 7291 2011-02-21 17:27 web_browsers_patch.xml
-rwxrwxrwx 1 www-data www-data 0 2011-03-18 03:02 wurfl.log
-rwxrwxrwx 1 www-data www-data 2380655 2011-03-18 03:23 wurfl.xml
-rwxrwxrwx 1 www-data www-data 976965 2011-03-18 03:15 wurfl.xml.zip



Any ideas?

Dustin Oprea
dsoprea
 
Posts: 1
Joined: Fri Mar 18, 2011 3:48 am

Re: Tables not being created

Postby kamermans » Wed Mar 23, 2011 12:13 am

Hi Dustin, I would be happy to help you with this - I think the other thread ended prematurely because I was not getting enough accurate information to determine the root cause (and I probably got distracted - I'm not opposed to bumps :) ). Since this is your own box we can probably get a lot more info than if it was a VM on a random web host.

I'm assuming the admin/install.php page is coming up fine. The next step is what you've described - updating the wurfl.xml file. Since the page says that the file has been downloaded, then shows nothing, it is probably an issue with the XML Parser. Typically this is caused by a lack memory or another issue that I know little about with the XMLReader XML Parser.

If you are using the stock 2.1.4, please locate and edit the file TeraWurflXMLParsers/TeraWurflXMLParser.php. Once open, either look for the content below or go directly to line 51:
Code: Select all
final public static function getInstance(){
      if(class_exists('XMLReader')){


You will need to change it to the following:

Code: Select all
final public static function getInstance(){
      if( ! class_exists('XMLReader')){


This will force Tera-WURFL to use the method of XML Parsing that was used in version <=2.1.3 called SimpleXML. This requires much more memory, but seems to be more reliable.

Once this file is saved, please go back to the Web Administration page and try to load the WURFL file again.

I believe that the Exception in your log file is unrelated - probably caused by visiting or being forwarded to a page that requires the tables to be in place. The update process itself will verify that the tables exist and will recreate them if necessary. If you are still getting this error, can you go to a MySQL client and see which tables do exist in the DB? You can use the MySQL command SHOW TABLES to list all of the tables in the DB.
Thanks,

Steve Kamerman
Tera-WURFL Author
COO of ScientiaMobile

IMPORTANT ANNOUNCEMENT! Tera-WURFL and WURFL have joined forces! We have launched ScientiaMobile to provide commercial support for our device detection solutions.

Tera-WURFL.com | Device Explorer
kamermans
Site Admin
 
Posts: 323
Joined: Wed Mar 10, 2010 12:06 pm
Location: Fort Worth, TX

Re: Tables not being created

Postby oesmieu » Wed May 04, 2011 7:24 pm

I have a similar issue. According to the install page everything is OK. My next step was to delete the install.php page and update the wurfl.xml file. I downloaded the current release and uploaded to the appropriate directory: data/

I did not delete the install.php file and went ahead and updated the wurfl.xml file. No errors are showing on the install page, I checked MySQL and the database is empty, no tables, and no errors. I never got a database update OK either.

Any suggestions?
oesmieu
 
Posts: 9
Joined: Sat Apr 30, 2011 10:38 pm

Re: Tables not being created

Postby kamermans » Wed May 04, 2011 7:38 pm

I fixed a bug that was causing this error for some people a few days ago. I would recommend grabbing the current copy of the code from GitHub and giving that a spin: https://github.com/kamermans/Tera-WURFL

Also, how much RAM do you have in your server?
Thanks,

Steve Kamerman
Tera-WURFL Author
COO of ScientiaMobile

IMPORTANT ANNOUNCEMENT! Tera-WURFL and WURFL have joined forces! We have launched ScientiaMobile to provide commercial support for our device detection solutions.

Tera-WURFL.com | Device Explorer
kamermans
Site Admin
 
Posts: 323
Joined: Wed Mar 10, 2010 12:06 pm
Location: Fort Worth, TX

Re: Tables not being created

Postby oesmieu » Wed May 04, 2011 9:40 pm

I made the changes and uploaded the file nothing changed.

In regards to the amount of RAM I asked my hosting provider and they told me the cannot provide that information because its a shared hosting server. In order to get that information I would have to migrate to either a Virtual or Dedicated Server.

Thank you.
oesmieu
 
Posts: 9
Joined: Sat Apr 30, 2011 10:38 pm

Re: Tables not being created

Postby oesmieu » Fri May 06, 2011 2:46 pm

I am reading over the requirements again to run terawurfl, when it states: Hardware must be independent does that mean you need a dedicated hosting server? And is that the reason I can't get the tables to be created?

Thank you.
oesmieu
 
Posts: 9
Joined: Sat Apr 30, 2011 10:38 pm

Re: Tables not being created

Postby oesmieu » Sun May 08, 2011 6:03 pm

Been looking through some of the other threads and my problems seems to be similar to another person, when I click on the update your database from the local WURFL file I get the following error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

You gave the other person a smaller version of the wurfl file due to possible low RAM. That file is no longer available on the link you provided, I was wondering if I can try that.

Thank you.
oesmieu
 
Posts: 9
Joined: Sat Apr 30, 2011 10:38 pm

Re: Tables not being created

Postby ijansch » Sun May 15, 2011 8:09 am

Steve, I can confirm that the fix you mentioned a few replies ago works. I downloaded the tera-wurfl from the website which had the segfault problem. I switched to a current snapshot from git and it worked fine.
ijansch
 
Posts: 1
Joined: Sun May 15, 2011 8:07 am

Re: Tables not being created

Postby kamermans » Sun May 15, 2011 10:20 am

@ijansch thanks for confirming - I'm glad it worked for you!

@oesmieu "Hardware independent" means that it doesn't matter what hardware you are running this software on. The problem is likely that the shared hosting configuration is incompatible with Tera-WURFL. Possible causes could be: not enough memory to load the WURFL file, no php-mysqli extension, no read/write access by the webserver to your data/ directory.
Thanks,

Steve Kamerman
Tera-WURFL Author
COO of ScientiaMobile

IMPORTANT ANNOUNCEMENT! Tera-WURFL and WURFL have joined forces! We have launched ScientiaMobile to provide commercial support for our device detection solutions.

Tera-WURFL.com | Device Explorer
kamermans
Site Admin
 
Posts: 323
Joined: Wed Mar 10, 2010 12:06 pm
Location: Fort Worth, TX

Re: Tables not being created

Postby oesmieu » Thu May 19, 2011 2:00 pm

Do you still have the smaller version of the WURFL file so I can try that? I seen it in another thread but the URL was no longer valid?
oesmieu
 
Posts: 9
Joined: Sat Apr 30, 2011 10:38 pm

Next

Return to Installation / Configuration

Who is online

Users browsing this forum: No registered users and 3 guests

cron