Once upon a time my apache+php+wso/wsf-php were all happily working. A bad day I had to restart the apache2 server and from that point on every time my php code creates WSService or WSClient, apache returns "class not found".
From /var/log/apache2/error.log the problem is
PHP Warning: PHP Startup: wsf: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Then I tried (several times) to recompile the wsf-php framework following its README, but it creates the following dir: /usr/lib/php5/20060613+lfs
and already from the dir name you can see the wrong version.
What should I do to use wso-wsf php working again?
Additional infos:
gcc (Debian 4.6.3-1) 4.6.3
PHP 5.4.0-3 (cli) (built: Mar 22 2012 07:59:57)
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
Thanks and Ciao,
Marco
Related
We have a requirement that needs to downgrade PHP from 8.1 to 7.1 in our Ubuntu 18 server.
sudo update-alternatives --set php /usr/bin/php7.1
After the downgrade, we're seeing PHP Startup error everytime we check php -v
Below is the exact error text:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/propro.so' - /usr/lib/php/20160303/propro.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/raphf.so' - /usr/lib/php/20160303/raphf.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/http.so' - /usr/lib/php/20160303/http.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 7.1.33-47+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jun 27 2022 08:15:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.33-47+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
The missing libraries are really not found in the said directory as I checked.
/usr/lib/php/20160303
We have tried reinstalling as suggested from other forum with same error.
sudo apt-get install --reinstall `dpkg -l | grep 'ii php7.1' | awk '{ printf($2" "); next}'`
It works for them but not in ours.
I hope I can get help here. Thanks in advance.
By the way, I'm not a Linux and PHP developer. Just starting getting into it.
--reinstall will only reinstall the things that are installed, but it looks like you actually removed a number of modules. The propro, raphf, and http modules are not standard and are not installed by default. If you don't actually need/use them, you can just disable them so that they don't try to load:
phpdismod propro raphf http
However, if your app requires these modules, you'll need to explicitly add them:
apt install php7.1-propro php7.1-raphf php7.1-http
I successfuly installed phalcon 4.0 framework. Also I check phpinfo() on browser and there is phalcon, but if check php modules, there is not the palcon.
Also if I check php module by this command,
php -m | grep phalcon
I get this php warning:
Cannot load module 'phalcon' because required module 'psr' is not loaded in Unknown on line 0
I tried add extension=psr.so to php.ini, but it still not worling.
I also create 50-phalcon.ini file on /etc/php/7.3/apach2/conf.d folder, still not working.
Please help me, I have no idea how to solve this problem. Please help!
You have installed v4 which requires the PSR extension to be loaded first.
Have a look at this article: https://docs.phalconphp.com/4.0/en/upgrade
In short psr.so has to be present in your system and loaded before Phalon.
#Ubuntu
$ zephir -V
PHP Warning: Cannot load module 'phalcon' because required module 'psr' is not loaded in Unknown on line 0
Zephir 0.12.12 by Andres Gutierrez and Serghei Iakovlev (1094502)
php -v
PHP Warning: Cannot load module 'phalcon' because required module 'psr' is not loaded in Unknown on line 0
PHP 7.2.24-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Oct 24 2019 18:29:11) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.24-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
PS: I extended psr.so and configured it to php.ini
But it doesn't compile when running zephir
I recently upgraded my VPS PHP version to 7.0.3 and everything seems to work fine including php -v which shows:
(I know I'm getting some warnings but those shouldn't be anything serious)
Failed loading /usr/local/lib/ioncube/ioncube_loader_lin_5.3.so: /usr/local/lib/ioncube/ioncube_loader_lin_5.3.so: undefined symbol: execute
PHP Warning: PHP Startup: suhosin: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20151012
These options need to match
in Unknown on line 0
PHP 7.0.3 (cli) (built: Feb 14 2016 00:24:25) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
I'm using directadmin and so I created a file index.php in the public_html and this is its content:
<?php
error_reporting(E_ALL);
echo md5("sometext");
phpinfo();
?>
The output is only:
a29e90948f4eee52168fab5fa9cfbcf8
Why are md5 and echo working but not phpinfo???
I'm on Centos and using PHP 7.0.3 with Apache (httpd) 2.4.9
phpinfo() is disabled for free accounts on that particular hosting provider
if youhave access to php.ini
Go to the php.ini and remove phpinfo from
disable_functions =...,phpinfo,....
save and restart webserver
I want to install Composer on my Ubuntu 14.04LTS. But during installation I got this:
Some settings on your machine make composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The OpenSSL extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
Then in php.ini I remove semicolon';' in line ;extension=php_openssl.dll
After this I've got:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.6.2 (cli) (built: Oct 29 2014 06:55:23)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
Where can I get this library?
You use php.ini from windows machine. Use default from package manager. For Ubuntu apt-get.
I've just upgraded from PHP 5.3.10 to 5.4, now I get the following when trying to initialise php on the command line in windows:
C:\php5.4>php -v
PHP Warning: PHP Startup: sqlsrv: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
PHP 5.4.0 (cli) (built: Feb 29 2012 19:06:50)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
This should be a straight swap. I've downloaded the NTS version of php (same as 5.3.10 version) & referenced the php_sqlsrv_53_nts_vc9.dll (v2) of sqlsrv.
Out of interest I also have the sqlsrv v3.0 extension, which I tried to load in and get the same error.
Has anyone else had this issue, or know of how to fix it?
TIA
D
It looks like the version of the dll you have is for PHP 5.3
I'm not sure if there is a version out for 5.4 yet, but you can check the PHP Extensions for Windows page to see.
The system requirements page from Microsoft appears to indicate not (although it may not have been updated yet).
Only you need this link: https://www.microsoft.com/en-us/download/details.aspx?id=20098 the version 3.0
Regards