i am getting fatal error random_bytes() in laravel 5 - paypal

I am getting fatal error random_bytes() in laravel 5 after installing the
"paypal/adaptivepayments-sdk-php":"v3.6.106" in composer.json
"require": {
"laravel/framework": "5.0.*",
"jacopo/laravel-authentication-acl": "1.3.*",
"webpatser/laravel-countries": "dev-master",
"yajra/laravel-datatables-oracle": "~5.0",
"illuminate/html": "5.0.*#dev",
"paypal/adaptivepayments-sdk-php":"v3.6.106"
},
using composer. please share me any solution . i am stuck for last 3 hrs to solve this error.
i tried to comment the nextBytes() in secureRandom.php file but i think it is not a good idea.

random_bytes is a PHP function in PHP v7.0. You can install the missing package on PHP v5.x using composer.
Run composer require paragonie/random_compat and then try adding the affected library.
Source: https://github.com/paragonie/random_compat

Related

Runtimeexception when installing an extension via composer in typo3

I got an error when i try to install extension(Bw Focuspoint Images) via composer in typo3.
Installation failed, reverting ./composer.json to its original content.
[RuntimeException]
Please help.
Composer was already installed in my project. I want to install one extension to this project via composer. The steps i taken are,
login to my project by ssh
Then i give composer req blueways/bw-focuspoint-images
After that i got the error which was in image
I am getting this error
Package operations: 1 install, 0 updates, 0 removals
Installs: blueways/bw-focuspoint-images:v3.0.2
Installation failed, reverting ./composer.json to its original content.
[RuntimeException]
/public/typo3conf/ext/bw_focuspoint_images does not exist and could not be created.
Exception trace:
() at phar:///usr/bin/composer/src/Composer/Util/Filesystem.php:186
Composer\Util\Filesystem->ensureDirectoryExists() at phar:///usr/bin/composer/src/Composer/Downloader/DownloadManager.php:206
Composer\Downloader\DownloadManager->download() at phar:///usr/bin/composer/src/Composer/Installer/LibraryInstaller.php:197
Composer\Installer\LibraryInstaller->installCode() at phar:///usr/bin/composer/src/Composer/Installer/LibraryInstaller.php:101
Composer\Installer\LibraryInstaller->install() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:173
Composer\Installer\InstallationManager->install() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:160
Composer\Installer\InstallationManager->execute() at phar:///usr/bin/composer/src/Composer/Installer.php:611
Composer\Installer->doInstall() at phar:///usr/bin/composer/src/Composer/Installer.php:232
Composer\Installer->run() at phar:///usr/bin/composer/src/Composer/Command/RequireCommand.php:248
Composer\Command\RequireCommand->doUpdate() at phar:///usr/bin/composer/src/Composer/Command/RequireCommand.php:205
Composer\Command\RequireCommand->execute() at phar:///usr/bin/composer/vendor/symfony/console/Command/Command.php:245
Symfony\Component\Console\Command\Command->run() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:835
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:185
Symfony\Component\Console\Application->doRun() at phar:///usr/bin/composer/src/Composer/Console/Application.php:283
Composer\Console\Application->doRun() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at phar:///usr/bin/composer/src/Composer/Console/Application.php:113
Composer\Console\Application->run() at phar:///usr/bin/composer/bin/composer:64
require() at /usr/bin/composer:24
require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...
Thank you. The extension got installed but it displaying another error.
enter image description here
Thank you for the help. The solution for this issue is,
I created the directory for the extension through composer using
mkdir bw_focuspoint_images
Then I give the command to install that plugin
composer req blueways/bw-focuspoint-images
And it's successfully installed.

Laravel 5 Fatal Error HtmlServiceProvider

