Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lat4732's avatar
Level 12

Reinstalled xampp and got an error "GD Library extension not available with this PHP installation"

Hello everyone! Just reinstalled my XAMPP and when I installed my app and tried to upload image got this error:

GD Library extension not available with this PHP installation

Any idea how to fix this?

0 likes
16 replies
Snapey's avatar

Its a php extension. Its probably already installed and just needs enabling in your php.ini file by uncommenting the line.

Its probably 8 years since I used xampp and there may be a UI to enable and disable extensions?

Tray2's avatar

I don't undertstand why people still are using xampp, not that there is something wrong with xampp, its just that there are so many better alternatives.

aiMeta's avatar

@Tray2 I agree with your statement.

I have been using XAMPP since the start of my dev road (approx 1 year now) and I find XAMPP often bugzzzz out (uninstall & reinstall - which often is the best solution) --- the only reason i keep it around is for quick view of someones build or a git repo so see if its actually working.

I have moved over to Homestead and find it wonderful to use - takes a little time to set up a new project but once you get the swing of it all is good... just not for quick view purposes. Only for actual projects that one will be working on.

I have tried almost every other possible Localhost serve set up like Laragon, UwAmp, Wamp.... etc etc.. and Homestead seems to be the best fit for me. (with Xampp in the background for a quick preview)

Mubashar007's avatar

@Tray2 is there any way to upgrade and downgrade these platforms' PHP versions according to the dev requirements?

Tray2's avatar

@Mubashar007 Yes, that are regular linux servers, so you can install whatever you want, and if you choose docker, you have an individual server for each project

anilkumarthakur60's avatar

@laralex go to xampp->php> php.ini( also called php configuration setting in type ) this file will be located right after php.exe

search for ;extension=gd remove(uncomment) ; as extension=gd save it should work if not then restart xampp

2 likes
mihrarm's avatar

did you find any solution for this? i have the same problem and nothing helps me

dev-mo's avatar

@mihrarm i had the same issue and i solved it:

enable gd in php.ini restart apache and mysql restart vscode php artisan serve

now it should work

Please or to participate in this conversation.