Re: GetCampaigns.php working in Command line but not not in browser

97 views
Skip to first unread message

Alan Coleman

unread,
Jan 30, 2013, 9:08:33 AM1/30/13
to adwor...@googlegroups.com
If comment out the return line in the following, then the script works:

// Don't run the example if the file is being included.
if (__FILE__ != realpath($_SERVER['PHP_SELF'])) {
  //return;
}

Does anyone know why this is?

Many thanks

On Tuesday, January 29, 2013 6:07:36 PM UTC, Alan Coleman wrote:
Hello,

I'm running aw_api_php_lib_3.2.2 on localhost

I'm able to run GetCampaigns.php in the command line and return my data from Adwords.

However running the same file through a browser returns a blank screen and no errors.

Does anyone have any ideas?

Many thanks


Evgeniy Bogdanov

unread,
Feb 4, 2013, 2:42:43 AM2/4/13
to adwor...@googlegroups.com
Probably your server configuration uses FastCGI or something else SAPI, which not initializes PHP_SELF correctly.

If this is possible can you post var_dump($_SERVER); here?

среда, 30 января 2013 г., 18:08:33 UTC+4 пользователь Alan Coleman написал:

Sage Lewis

unread,
Sep 27, 2014, 9:47:04 AM9/27/14
to adwor...@googlegroups.com
Commenting out these lines instantly made my script run in a browser. 
Reply all
Reply to author
Forward
0 new messages