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

Reply via email to