Re: Re: PHP Issue - for the sysadmins

From: Odhiambo Washington <odhiambo_at_gmail.com>
Date: Tue, 26 Dec 2023 09:09:18 UTC
On Mon, Dec 25, 2023 at 6:48 PM Paul Procacci <pprocacci@gmail.com> wrote:

>
>
> On Mon, Dec 25, 2023 at 10:34 AM lain. <lain@fair.moe> wrote:
>
>> On 2023年12月25日 15:24, the silly Odhiambo Washington claimed to have said:
>> > On Mon, Dec 25, 2023 at 3:12 PM Odhiambo Washington <odhiambo@gmail.com
>> >
>> > wrote:
>> > > You are right to an extent. I am using php-fpm for the site.
>> > > I thought that php-fpm should inherit all modules loaded by PHP. No?
>> > > How then do I tell php-fpm to do it?
>> > >
>> >
>> > Just to add. This is FreeBSD and there is only one php.ini file -
>> > /usr/local/etc/php.ini
>> >
>>
>> Of course I know you're using FreeBSD, considering you're asking this in
>> a FreeBSD mailing list, so totally not assuming you're using Windows 98
>> or something.
>>
>> I installed PHP on my FreeBSD server (pkg install php83) just to check.
>> It does indeed seem to differ a little bit from Linux (I don't use PHP
>> anymore, I switched to Go some time ago after a solid 2 decades of
>> coding in PHP).
>> However, could you check both your CLI output and web output on what ini
>> path it's returning?
>>
>> --
>> lain.
>>
>> Did you know that?
>> 90% of all emails sent on a daily basis are being sent in plain text, and
>> it's super easy to intercept emails as they flow over the internet?
>> Never send passwords, tokens, personal information, or other volunerable
>> information without proper PGP encryption!
>>
>> If you're writing your emails unencrypted, please consider sending PGP
>> encrypted emails for security reasons.
>> You can find my PGP public key at: https://fair.moe/lain.asc
>>
>> Every good email client is able to send encrypted emails.
>> If yours can't, then you should consider switching to a secure email
>> client, because yours just sucks.
>>
>> My recommendations are Claws Mail or NeoMutt.
>> For instructions on how to encrypt your emails:
>> https://unixsheikh.com/tutorials/gnupg-tutorial.html
>>
>>
> To further this ...  lain is 100% on the right track.
>
> To show the path to the ini via the command line:
>
> php -i
>
> To show the path to the ini via web:
>
> <?php phpinfo(); ?>
>
> I'm betting they're different as already has been stated.
>
> I too don't use php anymore, now I just stick with perl.  ;)
>


[12:01 ~ ]$ php -i
phpinfo()
PHP Version => 8.2.14

[snip]
Server API => Command Line Interface
Virtual Directory Support => enabled
Configuration File (php.ini) Path => /usr/local/etc

*Loaded Configuration File => /usr/local/etc/php.iniScan this dir for
additional .ini files => /usr/local/etc/php*
Additional .ini files parsed => /usr/local/etc/php/ext-10-opcache.ini,
/usr/local/etc/php/ext-18-session.ini,
/usr/local/etc/php/ext-20-apcu.ini,
/usr/local/etc/php/ext-20-bcmath.ini,
/usr/local/etc/php/ext-20-bz2.ini,
/usr/local/etc/php/ext-20-calendar.ini,
/usr/local/etc/php/ext-20-ctype.ini,
/usr/local/etc/php/ext-20-curl.ini,
/usr/local/etc/php/ext-20-dom.ini,
/usr/local/etc/php/ext-20-exif.ini,
/usr/local/etc/php/ext-20-ffi.ini,
/usr/local/etc/php/ext-20-fileinfo.ini,
/usr/local/etc/php/ext-20-filter.ini,
/usr/local/etc/php/ext-20-ftp.ini,
/usr/local/etc/php/ext-20-gd.ini,
/usr/local/etc/php/ext-20-gettext.ini,
/usr/local/etc/php/ext-20-gmp.ini,
/usr/local/etc/php/ext-20-iconv.ini,
/usr/local/etc/php/ext-20-imagick.ini,
/usr/local/etc/php/ext-20-intl.ini,
/usr/local/etc/php/ext-20-ldap.ini,
/usr/local/etc/php/ext-20-mbstring.ini,
/usr/local/etc/php/ext-20-mysqli.ini,
/usr/local/etc/php/ext-20-pdo.ini,
/usr/local/etc/php/ext-20-pgsql.ini,
/usr/local/etc/php/ext-20-phar.ini,
/usr/local/etc/php/ext-20-posix.ini,
/usr/local/etc/php/ext-20-pspell.ini,
/usr/local/etc/php/ext-20-simplexml.ini,
/usr/local/etc/php/ext-20-soap.ini,
/usr/local/etc/php/ext-20-sockets.ini,
/usr/local/etc/php/ext-20-sodium.ini,
/usr/local/etc/php/ext-20-sqlite3.ini,
/usr/local/etc/php/ext-20-sysvmsg.ini,
/usr/local/etc/php/ext-20-sysvsem.ini,
/usr/local/etc/php/ext-20-sysvshm.ini,
/usr/local/etc/php/ext-20-tidy.ini,
/usr/local/etc/php/ext-20-tokenizer.ini,
/usr/local/etc/php/ext-20-xml.ini,
/usr/local/etc/php/ext-20-xmlwriter.ini,
/usr/local/etc/php/ext-20-zip.ini,
/usr/local/etc/php/ext-20-zlib.ini,
/usr/local/etc/php/ext-30-imap.ini,
/usr/local/etc/php/ext-30-memcache.ini,
/usr/local/etc/php/ext-30-memcached.ini,
/usr/local/etc/php/ext-30-pdo_mysql.ini,
/usr/local/etc/php/ext-30-pdo_pgsql.ini,
/usr/local/etc/php/ext-30-pdo_sqlite.ini,
/usr/local/etc/php/ext-30-redis.ini,
/usr/local/etc/php/ext-30-xmlreader.ini,
/usr/local/etc/php/ext-30-xsl.ini

 So it's using the same config as shown with <?php phpinfo(); ?> via the
web.


-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
[How to ask smart questions:
http://www.catb.org/~esr/faqs/smart-questions.html]