Php can not load module phalcon - php

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

Related

why there are 2 php directories in C:\ and C:\xampp

I have 2 php directories. One in C:/ and the other in C:/xampp .
Have I installed php twice or is this normal.
I'am also getting a warning message when I try any php command
php -version
PHP Warning: Module 'fileinfo' already loaded in Unknown on line 0
Warning: Module 'fileinfo' already loaded in Unknown on line 0
PHP 7.4.3 (cli) (built: Feb 18 2020 17:29:46) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
Now if I want to edit the php.ini I can't decide which file to edit because in both extension=fileinfo is uncommented
You can open php.ini from below:

All php functions work but phpinfo

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

Build PHP with PHPfarm errors with loaders (ioncube and source guardian)

I can't configure ioncube or source guardian loaders with phpfarm. I thinks that is for "(DEBUG)" in php -v but I do not know how to. I need help with this issue.
My php -v:
root#martin:/opt/phpfarm/src# /opt/phpfarm/inst/php-5.3.22/bin/php -v
Cannot load the ionCube PHP Loader - it was built with configuration API220090626,NTS, whereas running engine is **API220090626,NTS,debug**
PHP Warning: PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with build ID=API20090626,NTS
PHP compiled with build **ID=API20090626,NTS,debug**
These options need to match
in Unknown on line 0
Warning: PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with build ID=API20090626,NTS
PHP compiled with build ID=API20090626,NTS,debug
These options need to match
in Unknown on line 0
PHP 5.3.22 (cli) (built: Apr 19 2015 17:43:14) **(DEBUG)**
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
Although I can only answer for the ionCube Loaders, I presume the same applies to the Source Guardian Loaders.
PHP extensions need to match the exact same version, including release/debug status, thread-safety and PHP version. You are therefore right in that the ionCube Loaders will not work on PHP compiled with debug symbols. ionCube does not provide Loaders for this scenario, so your only solution is to build PHP as release version.
Do note that building PHP with debug symbols will most likely not help you debug your PHP scripts, if that is your goal.

unable to download dynamic library

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.

wso-wsf php Fatal error: Class 'WSService' not found

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

Categories