what is difference between phpredis and predis in laravel? - laravel

By default, Laravel will use the phpredis extension to communicate with Redis but We can install predis in application.
do I need to install predis in project? what is difference between phpredis and predis in laravel?

phpredis is a binary package and pecl extension for php.which makes it faster than predis.
but you need root permission to install phpredis extension.when you use some webhost that do not support customize environment,make it impossible to run you appllication.
on the other hand.predis use pure php code to communicate with redis server.so there is no local php extension requirements.but it's a little slower.
so you can deploy you application to any webhost that support php.
As I remember.laravel default use predis to make it minial requirements.

PhpRedis is a PHP extension for communicating with the Redis storage.
Predis is the alternative for PhpRedis on pure PHP and does not require any additional C extension by default, but it can be optionally paired with phpiredis.
I will recommend that phpredis provide a lot of better performance.

Related

Laravel Aws\Laravel\AwsServiceProvider::class Not found

I want to use AWS QLDB Client using aws sdk in laravel v7
I have followed all procedures written here.
I'm getting this error
Aws\Laravel\AwsServiceProvider::class Not found
Aws SDK PHP does not have a provider built in, it is for vanilla PHP. You will need to install the Laravel version of it, you can find the package on github.
composer require aws/aws-sdk-php-laravel

silex do i need composer to autoload?

I install my web site on ovh server but i think composer it not install on it.
So i have a fatal error
Class 'App\Models\Product\ProductModel' not found in /home/xxxxx/App/Controller/Home/HomeController.php on line 26
in my ftp i have
composer.json
App
bootstrap.php
Model
Product
ProductModel.php
Controller
indexController.php
Home
HomeController.php
www
index.php
I auto load App as App
Do you know if the problem is composer?
Do you know if i can use with out composer?
How?
thank you
Use Composer before you upload your code. Composer need not be executed on the server - in fact this is regarded more of a problem than a solution because it requires all package hosting servers to be up, and the command line tools for accessing version control systems be installed (at least as a fallback).
The recommended way to use Composer is to run it locally (or on a deployment machine that is local enough), let it fetch all files, create the autoloader, and then copy all the collected files to the target server.
This approach also resolves the problem with Composer requiring about 1GB of memory (or more, depending on how many packages have to be considered) when being run - if your web server has less memory installed, you won't be able to use Composer.

how to enable APC caching in xampp v3.2.1

I am using xampp v3.2.1 with PHP 5.6.8. now i want to use PHP APC caching techiniques but unable to use. can anyone please tell how shall i enable this caching on my xampp.
In short: when you are using PHP 5.6.8:
enable the Opcache
forget about APC
if you need a userland cache use APCu
Since PHP 5.5 the Bytecode-Cache "OpCache" is part of the core, making the APC extension itself useless. In other words: APC is only usefull for 5.4 and lower versions and those reached EOL.
Since PHP 5.5 there is the User Cache-Extension "APCu" as a replacement for APC.
https://github.com/krakjoe/apcu

Does Magento 1.9.0.1 need php-redis extension for using Redis Cache?

Does Magento 1.9.0.1 need php-redis extension for using Redis Cache?
I can't seem to be able to find the answer through google.
Edited: it looks like there is an option whether to use phpredis or standalone PHP
<force_standalone>0</force_standalone> <!-- 0 for phpredis, 1 for standalone PHP -->
Magento 1.9.0.1 comes along with Cm_RedisSession the way it is for magento 1.8. You need to have redis installed on your server, you need to have a PHP extension for interfacing with Redis. The details can be found at http://pecl.php.net/package/redis.
And you can refer to http://www.magentocommerce.com/knowledge-base/entry/redis-magento-ce-ee#config-mage for configuring redis.

Bcrypt hashing not supported, Mcrypt installed

Trying to hash a password in laravel four using Hash::make('password'); and get the error Bcrypt hashing not supported. in return.
Mcrypt is installed and phpinfo() confirms this, what else could be wrong?
Debian 6.0 X64 with PHP 5.3.3-7.
The Laravel requirements are PHP >=5.3.7
You said you are running 5.3.3-7 - which is less than 5.3.7
Can you upgrade your PHP version?
As The Shift Exchange said, 5.3.7 is the minimum for a 'vanilla' Laravel 4, but there is at least one option, if you really cannot upgrade your PHP server. This one will drop the minimum PHP version for Laravel 4 to 5.3.2:
https://github.com/robclancy/laravel4-hashing
Before using it, weigh your security needs, because it will also drop the security level of your hashes.

Resources