0

I'm writing a script in PHP, which contains this line:

set_include_path(dirname(__FILE__). '/../../../google-api-php-client-1-master/src' . PATH_SEPARATOR . get_include_path());

Locally, in my PhpStorm, the code works. However, when I try run this on linux, I get this warning:

Warning: get_include_path() has been disabled for security reasons in /home/web/scripts/AdSense/googleads-adsense-examples-master/php-clientlib-1.x/v1.x/AdSense_Functions.php on line 16

And after that warning, the script just stops running.

Google said that it might say that in php.ini file I have this function under the "disabled_functions" section, but this is what I have in the .ini file:

; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
; http://php.net/disable-functions
disable_functions =

So, if anyone has another idea about why I get this message and how to fix it - I'd love to hear it :) Thank you!

Bramat
  • 979
  • 4
  • 24
  • 40
  • Try using php_info(); in a test php file and see the Loaded Configuration File row. It will tell you the php.ini it is using. Maybe it is different. – Ghulam Ali May 02 '16 at 14:04
  • @GhulamAli So weird, I got this message from linux: Warning: phpinfo() has been disabled for security reasons in /home/web/scripts/presto/load_adsense_stats.php on line 5. But on PhpStorm it runs. – Bramat May 02 '16 at 14:25
  • Do a search in your linux: find -name "php.ini" and see if you see any other php.ini files – Ghulam Ali May 02 '16 at 14:31

0 Answers0