I'm trying to debug ipn.php...and there may be other problems in some of the other files not directly accessed by a URL...but here's what I found so far in ipn.php:
1. This chunk of code seems to break at the second require_once:
The php error I'm getting for this is:
Now, you'll notice that this is the complete wrong directory...why does it try to grab it out of formtools/global/includes and not donate/includes??? I since changed these require_once lines to a full path to not use the $folder variable. **NOTE the folder variable seems to be special, because when I changed it to $someFolder it worked as it should...no errors. Well, none at least until this next one which I'm still trying to figure out.
2. Nevermind the line numbers here. I've added some rudimentary debugging code, so these line numbers are probably different than yours. Nonetheless you can see where the problem lies:
It doesn't seem to like $paypal["post_method"], that's line 33
Line 51 isLine 133 in the global_config.inc.php file that comes with the donate files hits the error with Line 136 in that same file is Line 175 in that same file again is
So I'm really at a loss of how to correct all these. At first I thought it was just my paths were off...but it seems to go much deeper than that.
1. This chunk of code seems to break at the second require_once:
PHP Code:
$folder = dirname(__FILE__);
require_once("$folder/includes/library.php");
require_once("$folder/includes/config.inc.php");
require_once("$folder/includes/global_config.inc.php");
The php error I'm getting for this is:
PHP Code:
Warning: require_once(/path/to/my/donate/formtools/global/includes/config.inc.php) [function.require-once]: failed to open stream: No such file or directory in /path/to/my/donate/donate/ipn.php on line 16
Fatal error: require_once() [function.require]: Failed opening required '/path/to/my/donate/formtools/global/includes/config.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /path/to/my/donate/donate/ipn.php on line 16
Now, you'll notice that this is the complete wrong directory...why does it try to grab it out of formtools/global/includes and not donate/includes??? I since changed these require_once lines to a full path to not use the $folder variable. **NOTE the folder variable seems to be special, because when I changed it to $someFolder it worked as it should...no errors. Well, none at least until this next one which I'm still trying to figure out.
2. Nevermind the line numbers here. I've added some rudimentary debugging code, so these line numbers are probably different than yours. Nonetheless you can see where the problem lies:
PHP Code:
Notice: Undefined index: post_method in /path/to/my/donate/donate/ipn.php on line 33
Notice: Undefined index: url in /path/to/my/donate/donate/ipn.php on line 51
Notice: Undefined variable: postdata in /path/to/my/donate/donate/includes/global_config.inc.php on line 133
Notice: Undefined index: scheme in /path/to/my/donate/donate/includes/global_config.inc.php on line 136
0: php_network_getaddresses: getaddrinfo failed: Name or service not known
Notice: Undefined variable: info in /path/to/my/donate/donate/includes/global_config.inc.php on line 175
Notice: Undefined index: custom in /path/to/my/donate/donate/ipn.php on line 66
It doesn't seem to like $paypal["post_method"], that's line 33
Line 51 is
PHP Code:
$result = fsockPost($paypal["url"], $_POST);
PHP Code:
$postdata .= "cmd=_notify-validate";
PHP Code:
if ($web["scheme"] == "https")
PHP Code:
return $info;
So I'm really at a loss of how to correct all these. At first I thought it was just my paths were off...but it seems to go much deeper than that.