Fatal error on Phalcon on doing simultaneously request - Server WAMP - php

I'm creating an application that on the front end will run a SPA with VueJS and in the back end a webservice with Phalcon. I'm having a problem when I make two asynchronous calls simultaneously to the API (located on my test machine) I receive the following error on the second call:
<br />
<b>Fatal error</b>: Uncaught Error: Access to undeclared static property:
Phalcon\Di::$_default in D:\wamp64\www\web-service\public_html\index.php:19
Stack trace:
#0 [internal function]: Phalcon\Di->__construct()
#1 D:\wamp64\www\web-service\public_html\index.php(19):
Phalcon\Di\FactoryDefault->__construct()
#2 {main}
Next Error: Access to undeclared static property: Phalcon\Di::$_default in
D:\wamp64\www\web-service\public_html\index.php:19
Stack trace:
#0 [internal function]: Phalcon\Di->__construct()
#1 D:\wamp64\www\web-service\public_html\index.php(19):
Phalcon\Di\FactoryDefault->__construct()
#2 {main}
thrown in <b>D:\wamp64\www\web-service\public_html\index.php</b> on
line <b>19</b><br />
If I run each call after another, both work correctly.
My server run on a Windows machine with WAMP

Related

How to solve GuzzleHttp redeclare error in Yii PHP?

When I run my PHP Yii framework file, It results in the following error.
PHP Compile Error 'yii\base\ErrorException' with message 'Cannot redeclare GuzzleHttp\Psr7\str() (previously declared in /Applications/XAMPP/xamppfiles/htdocs/PLATO/framework/vendor/guzzlehttp/psr7/src/functions.php:19)' in /Applications/XAMPP/xamppfiles/htdocs/PLATO/protected/extensions/aws/GuzzleHttp/Psr7/functions.php:18 Stack trace: #0 [internal function]: yii\base\ErrorHandler->handleFatalError() #1 {main}
How to fix this issue?

Laravel error tries to use log before autoload

I have a project with Laravel 4.
I use an helper in config/database.php
I get this error:
PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist' in /var/app/current/vendor/laravel/framework/src/Illuminate/Container/Container.php:741
Stack trace:
#0 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/Container.php(741): ReflectionClass->__construct('log')
#1 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('log', Array)
#2 /var/app/current/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('log', Array)
#3 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/Container.php(842): Illuminate\Foundation\Application->make('Psr\\Log\\LoggerI...')
#4 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 /var/app/current/vendor/laravel/framework/src/Illuminate/Container/Container.php(776): Illuminate\Container\C in /var/app/current/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 741
I checked and the class name thats passed to make on /var/app/current/vendor/laravel/framework/src/Illuminate/Container/Container.php(842)
is Psr\Log\LoggerInterface.
I assume the log class gets called before it is loaded and thats why it breaks.
If I remove the use of the helper in config/database.php all works, even if I simulate errors.
Is there a way to resolve it?
I need the Helper there.

Invalid Parameter – yii\base\InvalidParamException The file or directory to be published does not exist: /frontend/web

Moved the site from one server to another with postgresql database. Db has been connected. Then I used this command:
composer install
While loading the site, yii debugger shows an error
What is more, composer update shows many errors in console:
PHP Fatal error: Uncaught Error: Call to undefined method Composer\Package\RootPackage::getConfig() in /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/Config/ConfigBuilder.php:111
Stack trace:
#0 /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/Config/ConfigBuilder.php(74): Fxp\Composer\AssetPlugin\Config\ConfigBuilder::getConfigBase(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#1 /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/FxpAssetPlugin.php(82): Fxp\Composer\AssetPlugin\Config\ConfigBuilder::build(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#2 /usr/share/php/Composer/Plugin/PluginManager.php(215): Fxp\Composer\AssetPlugin\FxpAssetPlugin->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#3 /usr/share/php/Composer/Plugin/PluginManager.php(188): Composer\Plugin\PluginManager->addPlugin(Object(Fxp\Composer\AssetPlugin\FxpAssetPlugin))
#4 /usr/share/php/Composer/Installer/PluginInstaller.php(62): Composer\Pl in /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/Config/ConfigBuilder.php on line 111
Fatal error: Uncaught Error: Call to undefined method Composer\Package\RootPackage::getConfig() in /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/Config/ConfigBuilder.php:111
Stack trace:
#0 /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/Config/ConfigBuilder.php(74): Fxp\Composer\AssetPlugin\Config\ConfigBuilder::getConfigBase(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#1 /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/FxpAssetPlugin.php(82): Fxp\Composer\AssetPlugin\Config\ConfigBuilder::build(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#2 /usr/share/php/Composer/Plugin/PluginManager.php(215): Fxp\Composer\AssetPlugin\FxpAssetPlugin->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#3 /usr/share/php/Composer/Plugin/PluginManager.php(188): Composer\Plugin\PluginManager->addPlugin(Object(Fxp\Composer\AssetPlugin\FxpAssetPlugin))
#4 /usr/share/php/Composer/Installer/PluginInstaller.php(62): Composer\Pl in /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/Config/ConfigBuilder.php on line 111

