error on page

Installing and configuring Tera-WURFL on your server.

error on page

Postby IMSM » Tue Mar 01, 2011 2:10 pm

For some reason in the last few days my page
Code: Select all
http://www.mobideviceads.com/pbma.html
has been throwing an error:


I'm using this script:
Code: Select all
<?php

require_once("Tera-Wurfl/TeraWurfl.php");
$wurflObj = new TeraWurfl();
$wurflObj->getDeviceCapabilitiesFromAgent();
$isWireless = $wurflObj->getDeviceCapability("is_wireless_device");

if($isWireless)
   header("location: http://www.m.mobideviceads.com/pbma.html");

?>

<html>
<head>



AND IT'S THROWING ERRORS!
What to do?
Thanks,
MDA
IMSM
 
Posts: 5
Joined: Thu Jan 27, 2011 9:57 am

Re: error on page

Postby kamermans » Tue Mar 01, 2011 2:28 pm

Hi MDA, the problem is that you put this script in a .html file, which is not being parsed by PHP. The file needs to have the extension .php to work properly, or you will need to do use another method to tell Apache that you want html files parsed as if they were php.
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: error on page

Postby IMSM » Tue Mar 01, 2011 4:26 pm

Okay that makes sense. However, does that mean that if I want the tera-wurfl php script to reside at the top of all my pages that I have to have the .com site pages end with .php?
IMSM
 
Posts: 5
Joined: Thu Jan 27, 2011 9:57 am

Re: error on page

Postby kamermans » Tue Mar 01, 2011 10:23 pm

Yes it does.
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


Return to Installation / Configuration

Who is online

Users browsing this forum: No registered users and 4 guests