#33181 [NEW]: SimpleXML causes __autoload error inside of autoloaded class file.

2005-05-29 Thread nickolasnikolic at hotmail dot com
From: nickolasnikolic at hotmail dot com
Operating system: Windows
PHP version:  5.0.4
PHP Bug Type: SimpleXML related
Bug description:  SimpleXML causes __autoload error inside of autoloaded class 
file.

Description:

Uncommenting the last line will produce an odd error affilliated with
__autoload:

Warning: __autoload(simplexml_load_file.class.php) [function.--autoload]:
failed to open stream: No such file or directory in C:\Program
Files\SpikeSource\oss\httpd\htdocs\blindcore\classes\test.usage.only.php
on line 4

Fatal error: __autoload() [function.require]: Failed opening required
'simplexml_load_file.class.php' (include_path='.;C:\dev\php5\pear') in
C:\Program
Files\SpikeSource\oss\httpd\htdocs\blindcore\classes\test.usage.only.php
on line 4

The server is spikesource's stack. If you need more info, please email.

I hope that it helps!

Reproduce code:
---
Source class:
  public function sendFullRequest( $sendFullRequestURL = NULL ){
// If the message to send to Amazon has been set.
if( $sendFullRequestURL ){
// Then sent the request to Amazon
$fileHolder = file_get_contents( $sendFullRequestURL );

// Return the message that has been set to Amazon for checking.
return $fileHolder;
}else{
// Otherwise, note that something unextpected has occurred.
return "An error occurred in base class AmazonMessageOut.
\$sendFullRequestURL is not set.";
}
  }
}

Called Instance:

// Autoload classes
function __autoload( $className ){
   require_once $className . '.class.php';
}

$messageOut = new AmazonOperation();

$messageOut->setCurrentOperation( $messageOut->OperationItemLookup );
$messageOut->setCurrentResponseGroup( $messageOut->ResponseMedium );

$messageIn = new AmazonResponse();

$nowAString = $messageIn->getAmazonXml( $messageOut->itemLookup(
"0375826688" ) );

echo $nowAString;

// $messageIn->loadXmlFile( $nowAString );

Expected result:

No errors and the Amazon XML loads

Actual result:
--
As was said, the following errors for PHP-native functions:

Warning: __autoload(simplexml_load_file.class.php) [function.--autoload]:
failed to open stream: No such file or directory in C:\Program
Files\SpikeSource\oss\httpd\htdocs\blindcore\classes\test.usage.only.php
on line 4

Fatal error: __autoload() [function.require]: Failed opening required
'simplexml_load_file.class.php' (include_path='.;C:\dev\php5\pear') in
C:\Program
Files\SpikeSource\oss\httpd\htdocs\blindcore\classes\test.usage.only.php
on line 4

-- 
Edit bug report at http://bugs.php.net/?id=33181&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33181&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33181&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33181&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=33181&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=33181&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=33181&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=33181&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=33181&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33181&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=33181&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=33181&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=33181&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=33181&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33181&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=33181&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=33181&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33181&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33181&r=float
No Zend Extensions:  http://bugs.php.net/fix.php?id=33181&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33181&r=mysqlcfg


#33181 [Opn]: SimpleXML causes __autoload error inside of autoloaded class file.

2005-05-29 Thread nickolasnikolic at hotmail dot com
 ID:   33181
 User updated by:  nickolasnikolic at hotmail dot com
 Reported By:  nickolasnikolic at hotmail dot com
 Status:   Open
 Bug Type: SimpleXML related
 Operating System: Windows
 PHP Version:  5.0.4
 New Comment:

$messageIn->getAmazonXml source is the same as public function
sendFullRequest( $sendFullRequestURL = NULL ) - refactored. There is no
change between the file instantiated in the example and the current one.
The contents of the method are the same.


Previous Comments:


[2005-05-30 07:27:49] nickolasnikolic at hotmail dot com

Description:

Uncommenting the last line will produce an odd error affilliated with
__autoload:

Warning: __autoload(simplexml_load_file.class.php)
[function.--autoload]: failed to open stream: No such file or directory
in C:\Program
Files\SpikeSource\oss\httpd\htdocs\blindcore\classes\test.usage.only.php
on line 4

Fatal error: __autoload() [function.require]: Failed opening required
'simplexml_load_file.class.php' (include_path='.;C:\dev\php5\pear') in
C:\Program
Files\SpikeSource\oss\httpd\htdocs\blindcore\classes\test.usage.only.php
on line 4

The server is spikesource's stack. If you need more info, please
email.

I hope that it helps!

Reproduce code:
---
Source class:
  public function sendFullRequest( $sendFullRequestURL = NULL ){
// If the message to send to Amazon has been set.
if( $sendFullRequestURL ){
// Then sent the request to Amazon
$fileHolder = file_get_contents( $sendFullRequestURL );

// Return the message that has been set to Amazon for checking.
return $fileHolder;
}else{
// Otherwise, note that something unextpected has occurred.
return "An error occurred in base class AmazonMessageOut.
\$sendFullRequestURL is not set.";
}
  }
}

Called Instance:

// Autoload classes
function __autoload( $className ){
   require_once $className . '.class.php';
}

$messageOut = new AmazonOperation();

$messageOut->setCurrentOperation( $messageOut->OperationItemLookup );
$messageOut->setCurrentResponseGroup( $messageOut->ResponseMedium );

$messageIn = new AmazonResponse();

$nowAString = $messageIn->getAmazonXml( $messageOut->itemLookup(
"0375826688" ) );

echo $nowAString;

// $messageIn->loadXmlFile( $nowAString );

Expected result:

No errors and the Amazon XML loads

Actual result:
--
As was said, the following errors for PHP-native functions:

Warning: __autoload(simplexml_load_file.class.php)
[function.--autoload]: failed to open stream: No such file or directory
in C:\Program
Files\SpikeSource\oss\httpd\htdocs\blindcore\classes\test.usage.only.php
on line 4

Fatal error: __autoload() [function.require]: Failed opening required
'simplexml_load_file.class.php' (include_path='.;C:\dev\php5\pear') in
C:\Program
Files\SpikeSource\oss\httpd\htdocs\blindcore\classes\test.usage.only.php
on line 4





-- 
Edit this bug report at http://bugs.php.net/?id=33181&edit=1