Install impresspages to localhost - problems with db connection - php

When i try to install impresspages on localhost in Database installation i see this:
Can't connect to database.
I try to solve this problem by installing it on hosting(its install with no problems) and then transfer it to localhost with all database, and i edit config file. And when i go to home page i saw this:
Fatal error: Uncaught exception 'Ip\Exception\Db' in C:\www\Apache2\htdocs\ip\Ip\ServiceLocator.php:258 Stack trace: #0 C:\www\Apache2\htdocs\ip\Ip\Db.php(28): Ip\Db->getConnection() #1 C:\www\Apache2\htdocs\ip\Ip\ServiceLocator.php(258): Ip\Db->__construct() #2 C:\www\Apache2\htdocs\ip\Ip\ServiceLocator.php(226): Ip\ServiceLocator::loadService('db') #3 C:\www\Apache2\htdocs\ip\Ip\Functions.php(379): Ip\ServiceLocator::db() #4 C:\www\Apache2\htdocs\ip\Ip\Internal\Plugins\Model.php(316): ipDb() #5 C:\www\Apache2\htdocs\ip\Ip\Internal\Plugins\Service.php(9): Ip\Internal\Plugins\Model::getActivePluginNames() #6 C:\www\Apache2\htdocs\ip\Ip\Dispatcher.php(140): Ip\Internal\Plugins\Service::getActivePluginNames() #7 C:\www\Apache2\htdocs\ip\Ip\Application.php(153): Ip\Dispatcher->_bindApplicationEvents() #8 C:\www\Apache2\htdocs\ip\Ip\Application.php(319): Ip\Application->_handleOnlyRequest(Object(Ip\Request), Array, false) #9 C:\www\Apache2\htdocs\ip\Ip\Application.php(413): Ip\Application->handleRequest(Object(Ip\Request), Ar in C:\www\Apache2\htdocs\ip\Ip\ServiceLocator.php on line 258

Looks like the MySQL extension for PHP is not installed or enabled. See http://php.net/manual/en/mysql.installation.php for more information.

Related

Deploy error with Laravel project on Shared Hosting (Uncaught RuntimeException: A facade root has not been set)

