-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class 'SimpleXMLElement' not found #1598
Comments
Hey @koushikSen, thanks for reaching out about this. Just to rule out simple environment misconfigurations, can you check the |
Yes, they are enabled. <?php public function delete($memory_id)
{
$memory = new Memory();
$qaMemory = new MemoryAccess;
$memoryInfo = $memory->where('memory_id',$memory_id)->first();
$qaMemory->where('user_id',Auth::user()->id)->where('memory_recall_datetime',$memoryInfo->recall_date)->first();
$qaMemory->delete();
if($memoryInfo->mime_type){
$path = $memoryInfo->memory_content;
$pathArray = explode('/', $path);
if(Storage::disk('s3')->exists(end($pathArray))){ // error occoured
$isDeleted = Storage::disk('s3')->delete(end($pathArray));
} else{
//echo "not found";
}
}
$memory->delete();
return redirect('home')->with('registration_success', 'Registration successful');
} ?> |
Thanks for the additional info. Just to rule out your local environment as the culprit, could you try running the following sample code that uses the SimpleXML package to see if you continue to receive this error? You may be running multiple PHP builds with different packages between CLI and web on this machine. <?php
$string = <<<XML
<?xml version='1.0'?>
<document>
<title>TestTitle</title>
<body>
Here is some text
</body>
</document>
XML;
$xml = simplexml_load_string($string);
print_r($xml);
?> |
Displaying simple array working fine in EC2, but displaying SimpleXML is when an error occurred. |
It looks like your SimpleXML extension isn't hooked up properly to your PHP install on your EC2 server. I'd recommend searching on or asking a question on StackOverflow or opening a support ticket with AWS Support to help troubleshoot this issue. |
I encountered this same issue and restarting php-fpm resolved it. sudo systemctl restart php-fpm |
Woah thanks @dalisay!! Can't believe that solved my issue! |
dalisay is my hero |
@dalisay You are awesome. |
Can someone please explain why @dalisay |
Getting same error and as @dalisay said to run |
Thanks @dalisay solution 👍 |
Running
I am using php 8 ubuntu 20.04 |
I have same issue, |
For anyone getting this error: Run |
Hi, My project is in EC2, upon delete any s3 file I am having this error.
(1/1) FatalThrowableError Class 'SimpleXMLElement' not found
I have PHP 7.2 and XML and SimpleXML both installed in EC2. my local server does not throw this error while deleting from s3
The text was updated successfully, but these errors were encountered: