cancel
Showing results for 
Search instead for 
Did you mean: 

Flushed the cache and it brought my (test) site down

SOLVED

Flushed the cache and it brought my (test) site down

Hi

 

I am a complete newbie to Magento.

 

I have a test site which I was adding categories and subcategories, having already added a theme to the test site and I thought I better flush the cache and once I did, everything went awry - the site went down and I cant access the admin to try to revert what happened. The browser message I get is that the browser cant connect to the server - so I dont know what happened there.

 

Does anyone know what I can do to get it back? I've been looking on Google, but cant seem to find anything that is related to my issue. This is so odd, because when I flushed cache before, it was fine.

 

I can still get into my cpanel and phpAdmin, but as I am not a DB person I dont know which table inside the DB to configure to make it work again.

 

I have the latest version of Magento installed.

 

Does anyone have any ideas?

13 REPLIES

Re: Flushed the cache and it brought my (test) site down

Hi,

You need to see what error you're getting ideally.

 

Can you access your apache error logs and see whats in there? (paste the last few errors from the bottom of the file)

Problem solved? Click Accept as Solution!
Magento Certified Developer Plus | www.iwebsolutions.co.uk | Magento Small Business Partner

Re: Flushed the cache and it brought my (test) site down

Thanks for replying.

 

I cant access the apache error logs (and the error log files I have on public-html and not the magento folder are not related to this issue), but I have put in a request to my web host to provide me with the last few lines of errors.

 

The message I do get when I try to access the site or admin, is the following (I dont know if it's going to be any help):

 

Safari cant open the page 127.0.0.1/magento1910/ma-erida because Safari cant connect to the server 127.0.0.1

Re: Flushed the cache and it brought my (test) site down

The lines of error code (I substituted "username" for my domain username. The test domain name is "atest":

 

[Wed Sep 09 22:07:52 2015] [error] [client 118.88.26.7] client denied by server configuration: /home/username/public_html/atest/app/etc/local.xml
[Wed Sep 09 21:56:47 2015] [error] [client 118.88.26.7] client denied by server configuration: /home/username/public_html/atest/app/etc/local.xml
[Wed Sep 09 21:56:19 2015] [error] [client 118.88.26.7] client denied by server configuration: /home/username/public_html/atest/app/etc/local.xml

Re: Flushed the cache and it brought my (test) site down

Hi,

Those errors are not related to the issue. They are normal errors and are just Magento checking your app/etc/local.xml isn't accessible to the world.

 

If getting error logs from your host is time consuming - you could also try editing your index.php file to enable developer mode - this should show any PHP errors to screen... once you've fixed whatever error(s) there are its important you revert this change though.

 

To enabled it, find (in index.php)

if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
}

And replace it with:

 

//if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
//}

 

Then try the page again; and let us know if anything is output to the screen.

Problem solved? Click Accept as Solution!
Magento Certified Developer Plus | www.iwebsolutions.co.uk | Magento Small Business Partner

Re: Flushed the cache and it brought my (test) site down

Are you hosting the Magento store locally? Otherwise the URL should not be 127.0.0.1. 

 

You need to view the core_config_data table in your database and replace all instance of "127.0.0.1" with your actual domain. 

James Lee | Moderator • Magento Master
See My Recommended Magento Hosting & Security Tips

Re: Flushed the cache and it brought my (test) site down

Those lines of error code came from the apache error log file from my host - they were the same as the error log file I can access in Cpanel (albeit in Cpanel it's truncated to the last 300).

 

Thanks for the line of code you provided - it isnt even in the index.php file - and I searched a number of the phrases and looked through the file line by line.

 

I am a total newbie - I dont know much about PHP - I understand the logical and can copy and paste and modify very simple things with instructions but that's it. I do know some syntax of programming languages, so I did get what you provided in your code, but I couldnt think of it on my own. Just so you know how new I am Smiley Happy

 

So it appears I have done something majorily bad and as I am not sure what and as I dont have much on the test site, I am going to start again. I think that might be the best thing for me. 

 

One question I do have - just because I dont know which is the best way to do it - is this the best way for me to do the installation? Sorry for the complete newbie question, but I wont learn if I dont at least get this right.

 

1. Install Magento from Cpanel (Fantastico)

2. Add the theme zip file (though the File manage in Cpanel - upload and extract it to the folder location I created in the Magento instal)

3. Upload and install the quick start package (examples etc) from the theme into the database from phpMyAdmin.

 

And will there be a conflict if I have a Wordpress site on the root, whereas I am installing the Magento in a subfolder?

Re: Flushed the cache and it brought my (test) site down

My domain is hosted on shared hosting with a hosting provider, so I think the Magento site reverted to the 127.0.0.1 as it couldnt located the host. I have no idea why.

 

Thanks. I tried replacing as per your suggestion below and now the error message doesnt display on the test site or the login page, but it looks like the stylesheets are gone, even though the template seems to be there. I might try to upload the template again to get it to accept the theme template.

 

 


JLHC wrote:

Are you hosting the Magento store locally? Otherwise the URL should not be 127.0.0.1. 

 

You need to view the core_config_data table in your database and replace all instance of "127.0.0.1" with your actual domain. 


 

Re: Flushed the cache and it brought my (test) site down

No, it should not "revert" to 127.0.0.1 under any circumstances when you are not installing it in your own computer. 

 

The stylesheets aren't showing most likely because the Base Skin URL, Base Media URL and Base JS URL are all set to "127.0.0.1" instead of your own domain as well. 

 

If you can login to Magento Admin, navigate to System --> Configuration --> Web and correct these Base URLs. 

 

Otherwise you need to go back to the core_config_data table in the database and make sure to search through all instance of "127.0.0.1" and make sure they are all changed to your domain name. 

James Lee | Moderator • Magento Master
See My Recommended Magento Hosting & Security Tips

Re: Flushed the cache and it brought my (test) site down

The rows in core_config_data that you are most likely to need to change can be found with the following sql

select * from core_config_data where path like '%base_url%';

Just change the value column to be your url (remember the trainling slash)

update core_config_data set value = 'http://your-domain.com/' where path = 'web/unsecure/base_url';

update core_config_data set value = 'https://your-domain.com/' where path = 'web/secure/base_url';

The secure one will be http or https depending on whether you have ssl installed.

 

Make sure and flush your cache again when you have done this.

Double check your skin urls etc as well to make sure they aren;t using 127.0.0.1 (normally they use {unsecure_base_url}} and {{secure_base_url}}

 

 select * from core_config_data where path like '%base%';
Richard Cleverley
Magepim Ecommerce Services