My Arduino Home Automation System - AHACB v2.2 - Creating a Server - Part 1

Views 514
Sweets 4
Images 2

1 year ago Topic
DaVaR
Administrator
Total Posts: 30
Joined: August 27, 2017
Posted: March 03, 2018 @ 06:32 AM
This video shows how the My Arduino Home Automation web server and web site are installed and setup.
Signature
Send me a PM if your interested in purchasing any of the PCBs I've created.
Reply By: mohsen
5 months ago #1
mohsen
New Member
Total Posts: 2
Joined: January 18, 2019
Posted: January 19, 2019 @ 04:10 AM
hi i create xampp localhost with your tutorial but i cant access to mahsettings error 404 Oops! Looks like something went wrong! The Requested URL Does Not Exist! Please check your spelling and try again.
Reply By: DaVaR
4 months ago #2
DaVaR
Administrator
Total Posts: 30
Joined: August 27, 2017
Posted: January 23, 2019 @ 09:16 AM
Please post the info from your /errors/php-error.log Might be something missing from database.
Signature
Send me a PM if your interested in purchasing any of the PCBs I've created.
Reply By: DaVaR
4 months ago #3
DaVaR
Administrator
Total Posts: 30
Joined: August 27, 2017
Posted: January 23, 2019 @ 05:24 PM
Your system routes might not be setup properly. Go to the Admin Panel then click on System Routes. The auto router should detect all the MAH pages that are included with this setup. See photo below for the routes that I have on my site.
Signature
Send me a PM if your interested in purchasing any of the PCBs I've created.
Image Attachments
Reply By: DaVaR
4 months ago #4
DaVaR
Administrator
Total Posts: 30
Joined: August 27, 2017
Posted: January 23, 2019 @ 05:29 PM
This photo should be easier to read.
Signature
Send me a PM if your interested in purchasing any of the PCBs I've created.
Image Attachments
Reply By: mohsen
4 months ago #5
mohsen
New Member
Total Posts: 2
Joined: January 18, 2019
Posted: January 24, 2019 @ 03:11 AM
Exception information: Date: Jun 30, 2018 9:04AM Message: SQLSTATE[08S01]: Communication link failure: 1053 Server shutdown in progress Code: 08S01 File: /var/www/websites/shc.myarduinohome.com/app/System/Libraries/Database.php Line: 93 Stack trace: #0 /var/www/websites/shc.myarduinohome.com/app/System/Libraries/Database.php(93): PDOStatement->execute() #1 /var/www/websites/shc.myarduinohome.com/app/Models/AdminPanel.php(27): Libs\Database->select('\n SE...', Array) #2 /var/www/websites/shc.myarduinohome.com/app/System/LoadSiteSettings.php(107): App\Models\AdminPanel->getSettings('site_theme') #3 /var/www/websites/shc.myarduinohome.com/localsite/database.php(41): App\System\LoadSiteSettings->__construct() #4 /var/www/websites/shc.myarduinohome.com/localsite/temps.php(14): require_once('/var/www/websit...') #5 {main} --------- Exception information: Date: Jun 30, 2018 9:04AM Message: SQLSTATE[08S01]: Communication link failure: 1053 Server shutdown in progress Code: 08S01 File: /var/www/websites/shc.myarduinohome.com/app/System/Libraries/Database.php Line: 93 Stack trace: #0 /var/www/websites/shc.myarduinohome.com/app/System/Libraries/Database.php(93): PDOStatement->execute() #1 /var/www/websites/shc.myarduinohome.com/app/Models/AdminPanel.php(27): Libs\Database->select('\n SE...', Array) #2 /var/www/websites/shc.myarduinohome.com/app/System/LoadSiteSettings.php(46): App\Models\AdminPanel->getSettings('site_email_user...') #3 /var/www/websites/shc.myarduinohome.com/localsite/database.php(41): App\System\LoadSiteSettings->__construct() #4 /var/www/websites/shc.myarduinohome.com/localsite/lightswitch.php(14): require_once('/var/www/websit...') #5 {main} --------- 2019-01-24 2:55AM - count(): Parameter must be an array or an object that implements Countable in C:\xampp\www\app\Controllers\AdminPanel.php on line 773 2019-01-24 2:56AM - count(): Parameter must be an array or an object that implements Countable in C:\xampp\www\app\Controllers\AdminPanel.php on line 773 2019-01-24 2:58AM - get_headers(https://www.userapplepie.com/uapversion.php?getversion=UAP): failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\xampp\www\app\Controllers\AdminPanel.php on line 68 2019-01-24 3:00AM - get_headers(https://www.userapplepie.com/uapversion.php?getversion=UAP): failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\xampp\www\app\Controllers\AdminPanel.php on line 68 2019-01-24 3:02AM - count(): Parameter must be an array or an object that implements Countable in C:\xampp\www\app\Controllers\AdminPanel.php on line 773 2019-01-24 3:05AM - count(): Parameter must be an array or an object that implements Countable in C:\xampp\www\app\Controllers\AdminPanel.php on line 773
Reply By: DaVaR
4 months ago #6
DaVaR
Administrator
Total Posts: 30
Joined: August 27, 2017
Posted: January 24, 2019 @ 04:43 AM
Code
2019-01-24 3:05AM - count(): Parameter must be an array or an object that implements Countable in C:\xampp\www\app\Controllers\AdminPanel.php on line 773
Open file C:\xampp\www\app\Controllers\AdminPanel.php and scroll down to line 773. You will see the following function:
Code
        function checkCoreRoutes($class, $method){
            $auto_cm = array("controller" => $class,"method" => $method);
            /** Get Core Routes **/
            $core_routes = Routes::all();
            foreach ($core_routes as $cr) {
                if($class == $cr['controller'] && $method == $cr['method']){
                    $match[] = true;
                }
            }
            $match_count = count($match);
            if($match_count > 0){
                return false;
            }else{
                return true;
            }
        }
Change it to the following:
Code
        function checkCoreRoutes($class, $method){
            $auto_cm = array("controller" => $class,"method" => $method);

            /** Get Core Routes **/
            $core_routes = Routes::all();
            foreach ($core_routes as $cr) {
                if($class == $cr['controller'] && $method == $cr['method']){
                    $match[] = true;
                }
            }
            if(isset($match)){
                return false;
            }else{
                return true;
            }
        }
I will release a fix in the next update. UAP has been upgraded from 4.2.0 to 4.2.1 recently and I have not had a chance to update MAH just yet.
Signature
Send me a PM if your interested in purchasing any of the PCBs I've created.
Forum Permissions
You cannot post in this forum.
You cannot moderate this forum.
You cannot administrate this forum.
Search Forums
Forum Recent Posts