When I run the following script:
<html>
<head>
<title>Example</title>
</head>
<?php
echo get_include_path(), "\n";
var_dump(is_file('/usr/lib/php/HTTP/OAuth.php'));
?>
<body>
</body>
</html>
I get the following output on the rendered page:
.:/php/includes:/usr/lib/php:/usr/lib/php/PEAR bool(true)
However, if I run this script:
<html>
<head>
<title>Example</title>
</head>
<?php
echo get_include_path(), "\n";
var_dump(is_file('/usr/lib/php/HTTP/OAuth.php'));
#### NEW SECTION ####
if (include(''/usr/lib/php/HTTP/OAuth.php'') == 'OK') {
echo 'INCLUDE OK, "\n"';
} else { echo 'INCLUDE FAILED \n' ; }
#### END NEW SECTION ####
?>
<body>
</body>
</html>
I get the following output:
.:/php/includes:/usr/lib/php:/usr/lib/php/PEAR bool(true) INCLUDE FAILED \n
Why would the include fail if the file is said to exist already?
uname output in case it is helpful:
Darwin 70cd606c7510 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
Thank you for your help.
John
''/usr/lib/php/HTTP/OAuth.php''is a syntax error. Are you sure that's it?