PHP extension enabled but not loaded on Apache

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

For some reason, my php m.tuteehub.com/tag/extensions">extensions are enabled, but not loaded by my Apache 2.4 server. The m.tuteehub.com/tag/extensions">extensions I am missing are mbstring and fileinfo. I did the installation manually and I wish to keep it that way, mostly for m.tuteehub.com/tag/learning">learning purposes.

When I say enabled, I mean that when I run php -m in cmd, the extensions are in the list

However, when I run  from my server, these extensions are not in the list.

In my php.ini file, I have only configured the follwing (related to m.tuteehub.com/tag/extensions">extensions):

extension_dir = "ext"
extension=mbstring (uncommented the line)
extension=fileinfo (uncommented the line)

I added the following to httpd.conf:

# PHP5 module
LoadModule php7_module "C:/php/php7apache2_4.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php/"

And, in phpinfo(), I see only a single php.ini is loaded, the one from C:/php

Why would my m.tuteehub.com/tag/extensions">extensions not be available on my Apache server? Do I have to load/enable them manually in Apache somehow?

*Versions: Apache 2.4.39, PHP 7.3.4

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.