0

I installed PHP extension INTL using Homebrew.

This is my code to test it

if (extension_loaded('intl')) {
    die('SUCCESS! The intl extension is enabled!');
} else {
    die('OOPS! The intl extension is not enabled!');
} 

In CLI after executing this code I get SUCCESS! The intl extension is enabled!

But in browser OOPS! The intl extension is not enabled!

I think it might be a permission problem. I don't use MAMP.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Piotrek Zatorski
  • 494
  • 5
  • 15

1 Answers1

3

Ensure you edited all php.ini used. In most distros cli, HTTPd module and CGI version have separate php.ini file. Simplest way to deal with it is to run

<?php
phpinfo();

and check what php.ini it points to. And then edit as needed.

I think it might be a permission problem

httpd's error log as good start to confirm that, yet don't think it's the culprit in your case.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141