LavaLite / cms

Multilingual PHP CMS built with Laravel and bootstrap
https://lavalite.org
2.82k stars 960 forks source link

mysqli_connect() not found??? #218

Open MB34 opened 6 years ago

MB34 commented 6 years ago

While running php artisan lavalite:install, I get this error:

In ConfigureDatabase.php line 117:
  Call to undefined function Litepie\Install\Installers\Scripts\mysqli_connect()

Tried it using PHP 5.5.12 and PHP 7.0, both with mysqli installed.

Any ideas?

Also, had to hand code the DB values in ConfigureDatabase.php because it would not accept what I entered. But then again, it might have been the issue above causing it to fail, too.

Renfos commented 6 years ago

Please check phpinfo() output to know whether mysqli installed.

MB34 commented 6 years ago

Duh...don't you think that would have been the first place I would have looked? Yes, it is installed and enabled.

MB34 commented 6 years ago

I have 3 different versions of PHP installed in my WAMP setup. Ver 5.5.12 has mysqli installed and enabled. Ver 7.0 does NOT have mysqli enabled, although the php_mysqli.dll is in it's bin dir. Ver 7.1.5 has mysqli installed and enabled.

If I create a script using mysqli to load records from the DB, I can run the script successfully when I have PHP 5.5.12 loaded and when I have PHP 7.1.5 loaded, but I cannot retrieve records when PHP 7.0 is loaded.

Now, the question is... Why would the laravel installer not be able to find it? Is there any way to find out what is autoloading during the install?

MB34 commented 6 years ago

I was finally able to get it installed by removing the ConfigureDatabase script. However, I am now getting an error when attempting to login: "The page has expired due to inactivity."

Renfos commented 6 years ago

This stackoverflow link might help you.

https://stackoverflow.com/questions/46141705/the-page-has-expired-due-to-inactivity-laravel-5-5

padarom commented 6 years ago

To add to this: The documentation states PDO as a requirement and doesn't mention MySQLi. The install script shouldn't even try to use MySQLi then and just use PDO.