0

I need mbstring for something I'm doing. I've followed all the php.ini change directions to enable it and still when I do "php -m" the module is not there.

  1. The php_mbstring.dll file is in the ext folder
  2. I have two php.ini files, one for dev and prod
  3. in both I've remove the semi colon and enabled "extension = php_mbstring.dll"
  4. Also in both I've un commented all the settings under [mbstring]

Restarted my computer and nothing? Is there a way to add it in windows command like they have in linux with "sudo apt-get mbstring"?

Also note my ini files just had ";extension=mbstring" which I first uncommented in the ini's but that did not work so I tried adding the whole "extension = php_mbstring.dll" and as noted above this did not work.

Why??

Dylano236
  • 305
  • 3
  • 15
  • did you see that note : First, you need to install that specific extension, i.e. place its DLL file "php-mbstring.dll" into the "/php/ext/" directory if it is not already present there. When you do that, make sure you have the correct build of DLL file. 32-bit, thread-safe PHP binary, built using VC9 for example, would only work with DLL files built using exact same tools and configuration: 32-bit, using VC9, with thread-safety turned on. And of course PHP API version also needs to match. If it doesn’t, once you restart the web server, you will receive ’Error 500 - Server error’ message. – Mohammed Chaaraoui Feb 27 '23 at 16:53
  • Yes as per my #1 on the list, the php_mbstring.dll file did come with the php installation. This is php 8.2.3 – Dylano236 Feb 27 '23 at 17:01
  • thing is I don't have a web server. It's kind of strange I'm running vagrant but in order to do this migration on codeigniter 4 I need php on my main machine – Dylano236 Feb 27 '23 at 17:03
  • The vagrant linux box has mbstring but not my windows install – Dylano236 Feb 27 '23 at 17:03
  • and this extention is enabled ? extension_dir = "path\php\ext" – Mohammed Chaaraoui Feb 27 '23 at 17:04
  • I don't have xampp, that's for mac right? I have Mamp, but I don't know if I need mamp to have php work correctly right? that's just a development stack – Dylano236 Feb 27 '23 at 17:06
  • no , mamp or xampp just for ensure that the php work correctly if you're not using the server – Mohammed Chaaraoui Feb 27 '23 at 17:12
  • 1
    if you can see this https://sebhastian.com/mbstring-missing-php/ maybe can help you – Mohammed Chaaraoui Feb 27 '23 at 17:13
  • 1
    Thanks, it actually worked when I ssh'ed into my vagrant box. So that's a work around. Still would be nice to do from my main terminal but for now I have a work around. I apricate your help and will read this article. – Dylano236 Feb 27 '23 at 17:27

1 Answers1

-1

php 8.2.3? May be depricated?

Replacing the Mbstring-provided conversion functions with the built-in dedicated functions avoids the deprecation notice, with the added benefit of the replacing functions being built-in to PHP core itself, without having to require the Mbstring extension. - https://php.watch/versions/8.2/mbstring-qprint-base64-uuencode-html-entities-deprecated#base64

Dimitry
  • 128
  • 1
  • 1
  • Yea well my CodeIgniter 4 claims to need mbstring to use php spark. So I guess at this point since 8.2 is trying to depreciate it, I should uninstall it and install an older version. – Dylano236 Feb 27 '23 at 20:36