• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

can't install PHP7 PECL oAuth on Plesk 12.5.30

Dee Kuzman

New Pleskian
So I followed advice on adding PHP modules for Plesk 12.5.30 to install oauth for PHP7 but it keeps failing. It need make and gcc added as well as setting temp dir for pecl. After taking care of those now it is throwing up bunch of other errors.

Any suggestion on how to add oauth for PHP7 without loosing hair?
 
It's so easy! No need to loose your hair.

1. Install PHP7 support with Plesk autoinstaller.

2. Install necessary devel packages:

# yum install make plesk-php70-devel gcc glibc-devel libmemcached-devel zlib-devel

3. Install pcre-devel package:

# yum install pcre-devel

4. Install oauth module:

# /opt/plesk/php/7.0/bin/pecl install oauth

5. Add it to php.ini:

# echo "extension=oauth.so" > /opt/plesk/php/7.0/etc/php.d/oauth.ini

6. Reread php handlers:

# plesk bin php_handler --reread

7. Go to Tools&Settings -> PHP Settings -> 7.0.2 FPM application

8. Enjoy the view of the installed oauth module :)
 
Great this worked! Thanks Igor. I have replaced your #2 with:

yum install make plesk-php70-devel gcc glibc-devel liboauth-devel zlib-devel
 
Great this worked! Thanks Igor. I have replaced your #2 with:

yum install make plesk-php70-devel gcc glibc-devel liboauth-devel zlib-devel
Sure. It may be replaced to

# yum install make plesk-php70-devel gcc glibc-devel liboauth-devel zlib-devel pcre-devel

and point 3 should be excluded.
 
I tried the above with pdo_dblib, but I can't seem to get it installed.

Can someone workout a full example of how to install pdo_dblib for the default Php 7 FPM installed by Plesk..?
Hope someone can help me out..

Regards,
TK
 
I tried the above with pdo_dblib, but I can't seem to get it installed.

Can someone workout a full example of how to install pdo_dblib for the default Php 7 FPM installed by Plesk..?
Hope someone can help me out..

Regards,
TK
As you can see PHP7 is not supported:

# /opt/plesk/php/7.0/bin/pecl install pdo_dblib
pear/PDO_DBLIB requires PHP (version >= 5.0.3, version <= 6.0.0), installed version is 7.0.4
No valid packages found
install failed
 
Why not true? On official page https://pecl.php.net/package/PDO_DBLIB you can't find mentions of PHP7 support.
Maybe there are some third-party solutions, hacks, etc. You can find and try it at least.

It's probably a third party solution i've running on that other server than.

But I found the third-party db_lib rpm (https://www.rpmfind.net/linux/rpm2html/search.php?query=php70-php-pdo-dblib) for php 7.
Can you help me out on how to add this to the default plesk php 7 php-fpm?
 
It's probably a third party solution i've running on that other server than.

But I found the third-party db_lib rpm (https://www.rpmfind.net/linux/rpm2html/search.php?query=php70-php-pdo-dblib) for php 7.
Can you help me out on how to add this to the default plesk php 7 php-fpm?
Well. As far as I see, there are only 64-bit packages. All steps below can be applied only if you have 64-bit system.
You can try to do following:

1. Check version of your php7:

/opt/plesk/php/7.0/bin/php -v
PHP 7.0.7 (cli) (built: May 27 2016 10:48:24) ( NTS )

2. Upload on your server package from your link for corresponding php version. For example php70-php-pdo-dblib-7.0.7-1.fc24.remi.x86_64.rpm

3. Unpack this package with

# rpm2cpio < php70-php-pdo-dblib-7.0.7-1.fc24.remi.x86_64.rpm |cpio --extract --make-directories

4. Copy lib file to correct place and create ini file:

# cp /root/opt/remi/php70/root/usr/lib64/php/modules/pdo_dblib.so /opt/plesk/php/7.0/lib/php/modules/
# echo "extension=pdo_dblib.so" > /opt/plesk/php/7.0/etc/php.d/pdo_dblib.ini

5. Reread php handlers:

# plesk bin php_handler --reread

6. Go to Tools&Settings -> PHP Settings -> 7.0.7 FPM application and check that you have this enabled:

pP5AkCcuc6.gif


7. Check with phpinfo() that this module is correctly loaded.

Try to use it if all looks fine. But NOTE - all these steps in "dirty hack" and I do not guarantee that it will work as expected :)
But you can try at least.
 
Back
Top