1

I run a php -v script and get this error: not found this session.so How to install this module?

PHP Warning:  PHP Startup: Unable to load dynamic library 'session.so' (tried: /usr/lib/php/20170718/session.so (/usr/lib/php/20170718/session.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/session.so.so (/usr/lib/php/20170718/session.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.2.31-1+0~20200514.41+debian9~1.gbpe2a56b (cli) (built: May 14 2020 08:33:26) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.31-1+0~20200514.41+debian9~1.gbpe2a56b, Copyright (c) 1999-2018, by Zend Technologies

enottrue
  • 11
  • 2

1 Answers1

0

Are you sure you don't have this library already installed? It may be because PHP does not have permissions to read that file.

Try going to the directories that show in the error and look for it, if you'll find it change it's permissions temporarily to 777 with below command and see if it works.

chmod 777 session.so

If that doesn't work you may try to find the PHP binary file (should be in /usr/bin) and change it's permissions too.

Nacio
  • 31
  • 2
  • 8