Fatal error: Cannot declare class Mobile_Detect

This public forum is for user-to-user discussions of PHP Report Maker. Note that this is not support forum.

Fatal error: Cannot declare class Mobile_Detect

Postby ananda » Fri Jan 20, 2017 2:09 am

Installed recently de PHP Maker 2017 and the Report Maker 10.0. Working on localhost. After creating a report, can't visualize it, only claims: "Fatal error: Cannot declare class Mobile_Detect, because the name is already in use in C:\xampp\htdocs\(own_name)\mobile_detect.php on line 28" ¿What´s wrong?
ananda
 
Posts: 2
Joined: Thu Jan 19, 2017 9:13 am

Re: Fatal error: Cannot declare class Mobile_Detect

Postby arbei » Fri Jan 20, 2017 1:56 pm

Cannot simulate your problem with my project in compatibility mode with PHPMaker.

Make sure you are downloaded and installed the latest version then try again.

Make sure you integrate the two projects correctly, follow the tutorial in the help file.
arbei
 
Posts: 1499
Joined: Wed Sep 09, 2015 10:13 am

Re: Fatal error: Cannot declare class Mobile_Detect

Postby ananda » Sun Jan 29, 2017 10:35 pm

Can't resolve the problem. What information should I send to make it possible to review and resolve the problem?
ananda
 
Posts: 2
Joined: Thu Jan 19, 2017 9:13 am

Re: Fatal error: Cannot declare class Mobile_Detect

Postby Niijimasama » Mon Jun 19, 2017 4:35 pm

I found a solution.

Experienced the same problem recently after uploading my application from wamp to the production server.

When you generate files, phpreportmaker also generates it's own mobile_detect.php into the config folder i.e "<App_root_dir>/phprptinc". I renamed this file to mobile_detect1.php.

I also set the database connection info in the file "<App_root_dir>/phprptinc/ewrcfg10.php" to allow the reports to connect to the database. This was an oversight in my case.

Reports now work on the mobile platform and the desktop platform.

Hope this helps you too.
Niijimasama
 
Posts: 9
Joined: Thu Aug 13, 2015 10:51 pm

Re: Fatal error: Cannot declare class Mobile_Detect

Postby davor » Tue Jul 04, 2017 6:02 am

Thanks a lot. I also had the same problem in the integrated project and once I renamed the file it works. I face some other difficulties with languages but this is another topic.
Davor
davor
 
Posts: 18
Joined: Wed Jun 04, 2014 5:19 am


Return to General Discussion (PHP Report Maker)