Problem changing PHP version

The API formerly known as Tera-WURFL
HenkvD
Posts: 7
Joined: Sat Nov 19, 2011 1:43 pm

Problem changing PHP version

Postby HenkvD » Thu Oct 02, 2014 2:28 pm

Hi,

I'm using Tera-WURFL 2.1.5 Administration, Loaded WURFL: for API 1.5.2 - Updated, db.scientiamobile.com - 2014-09-10 09:41:32.

In my webpages I use the script below to adress mobile visitors to a website especially for them.

The code looks like this:

<?php

require_once("wurfl/TeraWurfl.php");
$wurflObj = new TeraWurfl();
$wurflObj->getDeviceCapabilitiesFromAgent();
$isWireless = $wurflObj->getDeviceCapability("is_wireless_device");
$isTablet = $wurflObj->getDeviceCapability("is_tablet");

if($isWireless && !$isTablet)
header("location: http://www.m.klussenpunt.nl/index.html");

?>

I would like to use Drupal 8 for building a new website so I changed the PHP version from my host from version 5.3 to 5.6.

Tera Wurfl is working fine on PHP 5.3 but after the change when I load my webpage in a brower the page is completely white with no notification of any problem.

Anyone know why it is going wrong?

Elliotfehr

Re: Problem changing PHP version

Postby Elliotfehr » Thu Oct 02, 2014 2:55 pm

Hello,

Are you able to confirm whether or not you have error reporting enabled in your php.ini to help debug this issue further?

Thank you,

Elliot

HenkvD
Posts: 7
Joined: Sat Nov 19, 2011 1:43 pm

Re: Problem changing PHP version

Postby HenkvD » Fri Oct 03, 2014 1:12 am

Thanks for the reaction Elliot,

I think the thing I can do with PHP with my hosting provider are limited. I can switch from one version to another, and there is a page to switch (I think they are) modules on and off. Also I can alter PHP settings, and to answer your question error_reporting is set to E_ALL, display_errors is set ON.

Tried to find some error logs. There is a map .php but it's filed with empty files called php-mail.log.

Any idea what to do next?

HenkvD
Posts: 7
Joined: Sat Nov 19, 2011 1:43 pm

Re: Problem changing PHP version

Postby HenkvD » Fri Oct 03, 2014 1:46 am

Found some error text in the Apache error log section!

Backend fatal error: PHP Fatal error: Uncaught exception 'Exception' with message 'Error: ' in /public_html/wurfl/DatabaseConnectors/TeraWurflDatabase_MySQL5.php:358\nStack trace:\n#0
/public_html/wurfl/TeraWurfl.php(292): TeraWurflDatabase_MySQL5->getDeviceFromCache('TeraWurflSimple...')\n#1
/public_html/index.php(5): TeraWurfl->getDeviceCapabilitiesFromAgent()\n#2 {main}\n thrown in
/public_html/wurfl/DatabaseConnectors/TeraWurflDatabase_MySQL5.php on line 358\n

Elliotfehr

Re: Problem changing PHP version

Postby Elliotfehr » Fri Oct 03, 2014 10:51 am

Hello,

Are you able to reload the wurfl.xml and let me know if the issue persists? Are you also able to let me know which MySQL driver you are using?

Thank you,

Elliot

HenkvD
Posts: 7
Joined: Sat Nov 19, 2011 1:43 pm

Re: Problem changing PHP version

Postby HenkvD » Sat Oct 04, 2014 1:38 am

Hi Elliot,

thanks for your reply.

Loaded the last database wurfl.xml by using local file. No problems.

But after that no improvement in the issue loading my index.php page: blank again.

However I found that when using PHP 5.6 and trying to load the administration page from Tera-Wurfl I get the message that the page is not found.

Apache error:
Could not stat script filename (/public_html/wurfl/admin/install.php): errno 2
File does not exist: /public_html/wurfl/admin/images, referer: /wurfl/admin/install.php

When using PHP 5.3 everything is fine again.

This is what I found in phpmyadmin:

Databankserver

Server: Localhost via UNIX socket
Servertype: MariaDB
Serverversie: 5.5.34-MariaDB-cll-lve - MariaDB Server
Protocolversie: 10
Karakterset van server: UTF-8 Unicode (utf8)

Webserver

Apache
Client-versie van databank: libmysql - 5.5.34-MariaDB
PHP-uitbreiding: mysqli Documentatie

What is next? Putting the install.php file back again because it looks like tera wurfl is missing it?

HenkvD
Posts: 7
Joined: Sat Nov 19, 2011 1:43 pm

Re: Problem changing PHP version

Postby HenkvD » Sat Oct 04, 2014 3:07 am

Solved!

After replacing install.php i found that in PHP 5.6 mode tera wurfl could not connect to the database because of a password that was too weak.

After that I made a new database, loaded the wurfl.xml file and all is fine now.

Many thanks for helping me troubleshoot this problem.

Henk


Who is online

Users browsing this forum: No registered users and 3 guests