• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

php-fpm + nginx + mysql + CakePHP issues

Ltd. Commander Data

New Member

Thanks: 1
Messages: 5

#1
I try to use CakePHP on my (non public) FreeBSD development server (10.3 RELEASE).
It runs nginx 1.12.1, php 5.6.31 and mySQL Server 5.6.37.
phpinfo() says, that the mysql support is enabled and a simple phpBB3 forum runs like charm, nevertheless I get this error message when I try to open a sample CakePHP project:

"Database driver Cake\Database\Driver\Mysql cannot be used due to a missing PHP extension or unmet dependency"

There are no errors in nginx/error.log.

The CakePHP error.log:

Code:
2017-11-10 11:52:42 Error: [Cake\Database\Exception\MissingExtensionException] Database driver Cake\Database\Driver\Mysql cannot be used due to a missing PHP extension or unmet dependency in /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Database/Connection.php on line 176
Exception Attributes: array (
  'driver' => 'Cake\\Database\\Driver\\Mysql',
)
Stack Trace:
#0 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Database/Connection.php(117): Cake\Database\Connection->setDriver('Cake\\Database\\D...', Arra
y)
#1 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Datasource/ConnectionRegistry.php(89): Cake\Database\Connection->__construct(Array)
#2 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php(96): Cake\Datasource\ConnectionRegistry->_create('Cake\\Database\\C...
', 'default', Array)
#3 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Datasource/ConnectionManager.php(205): Cake\Core\ObjectRegistry->load('default', Array)
#4 /usr/local/www/my_app_name/vendor/cakephp/debug_kit/src/Panel/SqlLogPanel.php(50): Cake\Datasource\ConnectionManager::get('default')
#5 /usr/local/www/my_app_name/vendor/cakephp/debug_kit/src/ToolbarService.php(151): DebugKit\Panel\SqlLogPanel->initialize()
#6 /usr/local/www/my_app_name/vendor/cakephp/debug_kit/src/Middleware/DebugKitMiddleware.php(51): DebugKit\ToolbarService->initializePanels()
#7 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Http/Runner.php(65): DebugKit\Middleware\DebugKitMiddleware->__invoke(Object(Cake\Http\ServerR
equest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#8 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Http/Runner.php(51): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\H
ttp\Response))
#9 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Http/Server.php(81): Cake\Http\Runner->run(Object(Cake\Http\MiddlewareQueue), Object(Cake\Http
\ServerRequest), Object(Cake\Http\Response))
#10 /usr/local/www/my_app_name/webroot/index.php(40): Cake\Http\Server->run()
#11 /usr/local/www/my_app_name/index.php(16): require('/usr/local/www/...')
#12 {main}
 

azathoth

Well-Known Member

Thanks: 13
Messages: 373

#2
I try to use CakePHP on my (non public) FreeBSD development server (10.3 RELEASE).
It runs nginx 1.12.1, php 5.6.31 and mySQL Server 5.6.37.
phpinfo() says, that the mysql support is enabled and a simple phpBB3 forum runs like charm, nevertheless I get this error message when I try to open a sample CakePHP project:

"Database driver Cake\Database\Driver\Mysql cannot be used due to a missing PHP extension or unmet dependency"

There are no errors in nginx/error.log.

The CakePHP error.log:

Code:
2017-11-10 11:52:42 Error: [Cake\Database\Exception\MissingExtensionException] Database driver Cake\Database\Driver\Mysql cannot be used due to a missing PHP extension or unmet dependency in /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Database/Connection.php on line 176
Exception Attributes: array (
  'driver' => 'Cake\\Database\\Driver\\Mysql',
)
Stack Trace:
#0 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Database/Connection.php(117): Cake\Database\Connection->setDriver('Cake\\Database\\D...', Arra
y)
#1 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Datasource/ConnectionRegistry.php(89): Cake\Database\Connection->__construct(Array)
#2 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php(96): Cake\Datasource\ConnectionRegistry->_create('Cake\\Database\\C...
', 'default', Array)
#3 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Datasource/ConnectionManager.php(205): Cake\Core\ObjectRegistry->load('default', Array)
#4 /usr/local/www/my_app_name/vendor/cakephp/debug_kit/src/Panel/SqlLogPanel.php(50): Cake\Datasource\ConnectionManager::get('default')
#5 /usr/local/www/my_app_name/vendor/cakephp/debug_kit/src/ToolbarService.php(151): DebugKit\Panel\SqlLogPanel->initialize()
#6 /usr/local/www/my_app_name/vendor/cakephp/debug_kit/src/Middleware/DebugKitMiddleware.php(51): DebugKit\ToolbarService->initializePanels()
#7 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Http/Runner.php(65): DebugKit\Middleware\DebugKitMiddleware->__invoke(Object(Cake\Http\ServerR
equest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#8 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Http/Runner.php(51): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\H
ttp\Response))
#9 /usr/local/www/my_app_name/vendor/cakephp/cakephp/src/Http/Server.php(81): Cake\Http\Runner->run(Object(Cake\Http\MiddlewareQueue), Object(Cake\Http
\ServerRequest), Object(Cake\Http\Response))
#10 /usr/local/www/my_app_name/webroot/index.php(40): Cake\Http\Server->run()
#11 /usr/local/www/my_app_name/index.php(16): require('/usr/local/www/...')
#12 {main}

11.1 is out

https://book.cakephp.org/3.0/en/installation.html

I would carefully setup g-wan with php 7 and go from there.
Postgresql 10 backend right?