Forum Replies Created

Viewing 15 replies - 1 through 15 (of 32 total)
  • Thread Starter mghachem

    (@mghachem)

    thank you very much @sterndata

    Thread Starter mghachem

    (@mghachem)

    Hi again @shariqkhan2012. I followed those steps and this is what is displayed at https://lawandrevolution.com/testphpfile.php when I search for the keyword json:

    json
    json support enabled
    json version 1.7.0

    Thread Starter mghachem

    (@mghachem)

    thank you very much @shariqkhan2012 i appreciate the help!

    Thread Starter mghachem

    (@mghachem)

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

    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>
    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?

    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

    Thread Starter mghachem

    (@mghachem)

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

    Thread Starter mghachem

    (@mghachem)

    many thanks for the tip @catacaustic!

    Thread Starter mghachem

    (@mghachem)

    Thank you Farhad. I tried both of these but neither worked. For the first strategy, I assume you mean the active theme folder name. For the second strategy, I added the line towards near the end of the wp-config.php line.

    Thread Starter mghachem

    (@mghachem)

    PS: the website itself appears to still be working. It is my log-in admin page that is not working; when I try to log-in, I get the message quoted above.

    • This reply was modified 4 years, 5 months ago by Jan Dembowski.
    Thread Starter mghachem

    (@mghachem)

    thank you for this help!

    Thread Starter mghachem

    (@mghachem)

    I managed to solve my problem this way.

    It is an htaccess problem with the way the site is hosted on my self-hosting service in a sub-directory.

    First backup everything.

    Then, if you were to set both the WordPress address URL and the Site Address URL on the admin settings page so that they indicate the same subdirectory in which your WordPress files are located on your self-hosting server, the posts and previews will work. If you are redirecting from a self-hosted site to your own registered .com or other domain, set both values to whatever the .com domain is, and then modify the htaccess file at the root as follows:

    The .htaccess file modification that worked for me is as follows:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?DOMAINNAME.com$
    RewriteRule ^(/)?$ DOMAINNAME [L]

    So, if you are using https://www.smith.com, smith would go where DOMAINNAME appears above, in both places — and without the www. or .com in the third line, just smith followed by [L]

    Note: make the contents of the current file comments by adding ‘#’ in front on each line. That way you could always revert back to what it is currently if things do not work properly (you would revert to the original settings by removing the ‘#’ characters on each line).

    Thread Starter mghachem

    (@mghachem)

    Further to my query above, I did make sure that this was not a plugin issue by checking post preview before I activated any of my plugins after the 3.6 install. I also checked to see if it was a theme-specific problem by activating the 2013 theme but that theme had the same post preview problem. And, finally, I did clear the browser cache and reset the Permalinks to default and then back to my new format choice before trying again.

    My site is at lawandrevolution.com (the host server is via a university).

    Thanks for any help!

    Thread Starter mghachem

    (@mghachem)

    Just to add a little more detail:

    Here is what the page says when I try to preview a post. A new page opens with the tab “Page not found,” and this is what appears in the website below:

    “This is somewhat embarrassing, isn’t it?

    It seems we can’t find what you’re looking for. Perhaps searching can help.”

    The rest of the website appears on the page.

    I did check the .htaccess file for the rewrite code for permalinks and it was correct.

    Thanks.

Viewing 15 replies - 1 through 15 (of 32 total)