2

I am using wkhtmltopdf for making a pdf of a page. My code executes the shell to run a command using this wkhtmltopdf library. Everything works fine in my wamp server but when the code runs on my web-server it does not work and gives the following error:

Warning: shell_exec() has been disabled for security reasons in /home/pssptech/public_html/.../cert.php on line 272


I think that the php is running on safe mode on the server that's why the shell execution is disabled. But the main problem is I am unable to find the php.ini file on my remote web-server.
Can you tell me where can I find the config file so that I can disable the safe mode?
Thanks in advance.

Bushra Shahid
  • 123
  • 1
  • 1
  • 5

1 Answers1

1

Edit your php.ini and set the variable safe_mode to off.

safe_mode = Off

To find php.ini in linux run

find / -name php.ini -print

Hex
  • 1,949
  • 11
  • 17