Composer fails on capistrano deploy "phpseclib/bootstrap.php: failed to open stream" - laravel

So, running cap production deploy now fails and gives me this log:
DEBUG [d8e9f9b4] Generating autoload files
DEBUG [d8e9f9b4] > Illuminate\Foundation\ComposerScripts::postInstall
DEBUG [d8e9f9b4] PHP Warning: Uncaught ErrorException: require(/some_path/releases/20161101100659/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php): failed to open stream: No such file or directory in /some_path/releases/20161101100659/vendor/composer/autoload_real.php:55
Stack trace:
#0 /some_path/releases/20161101100659/vendor/composer/autoload_real.php(55): Composer\Util\ErrorHandler::handle(2, 'require(/srv/us...', '/path/...', 55, Array)
#1 /some_path/releases/20161101100659/vendor/composer/autoload_real.php(55): require()
#2 /some_path/releases/20161101100659/vendor/composer/autoload_real.php(45): composerRequire28a339249b76e8c9bd2081b3b12636da('decc78cc4436b12...', '/path/...')
#3 /some_path/releases/20161101100659/vendor/autoload.php(7): ComposerAutoloaderInit28a339249b76e8c9bd2081b3b12636da::getLoader()
#4 /some_path/releases/201611011006 in /some_path/releases/20161101100659/vendor/composer/autoload_real.php on line 55
DEBUG [d8e9f9b4]
Warning: Uncaught ErrorException: require(/some_path/releases/20161101100659/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php): failed to open stream: No such file or directory in /some_path/releases/20161101100659/vendor/composer/autoload_real.php:55
Stack trace:
#0 /some_path/releases/20161101100659/vendor/composer/autoload_real.php(55): Composer\Util\ErrorHandler::handle(2, 'require(/path/...', '/path/...', 55, Array)
#1 /some_path/releases/20161101100659/vendor/composer/autoload_real.php(55): require()
#2 /some_path/releases/20161101100659/vendor/composer/autoload_real.php(45): composerRequire28a339249b76e8c9bd2081b3b12636da('decc78cc4436b12...', '/path/...')
#3 /some_path/releases/20161101100659/vendor/autoload.php(7): ComposerAutoloaderInit28a339249b76e8c9bd2081b3b12636da::getLoader()
#4 /some_path/releases/201611011006 in /some_path/releases/20161101100659/vendor/composer/autoload_real.php on line 55
DEBUG [d8e9f9b4] PHP Fatal error: composerRequire28a339249b76e8c9bd2081b3b12636da(): Failed opening required '/some_path/releases/20161101100659/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php' (include_path='.:/opt/sp/php7.0/lib/php') in /some_path/releases/20161101100659/vendor/composer/autoload_real.php on line 55
DEBUG [d8e9f9b4]
Fatal error: composerRequire28a339249b76e8c9bd2081b3b12636da(): Failed opening required '/some_path/releases/20161101100659/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php' (include_path='.:/opt/sp/php7.0/lib/php') in /some_path/releases/20161101100659/vendor/composer/autoload_real.php on line 55
It worked fine before I changed JWT lib from 0.5.9 to 1.0.0.alpha and added laravelconnect/remote package.
Note: this all works on my local machine. I've no idea why phpsec doesn't have bootstrap.php file in it. On my local machine it does have it.

Related

How to resolve error on ProcessMaker 4.3.0 instllation?

My server specifications:
Centos 7.9
PHP 8.2
Nginx
MySQL 8.0
Composer 2.4.4
Node 16.18.1
NPM 8.19.3
Redis 5
Docker
I have installed all the dependencies required for ProcessMaker 4.3.0 running(mentioned the versions above). After enabling the npm, laravel and artisan horizan server, I hit the URL and get 500 error. On checking the nginx log I get the following error:
[error] 8150#8150: *512 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught ErrorException: file_put_contents(/opt/processmaker-4.3.0/storage/framework/views/ef0f3565ae74afa67f42e441ee3da8cfbe934ae1.php): Failed to open stream: Permission denied in /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:187 Stack trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() #1 /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(187): file_put_contents() #2 /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(169): Illuminate\Filesystem\Filesystem->put() #3 /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(55): Illuminate\View\Compilers\BladeCompiler->compile() #4 /opt/processmaker-4.3.0/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(37): Illuminate\View\Engines\CompilerEngine->get() #5 /opt/processmaker-4.3.0/vendor/laravel/fram...PHP message: PHP Fatal error: Uncaught ErrorException: file_put_contents(/opt/processmaker-4.3.0/storage/framework/views/ef0f3565ae74afa67f42e441ee3da8cfbe934ae1.php): Failed to open stream: Permission denied in /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:187 Stack trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() #1 /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(187): file_put_contents() #2 /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(169): Illuminate\Filesystem\Filesystem->put() #3 /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(55): Illuminate\View\Compilers\BladeCompiler->compile() #4 /opt/processmaker-4.3.0/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(37): Illuminate\View\Engines\CompilerEngine->get
I have already given 755 permission to the storage and vendor folder in processmaker. Also the owner ship and group of all the folders and files is nginx.
Whatelse, could I be missing out?

