-
Notifications
You must be signed in to change notification settings - Fork 339
/
Copy pathtroubleshooting.php
57 lines (42 loc) · 1.35 KB
/
troubleshooting.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
ini_set('display_errors', true);
error_reporting(E_ALL);
header('Content-Type: text/plain');
require_once dirname(__FILE__) . '/../../../QuickBooks.php';
$urls = array(
QuickBooks_IPP_IntuitAnywhere::URL_DISCOVERY_SANDBOX,
QuickBooks_IPP_IntuitAnywhere::URL_DISCOVERY_PRODUCTION,
);
for ($i = 0; $i <= 1; $i++)
{
foreach ($urls as $url)
{
ob_start();
$out = fopen('php://output', 'w');
$params = array(
CURLOPT_RETURNTRANSFER => true,
);
$ch = curl_init($url);
curl_setopt_array($ch, $params);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_STDERR, $out);
if ($i == 1)
{
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
}
$response = curl_exec($ch);
fclose($out);
$debug = ob_get_clean();
print('Trying to hit URL: ' . $url . "\n\n");
print(' Did we disable SSL checks? ' . trim(var_export((bool) $i, true)) . "\n");
print($debug);
print("\n\n");
print($response);
print("\n\n\n\n\n\n\n");
}
}
print('php version: ' . phpversion() . "\n");
print('mcrypt extension? ' . var_export(function_exists('mcrypt_module_open'), true) . "\n");
print(' mcrypt module rijndael-256? ' . var_export(mcrypt_module_open('rijndael-256', '', 'ofb', ''), true) . "\n");
print('curl extension? ' . var_export(function_exists('curl_init'), true) . "\n");