Page 1 of 1

GD apache extension is not working when script is inside vesta cp web directory

Posted: Mon Apr 14, 2025 1:38 pm
by mav1
Hi everyone.

I have the gd.so extension installed on my server, it works well OUTSIDE vesta web director, for example, in /home/admin/web/soedomain/public_html/somescript.php. Function imagecreatetruecolor() and others work fine.File gd.so is placed in /usr/lib64/php/modules folder, also i see "20-gd.ini" in /etc/php.d/ folder with "extension=gd" text inside, also in command line i can run "php -i | grep -i --color gd" and see it is working.

But for some reason i want to use this php extension also in some folder INSIDE vesta web directory, like /usr/local/vesta/web/somecustomdirectory/somescript.php. And is does not work here - it will show error 500 and function imagecreatetruecolor() is undefined and get_extension_funcs("gd") will return false.

I see that there is a folder /usr/local/vesta/php/lib/php/extensions/no-debug-non-zts-20131226, i copied here the gd.so file, but no result. Also phpinfo() inside this vesta web folder shows info about loaded php.ini file :

Loaded Configuration File /usr/local/vesta/php/lib/php.ini
Scan this dir for additional .ini files (none)


Inside this php.ini file there is no information about loading extension gd.so. I added "extension=gd" here but no luck...

Php -v shows that php version is 8.1, OS is CentOs + vesta installed.

How can i solve this problem?