CodeIgniter Forums
Database Error - only on app controller (not html) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Database Error - only on app controller (not html) (/showthread.php?tid=72659)



Database Error - only on app controller (not html) - OnceAgain - 01-19-2019

https://myfreeconnection.com/admin/

That's the admin controller for the site. If you remove the /admin, the site html displays and functions perfectly. The ability to get into the admin space and add users etc. is broken.

Quickly:  the site is replicatable so in the admin panel we add new username and email address, and the site duplicates itself under than user's folder and the webform delivers to that user's email. That's the jist of the site.

I received a call this morning that the admin folder is broken (see errors on the page). I've got the correct hostname, username, DB credentials – nothing has changed in years – everything connects. The /admin/ site shows something different.  I don't know what to do now.

CI version 3.0.6
PHP 5.6

I will absolutely pay someone to fix this because I didn't build it, and now I can't seem to fix it. I'm good in CMS and CSS, so this is admittedly a bit above my pay grade.

Thanks for any and all help!

Blake


RE: Database Error - only on app controller (not html) - Paradinight - 01-20-2019

(01-19-2019, 03:04 PM)OnceAgain Wrote: https://myfreeconnection.com/admin/

That's the admin controller for the site. If you remove the /admin, the site html displays and functions perfectly. The ability to get into the admin space and add users etc. is broken.

Quickly:  the site is replicatable so in the admin panel we add new username and email address, and the site duplicates itself under than user's folder and the webform delivers to that user's email. That's the jist of the site.

I received a call this morning that the admin folder is broken (see errors on the page). I've got the correct hostname, username, DB credentials – nothing has changed in years – everything connects. The /admin/ site shows something different.  I don't know what to do now.

CI version 3.0.6
PHP 5.6

I will absolutely pay someone to fix this because I didn't build it, and now I can't seem to fix it. I'm good in CMS and CSS, so this is admittedly a bit above my pay grade.

Thanks for any and all help!

Blake

Quote:mysqli::real_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known

hostname does not exist or host is unreachable.

Change the host to 127.0.0.1 or localhost without a protocol.


PHP Code:
$db['default'] = array(
    
'dsn'    => '',
    
'hostname' => 'localhost',
    
'username' => 'maxmustermann',
    
'password' => 'maxmustermannpasswort',
    
'database' => 'maxlittleworld',
    
'dbdriver' => 'mysqli',
    
'dbprefix' => '',
    
'pconnect' => FALSE,
    
'db_debug' => (ENVIRONMENT !== 'production'),
    
'cache_on' => FALSE,
    
'cachedir' => '',
    
'char_set' => 'utf8',
    
'dbcollat' => 'utf8_general_ci',
    
'swap_pre' => '',
    
'encrypt' => FALSE,
    
'compress' => FALSE,
    
'stricton' => FALSE,
    
'failover' => array(),
    
'save_queries' => TRUE
); 



RE: Database Error - only on app controller (not html) - OnceAgain - 01-20-2019

Unfortunately, that does not apply with this host (Dreamhost).

They use true hostnames rather than localhost. I've tried that already.