TeraWurflDatabase_MySQL5.php on line 359

dididounet
13 years, 5 months ago
Hi there
Thanks for a great extension !!!
upgrading to your latest release I started to have a fatal error with some preliminary warnings couldn't fecth mysqli in....TeraWurflDatabase_MySQL5.php on line 542 and then a fatal error on line 359
Seems there are problems with mysqli. I checked the existence of the mysqli library :
if (function_exists('mysqli_connect')) {
//mysqli is installed
}
no problem mysqli library is installed
my Joomla installation has a global confirguration using mysqli
on google I found numerous hits on the same issue. but no good answer.
I wonder if you have any idea what I could investigate to fix that problem ???
Didier
dididounet
13 years, 5 months ago
Forgot to mention that I tried to re-install the extension a couple of time to no avail... (before you suggest that solution...)
dididounet
13 years, 5 months ago
Also hosted at hostgator...
dryabov
13 years, 5 months ago
Looks like you use PHP4, because of PHP5 should catch and process (in plugins/mobile/terawurfl.php) errors of TeraWURFL.
dididounet
13 years, 5 months ago
Nope
Actually found a quick solution. I use Jumi and it seems your app requires the definition of an item id to run properly. Adding &item=1 does the trick but it is no so elegant... Any chance to consider an change on your side since there are so many of us using jumi ??
dididounet
13 years, 5 months ago
Actually seems it is new to this release cause I don't think the problem was there in the previous one...
dryabov
13 years, 5 months ago
dididounet wrote:
Actually seems it is new to this release cause I don't think the problem was there in the previous one...

There was no changes in TeraWURFL plugin (except of updating WURFL database to its current state).

Try to drop all the jos_TeraWURFL*** tables in database and reinstall MJ.
dididounet
13 years, 5 months ago
Already tried it actually...
No it seems it is Jumi that creates an issue...adding &Itemid=1 works in some cases but not all
here is the exact description of the fatal error ;

Fatal error: Uncaught exception 'Exception' with message 'Error: ' in /home/soscles/public_html/plugins/mobile/terawurfl/DatabaseConnectors/TeraWurflDatabase_MySQL5.php:359 Stack trace: #0 /home/soscles/public_html/plugins/mobile/terawurfl/TeraWurfl.php(292): TeraWurflDatabase_MySQL5->getDeviceFromCache('TeraWurflSimple...') #1 /home/soscles/public_html/images/jumicode/geo-loc-key.php(: TeraWurfl->getDeviceCapabilitiesFromAgent() #2 /home/soscles/public_html/plugins/content/jumi.php(75): include('/home/soscles/p...') #3 /home/soscles/public_html/libraries/joomla/event/event.php(67): plgContentJumi->onPrepareContent(Object(stdClass), Object(JParameter), 0) #4 /home/soscles/public_html/libraries/joomla/event/dispatcher.php(170): JEvent->update(Array, Array) #5 /home/soscles/public_html/components/com_content/views/article/view.html.php(102): JDispatcher->trigger(Array) #6 /home/soscles/public_html/libraries/joomla/cache/handler/view.php(98): ContentViewArticle->display('onPrepareConten...', Array) #7 /home/soscles/public_ in /home/soscles/public_html/plugins/mobile/terawurfl/DatabaseConnectors/TeraWurflDatabase_MySQL5.php on line 359

and the faulty code is in a php file called from jumi :

$db =& JFactory::getDBO();
require_once './plugins/mobile/terawurfl/TeraWurfl.php';
$wurflObj = new TeraWurfl();
$wurflObj->getDeviceCapabilitiesFromAgent();
$width = $wurflObj->getDeviceCapability("resolution_width");

any idea ??
dryabov
13 years, 5 months ago
dididounet wrote:
$db =& JFactory::getDBO();
require_once './plugins/mobile/terawurfl/TeraWurfl.php';
$wurflObj = new TeraWurfl();
$wurflObj->getDeviceCapabilitiesFromAgent();
$width = $wurflObj->getDeviceCapability("resolution_width");


Where do you have above code?
dididounet
13 years, 5 months ago
not sure I got your question right but:

The code is within a blahblah.php file.
the php file is called by jumi from within an article {jumi [images/jumicode/blahblah.php]}
the article is called from an alias
and I call the alias from an iphone or smartphone

otherwise the complete relevant code is like this :

<?phpdefined('_JEXEC') OR die("Restricted access");$lang =& JFactory::getLanguage();$lng=substr($lang->getName(),0,2);$db =& JFactory::getDBO();require_once './plugins/mobile/terawurfl/TeraWurfl.php';$wurflObj = new TeraWurfl();$wurflObj->getDeviceCapabilitiesFromAgent();$width = $wurflObj->getDeviceCapability("resolution_width");
etc...
?>

I actually use the $width variable to adapt some tables width and other elements
1

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.