0

It looks like HHVM is having trouble with SimpleXML according to

https://github.com/facebook/hhvm/issues/650

https://github.com/facebook/hhvm/issues/303

The class SimpleXMLIterator is used on our case by Amazon S3' PHP SDK. I tried the same code when HHVM is turned off and that works perfectly.

Any idea/fix to solve this? Or ways to go around it by using other XML parsing tool for S3 SDK than CFSimpleXML?

Code used:

$s3->batch()->copy_object(
                array('bucket' => $temp_bucket, 'filename' => $filename_source),
                array('bucket' => $bucket, 'filename' => $filename_dest),
                array('acl' => AmazonS3::ACL_PUBLIC)
            );

$response =  $s3->batch()->send();

Bug report from HHVM :

HipHop Fatal error: unknown class SimpleXMLIterator in XX/librairies/s3sdk/utilities/simplexml.class.php on line 33
Tristan
  • 3,192
  • 3
  • 20
  • 32
  • If I got it right, you're asking how to fix an issue with HHVM that's documented, which doesn't occur when you don't use HHVM? – N.B. Jan 16 '14 at 15:57
  • No the issue is not documented, I am guessing it is related to other issues HHVM is having with SimpleXML. It is very hard at the moment to find any documentation about HHVM utilization in many aspects. – Tristan Jan 16 '14 at 16:08
  • Well, it might be that you've found a bug. Also, you should include the code you used + any errors you get so people can try to reproduce the problem you're seeing. – N.B. Jan 16 '14 at 16:23
  • And really, you're using the outdated and unsupported version of Amazon's SDK for PHP. You should really consider upgrading. The benefits are HUGE. – Ryan Parman Jan 18 '14 at 07:52

2 Answers2

1

Sadly SimpleXMLIterator just hasn't been implemented yet. You can either do it, or open an issue and wait for someone else to do it.

https://github.com/facebook/hhvm/search?q=SimpleXMLIterator&ref=cmdform

https://github.com/facebook/hhvm/wiki/Extension-API

Paul Tarjan
  • 48,968
  • 59
  • 172
  • 213
  • Thanks for bringing up the unfortunate fact, I am wondering since Facebook built it and is using it, how come some crucial extensions are still missing from the library, are Facebook teams even working on it? – Tristan Jan 17 '14 at 08:27
  • This might be the implementation actually : https://github.com/facebook/hhvm/pull/1387 – Tristan Jan 17 '14 at 08:32
  • @Tristan The obvious answer is that while it is crucial for you, it is not crucial for Facebook. Reimplementing complex PHP extensions under a completely different engine is not a trivial task, although I believe the hope is that most will eventually be compatible. – IMSoP Jan 18 '14 at 19:31
  • So this link http://docs.hhvm.com/manual/en/class.simplexmliterator.php does not mean they has already implemented it? – noomz Jul 02 '15 at 03:15
0

SimpleXMLIterator will be available in next release of hhvm (probably 3.9) https://github.com/facebook/hhvm/commits/d29d110217bf3fabdc75d487f4c96740603ae2eb

SuRaMoN
  • 44
  • 5