I'm deploying a laravel project into production enviroment on a shared host using FTP following this tutorial except the creation of the symbolic link beacuse I'm not using the local storage but ran into "Uncaught RuntimeException: A facade root has not been set" error.
Aditional info:
I tried with a new laravel project with the command composer create-project laravel/laravel project_name 9 and deployed without run it in my computer and got the same error, then I tested it on my computer and worked fine.
The host was configured to follow these route: /web/content, where is displayed the public files. I followed the tutorial routing and created a folder with project's name with all files except the public folder contents as showed in the tutorial but I got the error, so I thought that the structure was giving me the error so I rename the laravel public folder to content and now all files are inside in /web and still getting the error.
Server info: Linux/Apache/PHP-8
Development enviroment: Windows 10/XAMPP/PHP-8.1
For development testing I use php artisan serve rather than XAMPP
I've deployed the project in my personal Heroku and all is working fine, as an additional test, I've deployed the project via XAMPP on my computer following the same structure in the point 2 and works fine.
Checking the logs I got this:
Server Logs
[17-Jul-2022 18:40:36 America/Chicago] PHP Fatal error: Uncaught RuntimeException: A facade root has not been set. in /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:334
Stack trace:
#0 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/RegisterErrorViewPaths.php(18): Illuminate\Support\Facades\Facade::__callStatic('replaceNamespac...', Array)
#1 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(626): Illuminate\Foundation\Exceptions\RegisterErrorViewPaths->__invoke()
#2 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(607): Illuminate\Foundation\Exceptions\Handler->registerErrorViewPaths()
#3 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(538): Illuminate\Foundation\Exceptions\Handler->renderHttpException(Object(Symfony\Component\HttpKernel\Exception\HttpException))
#4 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(444): Illuminate\Foundation\Exceptions\Handler->prepareResponse(Object(Illuminate\Http\Request), Object(Symfony\Component\HttpKernel\Exception\HttpException))
#5 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(363): Illuminate\Foundation\Exceptions\Handler->renderExceptionResponse(Object(Illuminate\Http\Request), Object(ParseError))
#6 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(427): Illuminate\Foundation\Exceptions\Handler->render(Object(Illuminate\Http\Request), Object(ParseError))
#7 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(115): Illuminate\Foundation\Http\Kernel->renderException(Object(Illuminate\Http\Request), Object(ParseError))
#8 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/content/index.php(51): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#9 {main}
thrown in /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 334
Laravel Logs
[2022-07-17 18:40:36] laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [] is not defined. at /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:207)
[stacktrace]
#0 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(132): Illuminate\\Log\\LogManager->resolve(NULL, NULL)
#1 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(119): Illuminate\\Log\\LogManager->get(NULL)
#2 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(636): Illuminate\\Log\\LogManager->driver()
#3 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(275): Illuminate\\Log\\LogManager->error('syntax error, u...', Array)
#4 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(415): Illuminate\\Foundation\\Exceptions\\Handler->report(Object(ParseError))
#5 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(113): Illuminate\\Foundation\\Http\\Kernel->reportException(Object(ParseError))
#6 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/content/index.php(51): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#7 {main}
"}
[2022-07-17 18:40:36] laravel.ERROR: syntax error, unexpected token ")" {"exception":"[object] (ParseError(code: 0): syntax error, unexpected token \")\" at /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/symfony/finder/Finder.php:588)
[stacktrace]
#0 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/composer/ClassLoader.php(428): Composer\\Autoload\\includeFile('/mnt/stor2-wc1-...')
#1 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php(88): Composer\\Autoload\\ClassLoader->loadClass('Symfony\\\\Compone...')
#2 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php(65): Illuminate\\Foundation\\Bootstrap\\LoadConfiguration->getConfigurationFiles(Object(Illuminate\\Foundation\\Application))
#3 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php(39): Illuminate\\Foundation\\Bootstrap\\LoadConfiguration->loadConfigurationFiles(Object(Illuminate\\Foundation\\Application), Object(Illuminate\\Config\\Repository))
#4 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(239): Illuminate\\Foundation\\Bootstrap\\LoadConfiguration->bootstrap(Object(Illuminate\\Foundation\\Application))
#5 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(153): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#6 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(137): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#7 /mnt/stor2-wc1-dfw1/406060/2039643domain/web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#8 /mnt/stor2-wc1-dfw1/406060/2039643/domain/web/content/index.php(51): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#9 {main}
"}
UPDATE
By curiosity, tried with Laravel 8 and all work fine, but with Laravel 9 don't and by project's requirements, I'm not allowed to downgrade the Laravel version.
Well I couldn't manage to solve the problem on Laravel 9, so the solution was to downgrade to Laravel 8, maybe the problem is the configuration on the host server.

Class Wikibase\DataModel\Entity\ItemId not found WikiBase installation

I am currently trying to follow this tutorial: https://www.mediawiki.org/wiki/Wikibase/Installation
I have the latest version of both MediaWiki and WikiBase (1.35) I'm currently trying to run the maintenance scripts.
I have installed both Wikibase Repository and Wikibase Client.
When I try to run "php maintenance/update.php" it gives me this error:
Error from line 47 of /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/lib/WikibaseLib.entitytypes.php: Class "Wikibase\DataModel\Entity\ItemId" not found
#0 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/repo/includes/WikibaseRepo.php(695): require()
#1 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/repo/includes/WikibaseRepo.php(410): Wikibase\Repo\WikibaseRepo::getDefaultEntityTypes()
#2 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/repo/includes/WikibaseRepo.php(460): Wikibase\Repo\WikibaseRepo::newInstance()
#3 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/repo/includes/RepoHooks.php(115): Wikibase\Repo\WikibaseRepo::getDefaultInstance()
#4 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/HookContainer/HookContainer.php(321): Wikibase\Repo\RepoHooks::onSetupAfterCache()
#5 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/HookContainer/HookContainer.php(132): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#6 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/HookContainer/HookRunner.php(3417): MediaWiki\HookContainer\HookContainer->run(string, array)
#7 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/Setup.php(694): MediaWiki\HookContainer\HookRunner->onSetupAfterCache()
#8 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/WebStart.php(89): require_once(string)
#9 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/index.php(44): require(string)
#10 {main}
How can I fix this? I've tried updating Composer and reinstalling it numerous times. If anyone can help, that would be great! :)
I hit the same error, and in my case, it was because my compose.local.json, (copied from composer.local.json-sample,) was pointing to "extensions/example/composer.json" rather than "extensions/Wikibase/composer.json". Fixing this to Wikibase, deleting composer.lock, running composer install --no-dev again, and finally running update.php fixed the issue.

When I opened the project,I get back this error message

When I opened the project,I get back this error message :
Fatal error: Uncaught Error: Class 'String' not found in /dev/local/lib/Cake/Utility/Debugger.php:339 Stack trace: #0 /dev/local/lib/Cake/Utility/Debugger.php(741): Debugger::trace(Array) #1 /dev/local/lib/Cake/Error/ErrorHandler.php(219): Debugger->outputError(Array) #2 /dev/local/lib/Cake/Core/App.php(565): ErrorHandler::handleError(2, 'Declaration of ...', '/dev/local...', 25, Array) #3 /dev/local/lib/Cake/Core/App.php(565): include() #4 [internal function]: App::load('TradeLog') #5 [internal function]: spl_autoload_call('TradeLog') #6 /dev/local/lib/Cake/Utility/ClassRegistry.php(145): class_exists('TradeLog') #7 /dev/local/app/Controller/Component/UserComponent.php(61): ClassRegistry::init('TradeLog') #8 /dev/local/app/Controller/Component/PlatformAgentComponent.php(24): UserComponent->__construct(Object(ComponentCollection), Array) #9 /Us in /dev/local/lib/Cake/Utility/Debugger.php on line 339
The newly configured environment in mac os.
When I paste the project into a folder, this error occurs. What's the matter?
This is a compatibility issue between Cakephp 2.4 and PHP7 (because string became reserved word in PHP7, so Cakephp cannot use it as a class name). Using of newer version of Cakephp is suggested. Also downgrading your PHP to 5.6 could solve the problem.
You need to upgrade to CakePHP > 2.8 which is compatible with PHP7
https://github.com/cakephp/cakephp/releases/2.8.0

Installation and using elasticsearch php client on Windows Xampp

I'm downloaded the elasticsearch-5.1.1.zip from the https://www.elastic.co/downloads/elasticsearch
Then download the Elastica A PHP client for elasticsearch via composer with this command
composer require ruflin/elastica:dev-master
Now i want to open and make a test. When i run this command
bin\elasticsearch.bat
i get this error: The syntax of the command is incorrect.
On the other side if i try to use Elastica A PHP client i get some errors like this:
Fatal error: Uncaught Elastica\Exception\Connection\HttpException:
Couldn't connect to host, Elasticsearch down? in
E:\xampp\htdocs\el\vendor\ruflin\elastica\lib\Elastica\Transport\Http.php:180
Stack trace: #0
E:\xampp\htdocs\el\vendor\ruflin\elastica\lib\Elastica\Request.php(171):
Elastica\Transport\Http->exec(Object(Elastica\Request), Array) #1
E:\xampp\htdocs\el\vendor\ruflin\elastica\lib\Elastica\Client.php(662):
Elastica\Request->send() #2
E:\xampp\htdocs\el\vendor\ruflin\elastica\lib\Elastica\Client.php(673):
Elastica\Client->request('twitter/', 'DELETE', Array, Array) #3
E:\xampp\htdocs\el\vendor\ruflin\elastica\lib\Elastica\Index.php(531):
Elastica\Client->request('twitter/', 'DELETE', Array, Array) #4
E:\xampp\htdocs\el\vendor\ruflin\elastica\lib\Elastica\Index.php(165):
Elastica\Index->request('twitter/', 'DELETE') #5
E:\xampp\htdocs\el\vendor\ruflin\elastica\lib\Elastica\Index.php(258):
Elastica\Index->delete() #6 E:\xampp\htdocs\el\index.php(40):
Elastica\Index->create(Array, true) #7 {main} thrown in
E:\xampp\htdocs\el\vendor\ruflin\elastica\lib\Elastica\Transport\Http.php
on line 180
My question is How can i work with elasticsearch-5.1? Where am i do wrong?
Regards.
https://www.elastic.co/guide/en/elasticsearch/reference/master/windows.html#windows
At the note said, you're missing JDK8 or later

Unable to open file resource compress.zlib

Fresh new installed HHVM nginx enviroment running typo3 6.2.5, getting the following error in the extension manager:
Unable to open file resource compress.zlib:///var/www/hhvm/typo3temp/1.mirrors.xml.gz.
HHVM --version:
HipHop VM 3.3.0 (rel)
Compiler: tags/HHVM-3.3.0-0-g0a3cfb87b8a353fc7e1d15374f4adc413e37aba9
Repo schema: 9a391d9a03e15fccba1cde6d35c05b7cdd380238
Extension API: 20140829
HHVM error log entry:
Fatal error: Uncaught exception 'TYPO3\\CMS\\Extensionmanager\\Exception\\ExtensionManagerException'
with message 'Unable to open file resource compress.zlib:///var/www/hhvm/typo3temp/1.mirrors.xml.gz.'
in /var/www/hhvm/typo3/sysext/extensionmanager/Classes/Utility/Parser/MirrorXmlPullParser.php:59
Stack trace:
#0 /var/www/hhvm/typo3/sysext/extensionmanager/Classes/Utility/Importer/MirrorListUtility.php(70): TYPO3\\CMS\\Extensionmanager\\Utility\\Parser\\MirrorXmlPullParser->parseXml()
#1 /var/www/hhvm/typo3/sysext/extensionmanager/Classes/Utility/Repository/Helper.php(226): TYPO3\\CMS\\Extensionmanager\\Utility\\Importer\\MirrorListUtility->getMirrors()
#2 /var/www/hhvm/typo3/sysext/extensionmanager/Classes/Utility/Repository/Helper.php(165): TYPO3\\CMS\\Extensionmanager\\Utility\\Repository\\Helper->getMirrors()
#3 /var/www/hhvm/typo3/sysext/extensionmanager/Classes/Utility/Repository/Helper.php(106): TYPO3\\CMS\\Extensionmanager\\Utility\\Repository\\Helper->getRemoteExtListFile()
#4 /var/www/hhvm/typo3/sysext/extensionmanager/Classes/Controller/ListController.php(124): TYPO3\\CMS\\Extensionmanager\\Utility\\Repository\\Helper->fetchExtListFile()
#5 (): TYPO3\\CMS\\Extensionmanager\\Controller\\ListController->distributionsAction()
#6 /var/www/hhvm/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php(286): call_user_func_array()
#7 /var/www/hhvm/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php(157): TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController->callActionMethod()
#8 /var/www/hhvm/typo3/sysext/extbase/Classes/Mvc/Dispatcher.php(69): TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController->processRequest()
#9 /var/www/hhvm/typo3/sysext/extbase/Classes/Mvc/Web/BackendRequestHandler.php(33): TYPO3\\CMS\\Extbase\\Mvc\\Dispatcher->dispatch()
#10 /var/www/hhvm/typo3/sysext/extbase/Classes/Core/Bootstrap.php(195): TYPO3\\CMS\\Extbase\\Mvc\\Web\\BackendRequestHandler->handleRequest()
#11 /var/www/hhvm/typo3/sysext/extbase/Classes/Core/Bootstrap.php(184): TYPO3\\CMS\\Extbase\\Core\\Bootstrap->handleRequest()
#12 /var/www/hhvm/typo3/sysext/extbase/Classes/Core/ModuleRunner.php(67): TYPO3\\CMS\\Extbase\\Core\\Bootstrap->run()
#13 /var/www/hhvm/typo3/mod.php(38): TYPO3\\CMS\\Extbase\\Core\\ModuleRunner->callModule()
#14 {main}
Please add hhvm.libxml.ext_entity_whitelist =file,compress.zlib` to you ini file.
If this does not work, try to get a newer version of HHVM.

Categories