I'm using Laravel 5.2 normally from composer,
already installed.
the first time I run php artisan server, there is no problem.
After create and modify some controller to add Html Form, I got an error when
I want to run php artisan serve,
D:\xampp\htdocs\bookstore>php artisan serve
PHP Fatal error: Call to undefined method Illuminate\Foundation\Application::bindShared() in D:\xampp\htdocs\bookstore\vendor\illuminate\html\HtmlServiceProvider.php on line 36
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Foundation\Application::bindShared()
How I can solve this one?
The illuminate/html component is no longer part of Laravel proper, and hasn't yet been updated to conform to 5.1 standards.
You need to remove:
'Illuminate\Html\HtmlServiceProvider',
and
'Form' => 'Illuminate\Html\FormFacade',
'Html' => 'Illuminate\Html\HtmlFacade',
form your config/app.php
then remove from your composer.json illuminate/html then add to your composer.json:
"laravelcollective/html": "5.*"
in require section
then run composer install

Import/Export Plugin - will not install on IP3.9

Maybe I am making a fundamental error, but I assume you have to install the Import / Export plugin on IP3.9 to make the zip file before you import it to the new ip4.1 site ?
The plugin will not install in IP3.9 there is an error "plugin.ini doesn't exist"
The Import / Export plugin is not in the IP3.x format
ip_plugins/group_name/plugin_name/files
so I do not see how it can be installed.
If I try exporting data from IP4.1 I get the following error message
Error:
Fatal error: Call to undefined method Ip\Page::getType() in /var/www/ip41/Plugin/ImportExport/ManagerExport.php on line 207
I am probably doing something stupid, but I cannot see what
Alan
For v3.x version you must download a 3.x branch of the plugin - https://github.com/impresspages-plugins/ImportExport/tree/3.x
For the error in v4.1 open an issue on GitHub - https://github.com/impresspages-plugins/ImportExport/issues
I hope it does make sense now.

Fatal error: Class 'Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle' not found

I'm trying to install mongodb since 3 days but each time, I had a different error message until I fix some of them and I could install mongodb for my Symfony 2.1.4 installation. So now I have this error message:
"Fatal error: Class 'Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle' not found"
I couldn't find any solution to solve it.
For information in my composer.json I added these lines:
"doctrine/mongodb-odm": "*",
"doctrine/mongodb-odm-bundle": "v2.0.1"
and it creates 3 folders in the Doctrine namespace:
doctrine/mongodb
doctrine/mongodb-odm
doctrine/mongodb-odm-bundle
Why is this occurring?
For Symfony 2.1, you'll need to use version 3.0 of the Doctrine ODM MongoDB Bundle.
"doctrine/mongodb-odm": "1.0.*#dev",
"doctrine/mongodb-odm-bundle": "3.0.*#dev"
The reason the bundle you installed could not be found was because it was under a different namespace, being Symfony\Bundle\DoctrineMongoDBBundle\DoctrineMongoDBBundle for Symfony 2.0

Symfony 1.4x and sfTCPDFPlugin

I have installed sfTCPDFPlugin in my project, but when I try to test if the installation is alright (with the source found on the official site) I get the error:
Fatal error: Class 'TCPDF' not found in C:\wamp\www\mairie\plugins\sfTCPDFPlugin\lib\sfTCPDF.class.php on line 12
How can I fix it?
Read the readme tab here : http://www.symfony-project.org/plugins/sfTCPDFPlugin
It says you have to download the tcpdf library, not only the sfTCPDFPlugin.
i faced with same problem, and i did the following task it will also help you.
first of all run: symfony plugin:uninstall sfTCPDFPlugin then remove the sfTCPDFPlugin directory form your plugin folder.
mow do the following setps:
1. cd your project path/symfony
2. symfony plugin:install sfTCPDFPlugin
3. download the tcpdf library unzip it and past into your sfTCPDFPlugin/lib now your directory looks like your project path/symfony/plugins/sfTCPDFPlugin/lib/tcpdf
now change your ProjectConfiguration.class.php to add $this->enablePlugins( array('sfTCPDFPlugin') ); now run the symfony plugin:publish-asstes and finally clear the cache symfony cc.