• I installed WordPress 5.4.1 some time ago after shifting my server space over from Fedora 20 to Fedora 30 to permit an update to my PHP (the server had been running version 5.5.26). I used the manual install instructions to the letter, including disabling of plugins, because my server said that autoinstalls of WordPRess might not yet work with the new version of Fedora. After manual installing the new WordPress files, I get the following message when trying to login to access my admin page:

    “There has been a critical error on your website. Please check your site admin email inbox for instructions.

    Learn more about debugging in WordPress.”

    I obviously can’t read the email WordPress is sending me without being able to get into my dashboard. I tried reverting back to Fedora 20 for my university server locker/hostnames but still the same message.

    Any suggestions?

    Thanks in advance!!

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 17 total)
  • Enable debugging messages by editing your sites wp-config.php file and seetting the vlaue for WP_DEBUG to true (and remember to swap that bacl to false when you’ve finished).

    That will display the error messages on the site and let you see what’s going wrong without any need to see emails of be logged in.

    Thread Starter mghachem

    (@mghachem)

    many thanks for the tip @catacaustic!

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    FWIW, I have WP 5.6.2 running quite happily on Fedora 33.

    Is there a security plugin installed which prevents access to /wp-admin?
    Additionally, have a look at your .htaccess file.

    Also, I just checked your site, and while the /wp-admin link is inaccessible, the /wp-login.php link is still up and running.
    So you could try to login with:

    https://lawandrevolution.com/wp-login.php

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Errors like this are logged. Check the error log on your server.

    Meantime, enable wp_debug and wp_debug_log and after an error, look at wp-content/debug.log to see if anything gets logged there. https://www.ads-software.com/support/article/debugging-in-wordpress/

    Thread Starter mghachem

    (@mghachem)

    thank you very much @shariqkhan2012 and @sterndata for your replies

    Thread Starter mghachem

    (@mghachem)

    This is the error message I am getting after enabling debug. I am not quite sure how to interpret or fix it. Any ideas?

    Fatal error: (mghachem) Uncaught Error: Call to undefined function json_encode() in /afs/athena.mit.edu/user/m/g/mghachem/web_scripts/lawandrevolution/wp-includes/functions.php:3877 Stack trace: #0 /afs/athena.mit.edu/user/m/g/mghachem/web_scripts/lawandrevolution/wp-includes/widgets/class-wp-widget-text.php(58): wp_json_encode('text') #1 /afs/athena.mit.edu/user/m/g/mghachem/web_scripts/lawandrevolution/wp-includes/class-wp-widget.php(252): WP_Widget_Text->_register_one(2) #2 /afs/athena.mit.edu/user/m/g/mghachem/web_scripts/lawandrevolution/wp-includes/class-wp-widget-factory.php(102): WP_Widget->_register() #3 /afs/athena.mit.edu/user/m/g/mghachem/web_scripts/lawandrevolution/wp-includes/class-wp-hook.php(287): WP_Widget_Factory->_register_widgets('') #4 /afs/athena.mit.edu/user/m/g/mghachem/web_scripts/lawandrevolution/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #5 /afs/athena.mit.edu/user/m/g/mghachem/web_scripts/lawandrevolution/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #6 /a in /afs/athena.mit.edu/user/m/g/mghachem/web_scripts/lawandrevolution/wp-includes/functions.php on line 3877

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    It looks like you’re missing or unable to access several WP files or there’s an issue with your afs mount. Or maybe SELinux.

    Thread Starter mghachem

    (@mghachem)

    Thank you @sterndata — since I don’t know what to do with this error message (even after reading your comment) I think I will have to engage the services of an expert to fix this. Do you know if there is a service out there somewhere that I can pay for fixing website problems of this sort?

    
    Fatal error: (mghachem) Uncaught Error: Call to undefined function json_encode()
    

    json_encode is a standard PHP function. So, it should have been available by default.
    UNLESS
    1. You are using PHP version < 5.2, which is not the case as you mentioned in your first comment that you have upgraded from 5.5.26 to a higher version
    2. Or PHP was compiled without JSON.

    You said that you did the installation manually. Was it PHP or WordPress that you installed manually?
    If it was PHP that you compiled manually, then you should check ( the manual install instructions that you followed) if there was a step where you used the flag --disable-json

    If you have access to the server and can run commands on it, then try this:
    php -i | grep json

    Paste the output here

    Thread Starter mghachem

    (@mghachem)

    Thank you for this @shariqkhan2012. It was WordPress that I installed manually through my university server locker, after upgrading my server locker from Fedora 20 to Fedora 30 to be able to use a newer version of WordPress (which required the upgraded php). I checked to make sure the JSON extension is enabled in the php.ini file and it is. I ran the command you suggested and all I get is the following (showing you how I navigated to my main WordPress website directory before issuing the command). As you will see, after issuing the command I get the following: “php: Command not found”.

    buzzword-bingo:~> ls
    Desktop    Downloads  Mail   OldFiles  Private  Templates  web_scripts      welcome 
    Documents  MacData    Music  Pictures  Public   Videos     web_scripts_tmp  www     
    buzzword-bingo:~> cd web_scripts
    buzzword-bingo:~/web_scripts> ls
    lawandrevolution  omeka                                                             
    buzzword-bingo:~/web_scripts> cd lawandrevolution
    buzzword-bingo:~/web_scripts/lawandrevolution> ls
    index.php                wp-admin              wp-cron.php        wp-settings.php   
    license.txt              wp-blog-header.php    wp-includes        wp-signup.php     
    php.ini                  wp-comments-post.php  wp-links-opml.php  wp-trackback.php  
    readme.html              wp-config.php         wp-load.php        xmlrpc.php        
    scripts_3103822e87.html  wp-config-sample.php  wp-login.php                         
    wp-activate.php          wp-content            wp-mail.php                          
    buzzword-bingo:~/web_scripts/lawandrevolution> php -i | grep json
    php: Command not found.                                                             
    buzzword-bingo:~/web_scripts/lawandrevolution>
    
    buzzword-bingo:~/web_scripts/lawandrevolution> php -i | grep json
    php: Command not found.
    

    In that case try this:

     
    which php 
    

    You’ll get an output that looks something like:

    
    /usr/bin/php
    

    The exact path may differ depending on your system. But whatever path you get, use that to run the command from the previous comment.
    So, if your path is /usr/bin/php , then use this command:

    
    /usr/bin/php -i | grep json
    
    Thread Starter mghachem

    (@mghachem)

    Thanks for this @shariqkhan2012. The which php command also results in php: Command not found.

    Hmm… seems odd. PHP should be available, else WordPress wouldn’t be running.

    Try this:

    1. Inside the directory lawandrevolution, create a .php file with any name you like.

    2. Edit the file, and paste the following code in it:

    
    <?php
    phpinfo();
    ?>
    

    3. Now execute the file in the browser. So, if the filename you had chosen was testphpfile.php, then open this in your browser:

    https://lawandrevolution.com/testphpfile.php

    4. Search for the keyword json in the information that is displayed.

    5. Once you are done with debugging your issue, delete the file.

    • This reply was modified 3 years, 8 months ago by Shariq Khan.
    Thread Starter mghachem

    (@mghachem)

    thank you very much @shariqkhan2012 i appreciate the help!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘can’t login to my admin after Fedora 30 and WP upgrade’ is closed to new replies.