2012-10-31 55 views
0

我試着運行一個JasperServer自帶的示例PHP代碼。當我打開index.php,我得到了以下信息:JasperServer與PHP

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\pear\HTTP\Request.php on line 412

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\pear\HTTP\Request.php on line 736

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\pear\HTTP\Request.php on line 749

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\pear\HTTP\Request.php on line 794

Strict Standards: Redefining already defined constructor for class Net_URL in C:\xampp\php\pear\Net\URL.php on line 124

Notice: Undefined index: username in C:\xampp\htdocs\registration\php-sample\index.php on line 12

Notice: Undefined index: password in C:\xampp\htdocs\registration\php-sample\index.php on line 13

我怎樣才能解決這個問題?

我使用JasperServer 4.7和PHP 5.4.7(XAMPP 1.8.1)。

+1

@BogdanBurim,你肯定是在開玩笑...... – Brad

+0

正如你看到他沒有提供我們能夠解決任何代碼。 –

+0

檢查這個http://stackoverflow.com/questions/1086539/assigning-the-return-value-of-new-by-reference-is-deprecated –

回答

0

此錯誤:

Redefining already defined constructor for class Net_URL in C:\xampp\php\pear\Net\URL.php on line 124 

是因爲Net_URL PEAR包中有一個PHP4的兼容性引起的較新版本的錯誤。最好的辦法是用一些更現代的東西(例如NET_URL2)代替Net_URL--但如果您需要快速修復以獲得遺留代碼,請編輯文件URL.php(從錯誤消息中獲取位置),然後刪除或註釋掉以下塊:

/** 
* PHP4 Constructor 
* 
* @see __construct() 
*/ 
function Net_URL($url = null, $useBrackets = true) 
{ 
    $this->__construct($url, $useBrackets); 
}