title: Cron Job on cPanel not running
body: <p>I'm trying to run a cronjob in cPanel which gives me the following error:</p>
  <p><b>Fatal error</b>:  Uncaught Error: Class 'mysqli' not found in /home/example/public_html/new_facebook_csv/csv_generator1.php:180</p>
  <p>If run that file through browser by using the link example.com/new_facebook_csv/csv_generator1.php i get the right resaults without any errors, but if i try to run it with a cron job i get the error &quot;Class 'mysqli' not found&quot;.</p>
  <p>The cron job I'm running is the following:</p>
  <pre><code>php /home/example/public_html/new_facebook_csv/csv_generator1.php &gt; /home/example/public_html/new_facebook_csv/facebook.log
  </code></pre>
  <p>and here is the logs i get after the cron job:</p>
  <pre><code>X-Powered-By: PHP/7.3.22
  Content-type: text/html; charset=UTF-8
  
  &lt;br /&gt;
  &lt;b&gt;Fatal error&lt;/b&gt;:  Uncaught Error: Class 'mysqli' not found in /home/example/public_html/new_facebook_csv/csv_generator1.php:180
  Stack trace:
  #0 {main}
    thrown in &lt;b&gt;/home/example/public_html/new_facebook_csv/csv_generator1.php&lt;/b&gt; on line &lt;b&gt;180&lt;/b&gt;&lt;br /&gt;
  </code></pre>
  <p>I added the mysqli extension in the php.ini (extension=php_mysql.dll) but not luck with that.</p>
  <p>Also check if mysqli is installed to my server with this commaned:</p>
  <pre><code>php -m|grep mysql
  </code></pre>
  <p>and that was my output</p>
  <pre><code>mysqli
  mysqlnd
  pdo_mysql
  </code></pre>
  <p>which means that mysql is installed to my server</p>