Symfony Composer error when i try to lunch symfony

When I launch a symfony project I get this error, I have already deleted and installed the composer but nothing changes.
PHP Fatal error: Uncaught PharException: internal corruption of phar "C:\Webtech\composer.phar" (__HALT_COMPILER(); not found) in C:\Webtech\composer.phar:28
Stack trace:
#0 C:\Webtech\composer.phar(28): Phar::mapPhar('composer.phar')
#1 {main}
thrown in C:\Webtech\composer.phar on line 28
Fatal error: Uncaught PharException: internal corruption of phar "C:\Webtech\composer.phar" (__HALT_COMPILER(); not found) in C:\Webtech\composer.phar:28
Stack trace:
#0 C:\Webtech\composer.phar(28): Phar::mapPhar('composer.phar')
#1 {main}
thrown in C:\Webtech\composer.phar on line 28```

PHP Fatal error: Uncaught Error: Call to undefined function simplexml_load_string() in public_html/lib/Varien/Simplexml/Config.php:510

I'm getting this error. Can you please help me understand why it is coming and what does it mean. I did not change any code. It is running on PHP 7.1 and Operating system is Linux.
PHP Warning: PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20160303
PHP compiled with module API=20170718
These options need to match in Unknown on line 0
PHP Fatal error: Uncaught Error: Call to undefined function
simplexml_load_string() in public_html/lib/Varien/Simplexml/Config.php:510
Stack trace:
#0 /home3/ramesqj3/public_html/lib/Varien/Simplexml/Config.php(498):
Varien_Simplexml_Config->loadString('<?xml version="...',
'Mage_Core_Model...')
#1/home3/ramesqj3/public_html/app/code/core/Mage/Core/Model/Config.php(277):
Varien_Simplexml_Config->loadFile('/home3/ramesqj3...')
#2 /home3/ramesqj3/public_html/app/code/core/Mage/Core/Model/App.php(391):
Mage_Core_Model_Config->loadBase()
#3 /home3/ramesqj3/public_html/app/code/core/Mage/Core/Model/App.php(304):
Mage_Core_Model_App->_initBaseConfig()
#4 /home3/ramesqj3/public_html/app/code/core/Mage/Core/Model/App.php(348):
Mage_Core_Model_App->baseInit(Array)
#5 /home3/ramesqj3/public_html/app/Mage.php(686): Mage_Core_Model_App-
>run(Array)
#6 /home3/ramesqj3/public_html/index.php(83): Mage::run('', 'store')
#7 {main}
thrown in public_html/lib/Varien/Simplexml/Config.php on line 510

Error on wrong artisan command

I know whenever someone types wrong artisan command a well-formatted error message is shown
But there is some problem in my project because when I run wrong command eg
php artisan create:migration create_table
I am getting this output
PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "/home/amarjit/Documents/localhost/inkpothub/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /home/amarjit/Documents/localhost/inkpothub/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107
Stack trace:
#0 /home/amarjit/Documents/localhost/inkpothub/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\StreamHandler->write(Array)
#1 /home/amarjit/Documents/localhost/inkpothub/vendor/monolog/monolog/src/Monolog/Logger.php(337): Monolog\Handler\AbstractProcessingHandler->handle(Array)
#2 /home/amarjit/Documents/localhost/inkpothub/vendor/monolog/monolog/src/Monolog/Logger.php(616): Monolog\Logger->addRecord(400, Object(UnexpectedValueException), Array)
#3 /home/amarjit/Documents/localhost/inkpothub/vendor/laravel/framework/src/Illuminate/Log/Writer.php(202): Monolog\Logger->error(Object(UnexpectedValueException), Array)
#4 /home/amarjit/Documents/localhost/inkpothu in /home/amarjit/Documents/localhost/inkpothub/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 107
PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "/home/amarjit/Documents/localhost/inkpothub/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /home/amarjit/Documents/localhost/inkpothub/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107
Stack trace:
#0 /home/amarjit/Documents/localhost/inkpothub/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\StreamHandler->write(Array)
#1 /home/amarjit/Documents/localhost/inkpothub/vendor/monolog/monolog/src/Monolog/Logger.php(337): Monolog\Handler\AbstractProcessingHandler->handle(Array)
#2 /home/amarjit/Documents/localhost/inkpothub/vendor/monolog/monolog/src/Monolog/Logger.php(616): Monolog\Logger->addRecord(400, Object(Symfony\Component\Debug\Exception\FatalErrorException), Array)
#3 /home/amarjit/Documents/localhost/inkpothub/vendor/laravel/framework/src/Illuminate/Log/Writer.php(202): Monolog\Logger->error(Object(Symfony\Component\Debug\Exception\FatalErrorExcept in /home/amarjit/Documents/localhost/inkpothub/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 107
its only happening with one of my Laravel-5.3 project. Therefore the issue is not related with my localhost

Laravel example project on PhpStorm is not compileable

I am very new to using Frameworks/Laravel and I haven't achieved to run the Laravel welcome website in PhpStorm yet.
Steps I've done so far:
I have created a new "Composer Project" with PhpStorm and chose Laravel as Package.
I installed the IDE helper in line with this tutorial: http://blog.jetbrains.com/phpstorm/2015/01/laravel-development-using-phpstorm/
I installed XAMPP and started the Apache server on port 8000
Changed the PhpStorm Settings -> Language & Frameworks -> PHP -> Interpreter -> Path to php.exe inside of XAMPP
I tried to watch the results in a browser by clicking "Run". A PHP fatal error appeared in the debugger which said the class TestCase couldn't be found.
After googling I added the phpunit.xml as an alternative configuration file for my Run/Debug configurations. Furthermore I read that I need to add the "tests" folder inside of my project directory as "Directory Test Scope" there.
The debugger says "All Tests passed", but I am receiving a different fatal error which I wasn't able to solve until now:
Fatal error: Call to undefined method
PHPUnit_Framework_TestResult::deprecatedFeaturesCount() in
C:\xampp\php\pear\PHPUnit\TextUI\ResultPrinter.php on line 446
Fatal error: Uncaught exception
'Illuminate\Contracts\Container\BindingResolutionException' with
message 'Target [Illuminate\Contracts\Debug\ExceptionHandler] is not
instantiable.' in C:\Users\kentor\PhpstormProjects\test
Laravel\vendor\laravel\framework\src\Illuminate\Container\Container.php:752
Stack trace:
0 C:\Users\kentor\PhpstormProjects\test Laravel\vendor\laravel\framework\src\Illuminate\Container\Container.php(633):
Illuminate\Container\Container->build('Illuminate\Cont...', Array)
#1 C:\Users\kentor\PhpstormProjects\test Laravel\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(697):
Illuminate\Container\Container->make('Illuminate\Cont...', Array)
#2 C:\Users\kentor\PhpstormProjects\test Laravel\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(154):
Illuminate\Foundation\Application->make('Illuminate\Cont...')
#3 C:\Users\kentor\PhpstormProjects\test Laravel\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(79):
in C:\Users\kentor\PhpstormProjects\test
Laravel\vendor\laravel\framework\src\Illuminate\Container\Container.php
on line 752 PHP
Fatal error: Call to undefined method
PHPUnit_Framework_TestResult::deprecatedFeaturesCount() in
C:\xampp\php\pear\PHPUnit\TextUI\ResultPrinter.php on line 446 PHP
Fatal error: Uncaught exception
'Illuminate\Contracts\Container\BindingResolutionException' with
message 'Target [Illuminate\Contracts\Debug\ExceptionHandler] is not
instantiable.' in C:\Users\kentor\PhpstormProjects\test
Laravel\vendor\laravel\framework\src\Illuminate\Container\Container.php:752
Stack trace:
#0 C:\Users\kentor\PhpstormProjects\test Laravel\vendor\laravel\framework\src\Illuminate\Container\Container.php(633):
Illuminate\Container\Container->build('Illuminate\Cont...', Array)
#1 C:\Users\kentor\PhpstormProjects\test Laravel\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(697):
Illuminate\Container\Container->make('Illuminate\Cont...', Array)
#2 C:\Users\kentor\PhpstormProjects\test Laravel\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(154):
Illuminate\Foundation\Application->make('Illuminate\Cont...')
#3 C:\Users\kentor\PhpstormProjects\test Laravel\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(79):
in C:\Users\kentor\PhpstormProjects\test
Laravel\vendor\laravel\framework\src\Illuminate\Container\Container.php
on line 752
Process finished with exit code 255
So in the end I want to see the contents of my "Public" folder.
My questions:
Why did I need to specify the "tests" folder? Is this used for verifying that PHP is compiling correctly or any similar testing stuff?
What did I miss in order to see my Laravel example page in the end?

Resources