Has anyone had success with MySQLi in Godaddy?
If so, are any additional steps required so that it will work?
MySQL, on the otherhand, seems to work with no problems.
define('DBHOST', 'localhost');
define('DBUSER', 'username');
define('DBPASS', 'pass');
define('DBNAME', 'databasename');
$conn = mysqli_connect(DBHOST,DBUSER,DBPASS,DBNAME);
SOLUTION
The default php version did not include mysqli
You have to go into settings and upgrade the php to the lastest version. This version will include mysqli and allow you to use it.
Related
I am setting up a moodle plugin for enrolment from an external database based on instruction in https://docs.moodle.org/39/en/External_database_enrolment. I was successful in setting up a similar plugin for authentication from an external database. But I am having a problem with a plugin for enrolment from the external database. When I test the plugin settings it is successful as shown below https://i.stack.imgur.com/fdrqG.png
But When I run php sync.php I got
Error: Database connection failed
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php
My moodle version is 3.9.1 and I am using Mac OS.
Thank you in advance.
First, turn on debug, to get errors.
Finally found that the problem was, the plugin do not work with PHP7.4 (while Moodle do).
Fixed by downgrading PHP to 7.2
I am using the first-time laravel, and want to use the laravel Auth for login and registration, MongoDB as backend. Using this command enables the laravel Auth
php artisan make:auth
will it work ? can anyone help me, how to do it..
php artisan make:auth
will just generate views since Laravel already comes with an Authentication feature so you don't have to build on scratch.
Now it is possible to have MongoDB as backend but it requires you to install a wrapper in order for Laravel to connect to your database.
I recommend using this one.
It requires PHP MongoDB extension to be installed in order for the package to fully work.
I'm using Moodle 3.2.
Created website in XAMPP server with database type is mariaDB.
Trying to move website in to WAMP server.
Created database in phpmyadmin and imported database.
Placed website folder in WAMP/www/site_folder.
changed configuration in config.php file.
While running the site, getting the following error.
Error writing to database
Try to run a plain moodle install before, to see if your DB configuration is working fine.
I think for MariaDB you need to set some (not standard) settings for moodle 3.2
You seems to have switched from mysql to mariaDB, Please make sure that you have set the dbtype driver right in config.php file.
$CFG->dbtype = 'mariadb';
See for reference https://docs.moodle.org/32/en/MariaDB
I installed Yii2 advanced application on my local server and it works fine, without configured .htaccess. But on the server it doesn't work, even with /frontend/web/index.php url.
Check out the php version of your hosted server, It Require PHP 5.5 version.
Thank you...
Our organization builds web applications using PHP/Informix.
Currently we do not have any frameworks and use our own libraries and modules.
Now we set up a new apache web server so that we could install and configure a framework where all brand new web applications can be developed.
I was thinking of setting up the Zend Framework.(Will it go with informix backend?). I have googled and looked around for information , but I thought would get some expert opinions from the experts here.
I need some advice as how to go about from scratch the correct way.
Installing,configuring,setting up a version control and writing a script to test all basic MVC features.
Any suggestions and references would be helpful.
If you are using Informix Dynamic Server as your backend, then yes you can use Zend Framework's native database classes and adapter for communicating with your Informix server.
Your requirements will be that PHP must be compiled with PDO support (enabled by default since PHP 5.1). You then need to download, compile, and install the PDO_IBM Pecl package.
In order to successfully build the PDO_IBM extension, you must have the DB2 client (9.1+) installed on your system already. When you compile the extension module, you must tell it the path to where those files are installed.
More information on PDO_IBM, and Zend_Db_Adapter talks a little bit about the available adapters (including PDO_IBM).
There is also a Pecl package PDO_INFORMIX for talking to Informix servers, but Zend_Db does not support this package. You will only be able to use Zend_Db_Adapter with PDO_IBM to communicate with IDS servers.
Hope that helps.