Forum Replies Created

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter jacdaniel

    (@jacdaniel)

    No @bsfherman, I am referring to any header/footer plugin that allows scripts so that I can insert a code such as: <link rel=”shortcut icon” href=”/path/to/favicon.ico”> into the header section of my site in order to display my favicon on google search (that I have already uploaded to my site’s root folder via ftp).

    Incidently, I already have EHF running on my site, so I am wondering if this would interfere with any additional script based header/footer plugin on Astra?- However, It didn’t with a different theme I used to have, where the favicon successfully appeared in google search. As soon as I installed Astra the search based favicon of my site failed to appear.

    See this link below:

    Search Favicon

    • This reply was modified 4 years, 3 months ago by jacdaniel.
    • This reply was modified 4 years, 3 months ago by jacdaniel.
    Thread Starter jacdaniel

    (@jacdaniel)

    Just can’t find a way. I’ve tried numerous header and footer plugins that state they’re compatible with my version of wordpress (5.9)
    Tried a variety of codes in these plugins; and to disable the header/footer plugin and adding the code directly to the source code header of the home page.
    I’m guessing someone knows about how to make this work?

    • This reply was modified 4 years, 3 months ago by jacdaniel.
    • This reply was modified 4 years, 3 months ago by jacdaniel.
    Thread Starter jacdaniel

    (@jacdaniel)

    By the way @jacdaniel , I don’t even follow the Google Search Central instructions. I only upload favicon from theme Customizer. It should be enough because if you try to view the page source of your site, the code <link rel=”shortcut icon” href=”/path/to/favicon.ico”> and other rel attributes has already been inserted automatically.

    Well i’ve purged all cache on my site and it’s made no difference. The theme customizer definitely doesn’t work for the favicon appearing on search results – it only works for me for adding the favicon to the side of browser tabs.

    I will look into whether or not I need to disable ‘header and footer’ plugin, and add the <link rel=”shortcut icon” href=”/path/to/favicon.ico”> code directly to the header of the homepage.

    Thread Starter jacdaniel

    (@jacdaniel)

    That’s interesting, thanks.

    I wonder if anyone has solved this issue..??

    Thread Starter jacdaniel

    (@jacdaniel)

    UPDATE:

    I have contacted my web hosts and they have sorted the issue out for me on my online live site. My UDP now backs up to all variety of remote locations. It appeared to be a server side fix that probably couldn’t be fixed any other way. The message about LiteSpeed servers not working with UDP, hence needing a hosting change, was therefore wrong.

    There is no explanation however for why certain remote location backups didn’t work on Xampp ‘localhost’, and why that “error establishing a database connection” keeps cropping up.

    What I do know is that once you’ve re-installed Xampp and WordPress and do that restarting of Apache and mySQL – you have to create a database user in phpMyAdmin that corresponds with your WordPress login (and give that user full admin privileges in phpMyAdmin in those users settings) otherwise you will run into WordPress/mySQL database problems. That is relatively easy to sort out.

    Hope all this info helps some others who want a trouble free transition to getting their WordPress sites onto their web hosting spaces and therefore online.

    Thread Starter jacdaniel

    (@jacdaniel)

    I have a solution and it has allowed me to now get to the point where I have uploaded my site live, so I am happy with that. It’s all about backing up your site and then restoring with a plugin such as Updraft Plus.

    Whenever ‘in localhost’ I have encountered that “Error Establishing database connection” – I’ve found that by just totally un-installing and re-installing Xampp and WordPress module, then restoring from my Updraft Plus backup does the job. Takes a little while but sorts out the errors. I don’t think there’s many ways round trying to fix mySQL errors in Xampp.
    I have found that when I reinstall Xampp bitnami setup specifies to leave it running in order to install WordPress bitnami. Then after the WordPress installs, if you check the Xampp control panel it always shows that there is an error with mySQL! So to fix this, just stop Apache and mySQL and then restart the services, and the error disappears and you can log back into localhost WordPress admin console.

    I will post this link, because this is the way to upload your localhost to live site with your hosting company and get your site on the online. I have researched and if you’re using UDP (or any other backup/restore plugin) it doesn’t pay to use a hosting company that uses ‘LiteSpeed servers’ once your site in live due to an incompatibility issue. In other words, you will run into much less difficulties if you use a web service that does not use those type of servers:

    Just to let you know, I have now gone live with my site and have just had to contact UDP support because my UDP is failing to backup my site. My web hosting company use LiteSpeed servers. I hope I can fix this issue or else I might have to change hosting and migrate my whole site – which I wouldn’t choose to do if asked!

    Thread Starter jacdaniel

    (@jacdaniel)

    Hi, yes you’re right. I’ve found that by just totally un-installing and re-installing Xampp and WordPress module, then restoring from my Updraft Plus backup does the job. Takes a little while but sorts out the errors. I don’t think there’s many ways round trying to fix mySQL errors in Xampp.

    Thread Starter jacdaniel

    (@jacdaniel)

    I found out what was stopping me from logging into my dashboard (despite still being able to log in to my site). It was because I changed my site’s tables table prefix in phpMyAdmin; and also changed this entry in wp-config.php:

    /**
    * WordPress Database Table prefix.
    *
    * You can have multiple installations in one database if you give each
    * a unique prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix = ‘wp_’;

    I changed the ‘wp_’ to something else that corresponded with what I changed the table prefix to in phpMyAdmin.

    So, when I reversed these 2 changes I found I could get back into my dashboard.

    This therefore brings me to the question of how do I successfully change my site’s table prefix without this problem occurring, or without crashing the site entirely? I’ve heard that changing a site’s table prefix is good for site security.

    Any help much appreciated.

    Thread Starter jacdaniel

    (@jacdaniel)

    I found this article:

    I am navigating to the wordpress page and pressing enter in the address bar once entering the site address to see if it let’s me in. The ‘Error establishing a database connection’ comes up. I would then assume that a error log would be created in my wp-content folder, seeing as I have put in all those codes you’ve given me for the wp-config.php file.

    This is not happening.
    Becoming annoying now, thinking of uninstalling the whole xampp again (which would take the wordpress installation with it)- and trying a fresh re-install again. Can’t see how that would change what happened this time though.
    I have a backup of my site in UpdraftPlus with Onedrive remote storage, so it would just be a plugin update and restore once I’ve installed the basic wordpress install.

    Thread Starter jacdaniel

    (@jacdaniel)

    Hi,

    Had no luck in being able to locate the location of the PHP error log.

    The best answer I could find is:

    C:\xampp\php\logs\php_error_log

    However, I found no ‘logs’ folder within the php folder on my system.

    Thread Starter jacdaniel

    (@jacdaniel)

    I’ve worked out that I would find the outputted dump file here:

    C:\xampp\php\logs\php_error_log

    I found this for creating the dump file:

    Using
    <?php ini_set('display_errors', 1); ?>
    at the top of your script will not catch any parse errors. A missing ")" or ";" will still lead to a blank page.
    
    This is because the entire script is parsed before any of it is executed. If you are unable to change php.ini and set
    
    display_errors On
    
    <strong>then there is a possible solution suggested under error_reporting:
    
    <?php
    error_reporting(E_ALL);
    ini_set("display_errors", 1);
    include("file_with_errors.php");
    ?></strong>
    
    [Modified by moderator]
    
    You should also consider setting error_reporting = -1 in your php.ini and display_errors = On if you are in development mode to see all fatal/parse errors or set error_log to your desired file to log errors instead of display_errors in production (this requires log_errors to be turned on).

    I need to know where to append this following text in the php.ini file so I can output the required error message dump to C:\xampp\php\logs\php_error_log :

    <?php
    error_reporting(E_ALL);
    ini_set(“display_errors”, 1);
    include(“file_with_errors.php”);
    ?>

    The php.ini file has a lot of text and I have no idea where to insert that command in the file so it’s in the correct position in the file so that it works.

    Do you know where I should put that command in php.ini, and if I’m even asserting to the correct procedure?

    Thanks, Gaz

    Thread Starter jacdaniel

    (@jacdaniel)

    Hi Dion,

    Don’t think it really would matter because my error seems to relate to WordPress, specifically a database error- but phpMyAdmin is reporting this at the bottom of the screen:

    A newer version of phpMyAdmin is available and you should consider upgrading. The newest version is 5.1.0, released on 2021-02-24.

    I looked at a webpost on doing this upgrade and it seems like a major operation which I would be reluctant to want to do anyway.

    I don’t get how I am getting a database error but there’s nothing indicating one in phpMyAdmin?

    Anyway, I’ll let you get back to trying to fix my problem..

    Thanks, Gaz.

    Thread Starter jacdaniel

    (@jacdaniel)

    Hi Dion, thanks for responding. I done the DEBUG lines in wp-config.php, but still getting ‘Error establishing a database connection’. It’s not reporting anything else (as I guess it should be)..

    I tried stopping and re-starting mySQL and Apache in the Xampp control panel, but made no difference.

    Gaz

    Thread Starter jacdaniel

    (@jacdaniel)

    Thanks for the reply X Estrada. I’m not following your method much (newbie), but it may have worked.

    However I took a different approach due to the fact that I was a bit out of my depth and lost a bit of patience with it all.

    First I decided to re-install Xampp, so I first copied my WordPress folder inside htdocs, and I copied the config.inc.php and php.ini files which had my configurations in.
    I then went into phpmyadmin and exported my WordPress .sql file to my pc.
    I uninstalled Xampp and installed what happened to be an updated version.
    Then I pasted over the aforementioned files and folder into their correct locations overwriting the defaults.
    I imported the .sql file into phpmyadmin.
    Then I started Xampp and tried to login to WordPress.
    I got an error again and realised that my .sql file has errored on export (it was only 1K). Had this .sql file worked it might have restored the site, but I’ll never know-unless the login error occurs again and I will try this method again just for reference.

    So I had to do a fresh install of WordPress, meaning I lost all my site info.
    Luckily (and as previously mentioned) I had some remote storage (important) UpdraftPlus backups.
    So I went into an empty WordPress dashboard and then installed the UpdraftPlus plugin.
    I logged into it and verified my account to get it up and running and then navigated to my backups. I then restored my site files and SQL database files using the most recent backup.

    It worked, and I just lost a bit of the most recent site data (because I’m set to manual backups and it wasn’t bang up to date). I have just redone the lost data on the site so I’m ok.

    I did however make sure that before the UpdraftPlus restoration that I created a database table in phpmyadmin called the same name as the previous lost WordPress database table – (so that UpdraftPlus knows where to load all the database data into).
    I Highly recommend UpdraftPlus – a lifesaver!

    I’m using WordPress at present on localhost, so all offline until I’m ready to get it hosted, and I noticed that I did have to download a cache clearing plugin and clear the website cache in order for a video URL to work again. I have an RSS feed that still appears broken but I will check later to see what I can do to fix that.

    Thread Starter jacdaniel

    (@jacdaniel)

    Just tried to reconfigure Xampp following these steps:

    1. Go to xampp\php\php.ini. Now configure the php.ini file and increase the value for the following options upload_max_filesize,memory_limit, post_max_size .
    post_max_size and memory_limit need to be larger than upload_max_filesize. Make them high enough so big files can work on the server.

    2. Go to ‘xampp\phpMyAdmin\libraries\config.default.php’
    Look for $cfg[‘ExecTimeLimit’] = 600;
    Change the value 600 to a higher value may be 6000.

    Made these modifications and still getting the same database connection error in WordPress. I can still get into the phpmyadmin dashboard though.

    Bit sceptical about reinstalling Xampp however when it appears to be ok. It just looks like some kind of configuration settings either in phpmyadmin OR config.inc.php OR wp-config.php

    Anyone with any clues as to how I can login to WordPress again?

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