title: Apache isn't loading PHP extensions
body: <p>I installed(manually) Apache and PHP. I activated the curl extension from php.ini and It's working fine in PHP-CLI, but when I access PHP through browser with the help of Apache, curl(and any other) extension giving me errors that "{extension_function} is undefined"</p>
  
  <p>PHP <code>7.2-64bit</code></p>
  
  <p>Apache <code>2.4</code></p>
  
  <pre><code>// php.ini
  extension_dir = "/server/php/ext"
  ...
  extension=bz2
  extension=curl
  extension=fileinfo
  ;extension=gd2
  ;extension=gettext
  ;extension=gmp
  ;extension=intl
  ;extension=imap
  ;extension=interbase
  ;extension=ldap
  ;extension=mbstring
  ;extension=exif      ; Must be after mbstring as it depends on it
  extension=mysqli
  ;extension=oci8_12c  ; Use with Oracle Database 12c Instant Client
  ;extension=odbc
  extension=openssl
  ;extension=pdo_firebird
  extension=pdo_mysql
  ;extension=pdo_oci
  ;extension=pdo_odbc
  ;extension=pdo_pgsql
  ;extension=pdo_sqlite
  ;extension=pgsql
  ;extension=shmop
  
  // httpd.conf    
  LoadModule php7_module "/server/php/php7apache2_4.dll"
  &lt;IfModule php7_module&gt;
      AddHandler application/x-httpd-php .php
      AddType application/x-httpd-php .php .html
      PHPIniDir "/server/php"
  &lt;/IfModule&gt;
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>I'm testing using this <code>var_dump(function_exists('curl_init'));</code> line of code ... 
  when I run this line from php-cli, It's returning true.
  When I run this line from a php file using browser, It's returning false.</p>
  
  <p><a href="https://i.stack.imgur.com/W2HOW.png" rel="nofollow noreferrer">From PHP-CLI</a></p>
  
  <p><a href="https://i.stack.imgur.com/zbDqC.png" rel="nofollow noreferrer">From browser</a></p>
  
  <p><a href="https://i.stack.imgur.com/Z0Xbf.png" rel="nofollow noreferrer">PHP File</a></p>
  
  <p><a href="https://i.stack.imgur.com/ssl4R.png" rel="nofollow noreferrer">Error</a></p>
  
  <p><strong>Solved</strong></p>
  
  <blockquote>
    <ol>
    <li>I used absolute paths everywhere(no relative path)(used forward slashes)</li>
    <li>Added PHP to environment variables. I don't know why, but without this extensions aren't loading. I think php7 module for Apache requires php in environment.</li>
    <li>Restarted the computer(Apache restart won't work)</li>
    </ol>
  </blockquote>
  
  <p>I hope someone will find this helpful.</p>
  
  <p>Thank you for the help.</p>