cvs: pear-core(PEAR_1_4) /OS Guess.php
| From: | Pierre-Alain Joye | Date: | Fri, 16 Jun 2006 11:41:16 +0000 |
| Subject: | cvs: pear-core(PEAR_1_4) /OS Guess.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-4815@lists.php.net to get a copy of this message | ||
pajoye Fri Jun 16 11:41:16 2006 UTC
Modified files: (Branch: PEAR_1_4)
/pear-core/OS Guess.php
Log:
- MFH: open_basedir fix
http://cvs.php.net/viewcvs.cgi/pear-core/OS/Guess.php?r1=1.20&r2=1.20.2.1&diff_format=u
Index: pear-core/OS/Guess.php
diff -u pear-core/OS/Guess.php:1.20 pear-core/OS/Guess.php:1.20.2.1
--- pear-core/OS/Guess.php:1.20 Wed Oct 26 19:33:03 2005
+++ pear-core/OS/Guess.php Fri Jun 16 11:41:16 2006
@@ -16,7 +16,7 @@
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Guess.php,v 1.20 2005/10/26 19:33:03 cellog Exp $
+ * @version CVS: $Id: Guess.php,v 1.20.2.1 2006/06/16 11:41:16 pajoye Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since PEAR 0.1
*/
@@ -202,10 +202,12 @@
return $glibc; // no need to run this multiple times
}
include_once "System.php";
- if (!file_exists('/usr/bin/cpp') || !is_executable('/usr/bin/cpp')) {
+ if (!@file_exists('/usr/bin/cpp') || !@is_executable('/usr/bin/cpp')) {
// Use glibc's <features.h> header file to
// get major and minor version number:
- if ($features_file = @fopen('/usr/include/features.h', 'rb') ) {
+ if (@file_exists('/usr/include/features.h') &&
+ @is_readable('/usr/include/features.h')) {
+ $features_file = fopen('/usr/include/features.h', 'rb');
while (!feof($features_file)) {
$line = fgets($features_file, 8192);
if (!$line || (strpos($line, '#define') === false)) {