Tables Doesnt Exist

Installing and configuring Tera-WURFL on your server.

Re: Tables Doesnt Exist

Postby kamermans » Mon May 10, 2010 6:59 pm

Hooray! I'm glad the mystery is finally solved!
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 Doesnt Exist

Postby Carrilero21 » Mon May 10, 2010 7:19 pm

Now that I have the database and all working like it should. How do I get it to use it?
I mean, how do I make that in my website when they type: "www.myDomain.com" it first checks what kind of devices it is and redirect to "mobile.MyDomain.com" or stays in "www.myDomain.com"??
Is there a guide for this? Should I post this question in the "Using Tera-WURFL" Forum??
Carrilero21
 
Posts: 18
Joined: Fri Apr 16, 2010 6:36 pm

Re: Tables Doesnt Exist

Postby kamermans » Mon May 10, 2010 7:26 pm

Here's an example from the homepage (http://www.tera-wurfl.com) that does exactly what you want:
Code: Select all
<?php
require_once('./TeraWurfl.php');
$wurflObj = new TeraWurfl();
$wurflObj->getDeviceCapabilitiesFromAgent();

// see if this client is on a wireless device
if($wurflObj->getDeviceCapability("is_wireless_device")){
   header("Location: http://mobile.MyDomain.com/");
}
?>

Just put that at the top of your homepage and it will redirect your mobile visitors to your mobile site. Make sure you adjust './TeraWurfl.php' so it matches the location of your TeraWurfl.php file and the mobile.MyDomain.com so that it reflects your mobile site.
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 Doesnt Exist

Postby Carrilero21 » Mon May 10, 2010 9:58 pm

I am having trouble with the location I think, cause when I go to www.MyDomain.com The first thing in the site is this text:
getDeviceCapabilitiesFromAgent();

Code: Select all
// see if this client is on a wireless device
if($wurflObj->getDeviceCapability("is_wireless_device")){
   header("Location: http://mobile.MyDomain.com/");
}
?>


and then the site normally.

If I have the location like this in the FTP: "/public_html/Tera-Wurfl/TeraWurfl.php"

How should I put this in the code??

The homepage is in: "/public_html/"
Carrilero21
 
Posts: 18
Joined: Fri Apr 16, 2010 6:36 pm

Re: Tables Doesnt Exist

Postby kamermans » Tue May 11, 2010 7:13 am

The code that I posted needs to go in the PHP file for your website's homepage. I'm assuming this page is PHP, normally it's called index.php. You would need to edit that file and put the code at the top.
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 Doesnt Exist

Postby Carrilero21 » Tue May 11, 2010 2:53 pm

Oh no, its an .html called "index.html"
Carrilero21
 
Posts: 18
Joined: Fri Apr 16, 2010 6:36 pm

Re: Tables Doesnt Exist

Postby kamermans » Tue May 11, 2010 3:04 pm

Ok, then rename it to index.php and put the code exactly at the top of the page - before all other content. There can be nothing before it. Here's the code with your path in it:
Code: Select all
<?php
require_once('./Tera-Wurfl/TeraWurfl.php');
$wurflObj = new TeraWurfl();
$wurflObj->getDeviceCapabilitiesFromAgent();

// see if this client is on a wireless device
if($wurflObj->getDeviceCapability("is_wireless_device")){
   header("Location: http://mobile.MyDomain.com/");
}
?>
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 Doesnt Exist

Postby Carrilero21 » Tue May 11, 2010 3:20 pm

WOW! I didn't know that by just renaming it would work!

Thanks a lot! my website is up and running great thanks to your support and time!


THANKS A LOT!! All the problems I had are solved! :D
Carrilero21
 
Posts: 18
Joined: Fri Apr 16, 2010 6:36 pm

Re: Tables Doesnt Exist

Postby kamermans » Tue May 11, 2010 3:23 pm

No problem!
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 Doesnt Exist

Postby Carrilero21 » Wed May 12, 2010 12:34 pm

Ohh yes, maybe one last question. I was reading back on the posts and remembered you telling me about an .htaccess file.

I now know what they are, and why they are useful but I don't know how to create one and what to put on it.
Do you still recommend I use one in the admin directory?
Carrilero21
 
Posts: 18
Joined: Fri Apr 16, 2010 6:36 pm

PreviousNext

Return to Installation / Configuration

Who is online

Users browsing this forum: No registered users and 1 guest

cron