CodeIgniter Forums
DbForge Issue - 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: DbForge Issue (/showthread.php?tid=61894)



DbForge Issue - T3utonicT3rror - 05-28-2015

Hey guys,

Got a problem here with dbforge, I have built a installer for my software, in a localhost environment the installer works perfectly. However the issue arrises installing on my webhost. Its a cpanel based host and for this a database must be created with permissions.

How can i go about granting permissions for the user to install my script ?

Here is the offending line of code :-

PHP Code:
if ($this->dbforge->create_database($database_name))
        {
            
$find    "'database' =>";
            
$replace "\t" "'database' => '" $database_name "'," "\n";

            if (
$this->edit_database_config($find$replace) === true)
            {
                return 
TRUE;
            }
        } 

Here is just get the Access Denied error message.

Any help on this one guys ?

Thanks
Chris


RE: DbForge Issue - Diederik - 05-28-2015

Your host probably runs the webserver as a different user then your ftp user. Try to change the user rights of the config file so everybody van write the file (chmod 777 or 666). It is considered bad practis through... Your host should run your webserver under your ftp username with mod_ruid or Some alternative.


RE: DbForge Issue - T3utonicT3rror - 05-29-2015

Its a permissions problem, I normally have to use Cpanel to create the database, then add permissions for the user to the database before I can connect to it.