0

Our site is hosted on AWS with assets uploading to an S3. Everything has worked great until the last update. Locally, I can upload assets without issue, but on the stage we're receiving an error /index.php?p=admin/actions/assets/uploadFile 500 (Internal Server Error) preventing us from uploading. The files upload to the directory, but the upload bar hangs.

Within the assets directory when pressing "refresh" on the bucket name, we receive the error /index.php?p=admin/actions/assetSources/getS3Buckets 500 (Internal Server Error)

Craft Version: Craft CMS 2.6.2950

This is the data from the logs.


2016/11/14 12:05:47 [error] [exception.Error] Error: Call to undefined function simplexml_load_string() in /var/www/stage.website.com/craft/app/lib/S3.php:2221
Stack trace:
#0 /var/www/stage.website.com/craft/app/lib/S3.php(420): S3Request->getResponse()
#1 /var/www/stage.website.com/craft/app/assetsourcetypes/S3AssetSourceType.php(438): S3::getBucket('website-craft', 'banners/IR_shar...')
#2 /var/www/stage.website.com/craft/app/assetsourcetypes/BaseAssetSourceType.php(237): Craft\S3AssetSourceType->getNameReplacementInFolder(Object(Craft\AssetFolderModel), 'IR_shareholder_...')
#3 /var/www/stage.website.com/craft/app/assetsourcetypes/BaseAssetSourceType.php(172): Craft\BaseAssetSourceType->insertFileByPath('/var/www/stage....', Object(Craft\AssetFolderModel), 'IR_shareholder_...')
#4 /var/www/stage.website.com/craft/app/services/AssetsService.php(709): Craft\BaseAssetSourceType->uploadFile(Object(Craft\AssetFolderModel))
#5 /var/www/stage.website.com/craft/app/controllers/AssetsController.php(52): Craft\AssetsService->uploadFile('1', NULL, 0, NULL)
#6 /var/www/stage.website.com/craft/app/framework/web/actions/CInlineAction.php(49): Craft\AssetsController->actionUploadFile()
#7 /var/www/stage.website.com/craft/app/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#8 /var/www/stage.website.com/craft/app/framework/web/CController.php(286): CController->runAction(Object(CInlineAction))
#9 /var/www/stage.website.com/craft/app/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#10 /var/www/stage.website.com/craft/app/framework/web/CWebApplication.php(282): CController->run('uploadFile')
#11 /var/www/stage.mediatek.com/craft/app/etc/web/WebApp.php(818): CWebApplication->runController('assets/uploadFi...')
#12 /var/www/stage.website.com/craft/app/etc/web/WebApp.php(288): Craft\WebApp->_processActionRequest()
#13 /var/www/stage.website.com/craft/app/framework/base/CApplication.php(185): Craft\WebApp->processRequest()
#14 /var/www/stage.website.com/craft/app/index.php(62): CApplication->run()
#15 /var/www/stage.website.com/public/index.php(19): require_once('/var/www/stage....')
#16 {main}
REQUEST_URI=/index.php?p=admin/actions/assets/uploadFile
HTTP_REFERER=http://stage.website.com/admin/assets
---

--

2016-11-14 20:25:28

Level   error
Category    exception.Error
Message Error: Call to undefined function simplexml_load_string() in /var/www/stage.website.com/craft/app/lib/S3.php:2221

We haven't made any system changes, so I'm unsure what the next step is. Any help would be appreciated.

  • I'm going to go ahead and say this looks like a bug and vote to close. But would you mind shooting an email to support@craftcms.com with a link to this thread as well as the file you're trying to upload? – Brad Bell Nov 14 '16 at 19:16
1

Apparently PHP hadn't installed the XML Parser appropriately. The amazing Craft team provided this link. Which solved my issue.

sudo apt-get install php-xml

https://stackoverflow.com/a/35604148/520520

Not the answer you're looking for? Browse other questions tagged or ask your own question.