Whenever I try to access my app online I get the following error.
[the-domain] is currently unable to handle this request.
I'm currently lost and don't even know what the problem is I've replicated my local environment on my server and the problem still persists, probably something I'm missing.
Here is my current config.
Laravel 5.7
PHP 7.2.9
Heres the stack trace form laravel.log:
[2018-09-30 12:18:28] staging.ERROR: syntax error, unexpected '|', expecting variable (T_VARIABLE) {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\F$
[stacktrace]
#0 /var/www/avanzi/vendor/composer/ClassLoader.php(322): Composer\\Autoload\\includeFile('/var/www/invite...')
#1 [internal function]: Composer\\Autoload\\ClassLoader->loadClass('Illuminate\\\\Supp...')
#2 /var/www/avanzi/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(22): spl_autoload_call('Illuminate\\\\Supp...')
#3 /var/www/avanzi/vendor/composer/ClassLoader.php(444): include('/var/www/invite...')
#4 /var/www/avanzi/vendor/composer/ClassLoader.php(322): Composer\\Autoload\\includeFile('/var/www/invite...')
#5 [internal function]: Composer\\Autoload\\ClassLoader->loadClass('Illuminate\\\\Data...')
#6 /var/www/avanzi/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php(35): spl_autoload_call('Illuminate\\\\Data...')
#7 /var/www/avanzi/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(572): Illuminate\\Database\\DatabaseServiceProvider->register()
#8 /var/www/avanzi/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\\Foundation\\Application->register(Object(Illumin$
#9 /var/www/avanzi/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(548): Illuminate\\Foundation\\ProviderRepository->load(Array)
#10 /var/www/avanzi/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\\Foundation\\Application->registerConfi$
#11 /var/www/avanzi/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(206): Illuminate\\Foundation\\Bootstrap\\RegisterProviders->bootstrap(O$
#12 /var/www/avanzi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#13 /var/www/avanzi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(146): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#14 /var/www/avanzi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Ob$
#15 /var/www/avanzi/public/index.php(58): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#16 {main}
"}
NB: This works perfectly fine in my local environment with the same PHP and Laravel version.
So I finally got it figured out for my use case.
I had the right PHP version installed but haven't enabled the extensions required by Laravel yet, so to fix this I had to go to the php.ini file for my currently installed and active PHP version and enable those extensions, here is a list of the required PHP extensions for a Laravel 5.7 project.
PHP >= 7.1.3
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Ctype PHP Extension
JSON PHP Extension
With all these extensions installed your PHP configuration should be good to go.
Related
I have installed fresh magento 2.41 in windows with xamp. I have followed this tutorial to install.
After installation I am receiving this error An error has happened during application run. See exception log for details. while I am accessing either homepage or admin page.
I am accessing the magento site from this url http://mystore.magento.com/. If I access from localhost/magento241 it's showing 404 not found.
I tried to clear cache but it didn't worked.
Log Files are here :
1 exception(s):
Exception #0 (Exception): Warning: Use of undefined constant SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES - assumed 'SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\magento241\vendor\magento\framework\Encryption\Adapter\SodiumChachaIetf.php on line 40
Exception #0 (Exception): Warning: Use of undefined constant SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES - assumed 'SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\magento241\vendor\magento\framework\Encryption\Adapter\SodiumChachaIetf.php on line 40
<pre>#1 Magento\Framework\Encryption\Adapter\SodiumChachaIetf->encrypt() called at [vendor\magento\framework\Encryption\Encryptor.php:399]
#2 Magento\Framework\Encryption\Encryptor->encryptWithFastestAvailableAlgorithm() called at [vendor\magento\module-config\App\Config\Type\System.php:339]
#3 Magento\Config\App\Config\Type\System->cacheData() called at [vendor\magento\framework\Cache\LockGuardedCacheLoader.php:137]
#4 Magento\Framework\Cache\LockGuardedCacheLoader->lockedLoadData() called at [vendor\magento\module-config\App\Config\Type\System.php:281]
#5 Magento\Config\App\Config\Type\System->loadDefaultScopeData() called at [vendor\magento\module-config\App\Config\Type\System.php:207]
#6 Magento\Config\App\Config\Type\System->getWithParts() called at [vendor\magento\module-config\App\Config\Type\System.php:181]
#7 Magento\Config\App\Config\Type\System->get() called at [vendor\magento\framework\App\Config.php:132]
#8 Magento\Framework\App\Config->get() called at [vendor\magento\module-backend\App\Config.php:51]
#9 Magento\Backend\App\Config->getValue() called at [vendor\magento\module-backend\App\Area\FrontNameResolver.php:109]
#10 Magento\Backend\App\Area\FrontNameResolver->getFrontName() called at [vendor\magento\module-backend\Helper\Data.php:209]
#11 Magento\Backend\Helper\Data->getAreaFrontName() called at [vendor\magento\module-backend\App\Request\PathInfoProcessor.php:50]
#12 Magento\Backend\App\Request\PathInfoProcessor->process() called at [generated\code\Magento\Backend\App\Request\PathInfoProcessor\Proxy.php:95]
#13 Magento\Backend\App\Request\PathInfoProcessor\Proxy->process() called at [vendor\magento\framework\App\Request\Http.php:148]
#14 Magento\Framework\App\Request\Http->getOriginalPathInfo() called at [vendor\magento\framework\App\Request\Http.php:163]
#15 Magento\Framework\App\Request\Http->getPathInfo() called at [vendor\magento\framework\App\Request\Http.php:213]
#16 Magento\Framework\App\Request\Http->getFrontName() called at [vendor\magento\framework\App\Http.php:111]
#17 Magento\Framework\App\Http->launch() called at [generated\code\Magento\Framework\App\Http\Interceptor.php:23]
#18 Magento\Framework\App\Http\Interceptor->launch() called at [vendor\magento\framework\App\Bootstrap.php:264]
#19 Magento\Framework\App\Bootstrap->run() called at [pub\index.php:30]
</pre>
https://drive.google.com/drive/folders/1OJaik33qhQL-X3X26LhFJBtUrk4bU5Cm?usp=sharing
Please make sure you have installed the sodium PHP extension.
You can check that with php -i | grep -i sodium
On Windows
Add "extension=sodium" to php.ini (no quotes)
Copy php/libsodium.dll to apache/bin/
Restart Apache
This works for me works on Windows.
I changed my php version from 8.0 to 8.1 on my linux (centOS) web hosting and had to add the following line to the relevant php.ini showing in phpinfo():
extension=php_sodium.dll
Once I did this the problem was solved!
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.
I have a Drupal 8 project developed on my local. I am trying to move it to Client server which is Windows server 2008 R2 version. Steps I followed:
Restored database on DB server (MS SQL)
Moved all the project files into client web server
Installed PHP 7.3 and it's dependancies (wincache, PHP manager etc)
Dropped PDO_sqlsrv drivers into appropriate folders and edited PHP.ini with those locations
Changed DB configs in settings.php
When I start the site in IIS I see the Drupal "website encountered error" message. On the log file I see the below errors:
PDOException: in D:\myproject\web\core\lib\Drupal\Component\DependencyInjection\PhpArrayContainer.php on line 79 #0 D:\myproject\web\core\lib\Drupal\Core\Database\Database.php(371): Drupal\Driver\Database\sqlsrv\Connection::open(Array)
#1 D:\myproject\web\core\lib\Drupal\Core\Database\Database.php(166): Drupal\Core\Database\Database::openConnection('default', 'default')
#2 [internal function]: Drupal\Core\Database\Database::getConnection('default')
#3 D:\myproject\web\core\lib\Drupal\Component\DependencyInjection\PhpArrayContainer.php(79): call_user_func_array('Drupal\\Core\\Dat...', Array)
#4 D:\myproject\web\core\lib\Drupal\Component\DependencyInjection\Container.php(173): Drupal\Component\DependencyInjection\PhpArrayContainer->createService(Array, 'database')
#5 D:\myproject\web\core\lib\Drupal\Component\DependencyInjection\PhpArrayContainer.php(260): Drupal\Component\DependencyInjection\Container->get('database', 1)
#6 D:\myproject\web\core\lib\Drupal\Component\DependencyInjection\PhpArrayContainer.php(62): Drupal\Component\DependencyInjection\PhpArrayContainer->resolveServicesAndParameters(Array)
#7 D:\myproject\web\core\lib\Drupal\Component\DependencyInjection\Container.php(173): Drupal\Component\DependencyInjection\PhpArrayContainer->createService(Array, 'cache.container')
#8 D:\myproject\web\core\lib\Drupal\Core\DrupalKernel.php(543): Drupal\Component\DependencyInjection\Container->get('cache.container')
#9 D:\myproject\web\core\lib\Drupal\Core\DrupalKernel.php(904): Drupal\Core\DrupalKernel->getCachedContainerDefinition()
#10 D:\myproject\web\core\lib\Drupal\Core\DrupalKernel.php(476): Drupal\Core\DrupalKernel->initializeContainer()
#11 D:\myproject\web\core\lib\Drupal\Core\DrupalKernel.php(692): Drupal\Core\DrupalKernel->boot()
#12 D:\myproject\web\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#13 {main}
Not sure how to fix this. Any help?!
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
I am working on a laravel application and decided to use antonioribeiro/firewall to manage IP restrictions throughout my application. The package is awesome and worked like a charm. Until recently when I upgraded to the latests laravel version 5.2.5 when the package started throwing and error, the stack to which I am pasting below:
[2015-12-29 09:23:20] local.ERROR: exception 'BadMethodCallException' with message 'Method filter does not exist.' in /home/vagrant/Code/archive/vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php:81
Stack trace:
#0 /home/vagrant/Code/archive/vendor/pragmarx/firewall/src/Vendor/Laravel/ServiceProvider.php(163): Illuminate\Routing\Router->__call('filter', Array)
#1 /home/vagrant/Code/archive/vendor/pragmarx/firewall/src/Vendor/Laravel/ServiceProvider.php(163): Illuminate\Routing\Router->filter('fw-block-bl', '\\PragmaRX\\Firew...')
#2 /home/vagrant/Code/archive/vendor/pragmarx/firewall/src/Vendor/Laravel/ServiceProvider.php(67): PragmaRX\Firewall\Vendor\Laravel\ServiceProvider->registerFilters()
#3 /home/vagrant/Code/archive/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(531): PragmaRX\Firewall\Vendor\Laravel\ServiceProvider->register()
#4 /home/vagrant/Code/archive/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(74): Illuminate\Foundation\Application->register(Object(PragmaRX\Firewall\Vendor\Laravel\ServiceProvider))
#5 /home/vagrant/Code/archive/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(507): Illuminate\Foundation\ProviderRepository->load(Array)
#6 /home/vagrant/Code/archive/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\Foundation\Application->registerConfiguredProviders()
#7 /home/vagrant/Code/archive/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(203): Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap(Object(Illuminate\Foundation\Application))
#8 /home/vagrant/Code/archive/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(208): Illuminate\Foundation\Application->bootstrapWith(Array)
#9 /home/vagrant/Code/archive/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(105): Illuminate\Foundation\Console\Kernel->bootstrap()
#10 /home/vagrant/Code/archive/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 {main}
Now I am not an expert but I think this line:
$this->app['router']->filter('fw-block-bl', '\PragmaRX\Firewall\Filters\Blacklist');
is responsible for throwing the error. My best guess is that maybe filters are deprecated in 5.2.5 and there is no longer a filter method or maybe it was renamed to something else. In either case I don't know how to fix this. I am not using the filters that ship with the package as it is. I have written my own custom middleware to work with. How do I go around this problem?
So I had not updated to the newer version of the package available and the even more frustrating problem I faced was that the newer package bundled the older version (~0.5) of the support package from the same user and I had to forcefully update to the newer version (~0.6) of the support package too.
Github issue