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

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:

Related

Php can not load module phalcon

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

pdo_psql doesn't load in MAMP 4.0.1

A few hours ago I installed MAMP Pro 4.0.1 on Windows 10 so far everything was fine until I decided to uncomment pdo_psql.dll inside php.ini to create a connection from PHP to Postgresql but something went wrong, The driver doesn't load it says:
Warning: PHP Startup: Unable to load dynamic library
'C:\php\ext\php_pdo_pgsql.dll' - The module can't be found.
in Unknown on line 0 PHP 7.1.7 (cli) (built: Jul 25 2017 09:24:45) ( ZTS
MSVC14 (Visual C++ 2015) x86 )Copyright (c) 1997-2017 The PHP GroupZend
Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
I found the issue. the thing was that the extention dir wasn't uncommented by default settings so I had to uncomment it in php.ini file.
extension_dir = "ext"

PHP Warning: Unable to load dynamic library '/usr/lib64/php/modules/solr.so' undefined symbol: php_json_decode_ex in Unknown on line 0

After success install I'm getting the below error
NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/solr.so' - /usr/lib64/php/modules/solr.so: undefined symbol: php_json_decode_ex in Unknown on line 0
can any one help me out in this Issue ?
my server details are as:-
php : PHP 5.4.16 (cli) (built: Aug 11 2016 21:24:59)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologie
nginx: nginx version: nginx/1.10.1
When I'm executing this php -v
I'm getting the below message:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/solr.so' - /usr/lib64/php/modules/solr.so: undefined symbol: php_json_decode_ex in Unknown on line 0
PHP 5.4.16 (cli) (built: Aug 11 2016 21:24:59)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
After doing a lot of experiments I finally fixed the issue. The solution is as below:
cd /etc/php.d/
And create a file named solr.ini.
Added this line:
extension=solr.so
And now I have to remove the above extension from the php.ini file and restart php-fpm
That's all, worked for me.
Still got error. Realized you need to load solr.so after json.so, so the json symbols are in memory before solr is loaded, otherwise solr fails to load.
On centos and Red Hat Enterprise Server simply give solr the highest number out of the numbered ini files in /etc/php.d. You may just need to make it load after json.ini, but I'm loading it last and now it works. I named it 60-solr.ini and it started working.

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

PHP Unable to load dynamic library '/usr/lib64/php/modules/module.so

php --version
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/module.so' -
/usr/lib64/php/modules/module.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.3.3 (cli) (built: Dec 11 2013 03:29:57)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
I check all file in : /etc/php.d/
It was mcrypt.ini with this line
extension=module.so
but module.so not exist in /usr/lib64/php/modules/
I reinstalled mcrypt with yum install mcrypt and the result I have mcryp.so in /usr/lib64/php/modules/
so now just correct the line in mcrypt.ini and make
extension=mcrypt.so
Now all is ok

Categories