I have image creating php script . It works fine when i access it from the browser . But when it is called from a shell script it shows the following error .
PHP Fatal error: Call to undefined function imagecreate()
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
PHP CLI probably doesn’t use the same configuration file than the browser one. So it doesn’t load the GD library.
You could either force him to use the same .ini file :
Or add the following line in your PHP CLI configuration file :