Installing APC on Centos PHP7 - installation

I am trying to get the modules installed for an old Symfony site.
I tried
sudo yum install php-pecl-apc
returned
No package php-pecl-apc available.
I can't apt-get s it is not installed. How can I get this module installed

php-pecl-apc is not available for centos7, so you need to install php73-php-pecl-apcu.
Note- not available in official centos repo, so you have to use Remi repo.
https://centos.pkgs.org/7/remi-x86_64/php73-php-pecl-apcu-5.1.17-1.el7.remi.x86_64.rpm.html
Thanks

APC is a dead project, no stable version was released for any version of PHP > 5.3.
For opcode cache, the opcache extension exists for PHP 5.x and is now part of PHP 7.x
For user data cache, the APCu extension version 4 exists for PHP 5.x and provides a new API, and a compatibility layer to emulate APC
For PHP 7.x, APCU version 5 only provides the new API, but the apcu_bc extension provides the compatibility layer.
How do you install PHP 7 on your CentOS box ? Good package providers have these extensions available (php-pecl-apcu and php-pecl-apcu-bc).
P.S. "remi" repository is a possible provider for PHP and its extensions, follow the wizard instuctions.

Related

Unable to download any pdf packages via composer for larvel 5.5

i am using laravel 5.5 with php 7.0 version, I want to generate a pdf, i tried to install many pdf packages, but unable to install because of php 7.0 version, it requires min 7.1 to install any packages, i tried to find packages for 7.0 verision, but failed.
can anyone help me how to install package for php 7.0 veriosn
Below is the error, that i am getting,
Your requirements could not be resolved to an installable set of packages.
Problem 1 - nwidart/laravel-modules 4.1.0 requires php >=7.1 -> your PHP version (7.0.33) does not satisfy that requirement.
There are only 2 solutions out of this, You either upgrade your PHP version to 7.1 or downgrade your package versions which uses PHP7.0
If you tell me what packages are you using,I could help you out find the packages. Let me know what your use case is exactly, or why your cant upgrade to PHP7.1
Also it is important to note that PHP7.0 includes security vulnerabilities fixed in PHP7.1, So consider upgrading your framework to at-least Laravel 5.8
Edit:
here is a package for pdp utilities in laravel 5.5 -> https://github.com/niklasravnsborg/laravel-pdf
For laravel5.5 you will have to manually link the packages as auto discovery will not work.
Edit 2:
here is the problem, When you use composer require barryvdh/laravel-dompdf the composer installs the latest package which is 0.8.4 (compatible with PHP7.1 and higher), What you need to do instead is add the package manually to the composer file and then bind the version 0.8.3 like this under the require object -> "barryvdh/laravel-dompdf": "0.8.3" and then run composer update/install in the terminal

How to install mpdf v8 with composer (currently it only installs v6)

I am on ubuntu 12.04 and trying to install the latest release (v8) of mPDF using the following command:
composer require mpdf/mpdf
However, only v6 gets installed.
Is there any easy way to install version 7 or 8 of mPDF - or is it quite a long process?
UPDATE
After running composer require mpdf/mpdf:^8.0
it looks like the PHP version on the server is 5.3.0.
Although none of the domains on the server use this (I use plesk to force all domains to use 7.1).
The PHP version on the server was a lot older than used by plesk.
As composer was looking at the older version, we could download a more recent version of mpdf.

smwebmail and ISAPI extension during restore backup

Hi i want to restore backup in Plesk Windows and get these errors
Warning:
The PHP handler 5 ISAPI extension (id=isapi-5) is not available. Instead, Plesk will use 7.2.5 FastCGI application (id=fastcgi-7.2) for the following websites: ####
Warning:
The webmail service smwebmail is unavailable. It will be replaced with horde for the following objects: ####
how i can enable ISAPI?
how i can install smwebmail?
Thanks.
It seems that you are trying to restore the backup on a newer server with a different configuration.
PHP 5 as an ISAPI extension is actually PHP version 5.2, which is no longer supported by PHP community. It is recommended to modify the website code to make it compatible with newer PHP versions. The oldest supported PHP version at the moment is 5.6.
If you still want to use PHP 5.2 ISAPI, you can add to any Plesk version except Plesk Onyx 17.8 in Tools & Settings > Updates & Upgrades or via a single line in CMD:
C:\>"%plesk_bin%\ai.exe" --select-release-current --install-component php5
As for smwebmail, you should have SmarterMail installed on the server and configured in Plesk. I suggest referring to Plesk documentation and help center for exact instructions, as it contains all necessary information. Here are some links:
How to configure a local SmarterMail server for Plesk?
How to enable additional PHP version available in Plesk?

Using Sagepay PHP Integration Toolkit

When I go to sagepay/demo/index.php it gives error:
Ooops!!!
Setup error: curl not loaded.
I follow instructions to install php5 etc but my server is running php7. Is this an issue?
It could be an issue with your Apache configuration with the curl module not being enabled as this is a required module for the SagePay toolkit.
You should downgrade to PHP 5.6 anyway for SagePay as their toolkit makes use of mcrypt, found in their requirements section (VspPHPKit/demo/readme.html#2) obtained from here, which according to http://php.net/manual/en/migration71.deprecated.php is deprecated in PHP 7+.
The mcrypt extension has been abandonware for nearly a decade now, and was also fairly complex to use. It has therefore been deprecated in favour of OpenSSL, where it will be removed from the core and into PECL in PHP 7.2.
"I follow instructions to install php5 etc" - which instructions are these?
You might find the demo code runs better on a server running PHP5, some of the code is pretty ancient and not compatible with php7...

Laravel 5.0 php artisan tinker throwing an error on homestead with php7

I'm using Laravel 5.0 and homestead 0.4.0 wich is shipped with php 7,
so when I use php artisan tinker I get this error:
error
How can I fix this or should I downgrade my php version and if so wouldn't be any conflict with composer or any other tool in my homestead or laravel?
It seems that one of the libraries your application is using - PhpParser - is not compatible with PHP7. It defines a class called String which is a reserved keyword in version 7.
You need to either downgrade to PHP5 or check if it's possible to upgrade your dependencies so that used PhpParser library is compatible with PHP7. Version 2.x of PhpParser should be compatible.
If you're including the package directly in your composer.json try to upgrade version there.
If not, you can see which of your dependencies requires PhpParser by calling
composer depends nikic/php-parser
See if you are able to upgrade versions of packages it lists.
I solved my problem by installing an older version of homestead v0.3.3 wich is shipped with php 5.6 so here is all you need to download it:
$vagrant box add laravel/homestead --box-version 0.3.3
and then download an older version of Homestead installer from git, I'm using v2.1.8 it works fine:

Resources