Laravel - amazon subdomain hosting issue

I am creating 2 sub-domains like gateway.domain.com and hp.domain.com
I have installed 2 separate projects name gateway and HP in my local machine,
I upload gateway to gateway.domain.com
It’s working fine.
I upload hp to hp.domain.com
But I got a issue like
Fatal error: Uncaught exception 'ReflectionException' with message 'Class RFID4U_HP\Http\Kernel does not exist' in /var/www/clients/client1/web1/web/subdomains/Gateway/vendor/laravel/framework/src/Illuminate/Container/Container.php:738 Stack trace: #0 /var/www/clients/client1/web1/web/subdomains/Gateway/vendor/laravel/framework/src/Illuminate/Container/Container.php(738): ReflectionClass->__construct('RFID4U_HP\Http...') #1 /var/www/clients/client1/web1/web/subdomains/Gateway/vendor/laravel/framework/src/Illuminate/Container/Container.php(633): Illuminate\Container\Container->build('RFID4U_HP\Http...', Array) #2 /var/www/clients/client1/web1/web/subdomains/Gateway/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(697): Illuminate\Container\Container->make('RFID4U_HP\Http...', Array) #3 /var/www/clients/client1/web1/web/subdomains/Gateway/vendor/laravel/framework/src/Illuminate/Container/Container.php(230): Illuminate\Foundation\Application->make('RFID4U_HP\Http...', Array) #4 /var/www/clients/client1/ in /var/www/clients/client1/web1/web/subdomains/Gateway/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 738
Also hp will going to read gateway fw path, I am not able to understand why this happen. In my lcl it’s working fine.
Some time it will reverse functioning hp working gateway will find the path in hp folder.
Fatal error: Uncaught exception 'ReflectionException' with message 'Class RFID4U_GW\Http\Kernel does not exist' in
/var/www/clients/client1/web1/web/subdomains/hp/vendor/laravel/framework/src/Illuminate/Container/Container.php:738 Stack trace: #0
/var/www/clients/client1/web1/web/subdomains/hp/vendor/laravel/framework/src/Illuminate/Container/Container.php(738): ReflectionClass->__construct('RFID4U_GW\Http...') #1
/var/www/clients/client1/web1/web/subdomains/hp/vendor/laravel/framework/src/Illuminate/Container/Container.php(633): Illuminate\Container\Container->build('RFID4U_GW\Http...', Array) #2
/var/www/clients/client1/web1/web/subdomains/hp/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(697): Illuminate\Container\Container->make('RFID4U_GW\Http...', Array) #3
/var/www/clients/client1/web1/web/subdomains/hp/vendor/laravel/framework/src/Illuminate/Container/Container.php(230): Illuminate\Foundation\Application->make('RFID4U_GW\Http...', Array) #4
/var/www/clients/client1/web1/web/subdomains/hp/ve in /var/www/clients/client1/web1/web/subdomains/hp/vendor/laravel/framework/src/Illuminate/Container/Container.php on line

ZEND Session Exception

after migrating to a new server, emails progammes with a crontab not send more, the script responsible for sending, returns this error :
Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'Session must be started before any output has been sent to the browser; output started in /srv/www/assystemps/public/index_cron.php/2' in /srv/www/assystemps/library/Zend/Session.php:443
Stack trace:
#0 /srv/www/assystemps/library/Zend/Session/Namespace.php(143): Zend_Session::start(true)
#1 /srv/www/assystemps/library/Zend/Auth/Storage/Session.php(87): Zend_Session_Namespace->__construct('Zend_Auth')
#2 /srv/www/assystemps/library/Zend/Auth.php(91): Zend_Auth_Storage_Session->__construct()
#3 /srv/www/assystemps/library/Zend/Auth.php(151): Zend_Auth->getStorage()
#4 /srv/www/assystemps/application/AssystempsApplication.php(236): Zend_Auth->getIdentity()
#5 /srv/www/assystemps/public/index_cron.php(121): AssystempsApplication->envoyerMailErreur(Object(Zend_Cache_Exception))
#6 {main}
thrown in /srv/www/assystemps/library/Zend/Session.php on line 443

Categories