New to Magento. After making sure I met all the prerequisites, and downloading and unpacking 2.1 CE with sample data, I did the web based setup. It completed without errors.
On signing into the Admin for the first time, I got the message:
Looking at System/Index Management, I see they all say "READY" except "Catalog Rule Product" says "REINDEX REQUIRED".
Searching and reading, it seems this should clear it up:
php bin/magento indexer:reindex
But it comes back and says "Segmentation fault".
More reading. Could be related to the version of PHP. So I tried 5.6.30, 7.0.18. and 7.1.4. These are the versions I have installed on my server. Same result on all of them.
More reading. Couldn't find an answer. Finally I decided to uninstall and try again without the sample data. Maybe go back a version or two. So now I research how to uninstall Magento. Best advice I can find is to use this command:
php bin/magento setup:uninstall
And lo and behold it also comes back with "Segmentation fault"
I'm at the end of my rope here. Can't make it work and can't uninstall to try again. So I'm posting in hopes someone can help me get back on track.
Can I uninstall by brute force? Delete all the files and the database?
Solved! Go to Solution.
Segmentation fault happens when either memory limit issue or some extension bug.
Try to do reindex using below command
php -dmemory_limit=6G bin/magento indexer:reindex
Thank you for the helpful suggestion. Finally something else I can try. And I suspect you're on the right track, because when I enter the above I get something new:
"Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 640 bytes) in /home/user/public_html/magentodir/vendor/composer/autoload_real.php on line 6
Oh wait. I just realized you said -dmemory_limit=6G . I read it as -dmemory_limit=66 . I blame it on old eyes
Entering the command as you provided it, I still get the same "Segmentation fault" message. No other information.
Is there any reason I can't brute force the uninstall and try again without the sample data? I'm talking about manually deleting all the files and the data base and starting over, as opposed to doing the uninstall process which is returning the segmentation fault error.
OK, more information, I got past the segmentation fault and I'm on to a new problem, for which I'll create a new thread.
On the advice of tech support at inmotion, I tried specifying the full path for php, i.e.:
/opt/php71/bin/php bin/magento indexer:reindex
Now I'm pretty clueless when it comes to Linux, but it sure seemed to me like finding php was not the issue, after all, it returns error messages, so it must've been found. But I typed this in anyway, and low and behold, it worked, all the indexes were rebuilt successfully. Yay!
Which begs the question, what in the world was it running when I didn't specify the full path? A different version of PHP? How can I see the path? How can I make it correct for the PHP version I have selected in Cpanel?