By rajviswas
Hi,
I have updated ubuntu 16.04, php 7.4.3 after lots of issues finally my website started but now i got one more following issue
“There has been a critical error on your website.” i search some solutions in internet but still not solved.
can any one help me out.
Regards, Raja
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @rajviswas,
It seems you have some error in your code or there is a PHP extension missing. There are a few ways to check this however, I’ll recommend the following two.
Let’s start with the first point.
cd /path/to/you/website
If you have an php.ini file there open it, if you don’t create one
nano php.ini
for creating a new php.ini type in
touch php.ini && nano php.ini
In there add the following lines
; log PHP errors to a file
log_errors = on
error_reporting = 32767
error_log = /path/to/you/website/error_log
Please note to change the /path/to/you/website/error_log with the actual one. Restart your apache and open your website. You should now have an error_log file in your website’s directory stating what the error is. From there you can act on.
The next solution is a bit easier. Open your index.php file and add to the top right under the <?php tag the following line
ini_set('display_errors', 1);
This should show the error you are experiencing directly in the browser. As soon as you’ve added the above line, save the file and open your website via the browser. You’ll see the error there.
Once you have resolved the error, it’s important to remove the above line.
Regards, KDSys
In Cpanel I found Multi PHP Ini editor and made changes
32 M to 256 M and the error resolved.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.