0

I have a php script calling an https api in ubuntu. When I run the script I get the following error:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_openssl.dll' - /usr/lib/php/20151012/php_openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: require_once(../functions.php): failed to open stream: No such file or directory in /var/www/push.php on line 2
PHP Fatal error: require_once(): Failed opening required '../functions.php' (include_path='.:/usr/share/php') in /var/www/push.php on line 2

SSL is enable in php (as seen on the phpinfo() page). On the server I have the following php's: 5.5/ 5.6/ 7.0/ 7.1/ 7.2/

Any ideas how may I fix this?

I am trying to fix my script so it would run correct.

The failed to open file is a strange error since the file exist and can be opened. The function.php file is the one containing the call to the https API. So I think PHP is throwing a strange error due to the warning.

Edit2: The path /usr/lib/php/20151012/ is owned by root. I am running the script with root.

functions.php is in the correct folder.

  • You have two warnings and an error. Which one are you trying to fix? – Andrew Schulman Jan 27 '18 at 15:14
  • I added an edit. I am trying to fix them all. – sebastian.roibu Jan 27 '18 at 20:29
  • First one, most of the times because of not having the correct permission to the folder. Make sure the user that "run the script" owns the /usr/lib/php folder and content within. Second one, is the functions.php file in /var/ folder? The third one seems to be same as first, it might not. – Praveen Premaratne Jan 28 '18 at 13:56
  • Added a new edit. Edit2 – sebastian.roibu Jan 29 '18 at 10:20
  • Wait... why is your Ubuntu server asking for DLL files??? Did you copy your php.ini file from a Windows machine? – Oldskool Jan 29 '18 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.