Xampp doesn't reload changes when files get updated - xampp

When I copy live opencart website to the local xampp, can't show any updates
I had a working local copy on my localhost, but I needed to get the most updated copy from the live site. So I copied the live site and the live db(in workbench). Then I changed config files(both admin and catalog). The website works perfectly on local browser, but the changes I do through code doesn't show on browser. But when I change my database to the old local db I can see updates.
No errors showing on browser
Thanks

"As a developer, or store owner, you may make a change somewhere in your online shop and not see that change being applied on the front-end. In that case you probably need to clear your caches, but there is more than one so it helps to be aware of what caches there are and how to clear them."
https://www.antropy.co.uk/blog/how-to-clear-all-caches-in-opencart-3-0-2-0/

I've solved the above issue using Twig/SASS (Template) clear cache method. I have to do this for each update. But then I got another issue - the default image on product category doesn't show up. Image src shows as unknown, which fetch from cache folder. Any solution for this please?

Related

Updated Image file but not reflecting on Live server in laravel 9

I'm new with Laravel and I made web application but when I updated the image file or some css code it will not reflecting on live server.
I tried:
Route::get('/check',function(){ Artisan::call('cache:clear'); Artisan::call('optimize:clear'); Cache::flush(); });
but this is not working.
I just want to reflecting updated image file or css file when I update it.
"it will not reflecting on live server"
This is the bit that worries me being you've tried the cache clear commands. Laravel will mostly serve up the current assets, there are of course exceptions!
Laravel octane; If you're using this package then php artisan octane:reload
Other sources for these sorts of errors to check first would be
Browser cache - try renaming the files or adding a query string to their lings.
CDN cache - lots of people use cloudflare as a CDN and DNS, make sure development mode is turned on and you've flushed the cache there.
For the most part, just adding a query string and/or changing the name should be enough to prompt a fresh download.

Hostgator Addon Domain Redirecting to Primary Domain Subdirectory

This is for a client so I won't share exact domains but the problem is as follows..
I took over development of a website from a prior developer.
The hosting is Hostgator Business.
The primary domain is primary.com.
There is an addon domain addon.com.
The primary domain document root is /home1/username/public_html.
The addon's document root is /home1/username/addon.com.
www.addon.com had a WordPress installation which the developer had edited instead of using plugins to achieve his goals. The site also needed a complete redesign so I felt it logical to simply wipe the installation and replace it.
So, I deleted all of the WordPress files and uploaded a new copy of WordPress from wordpress.org/latest.tar.gz
Prior to deleting the old installation, the domain loaded files from it's document root perfectly.
After uploading the new installation instead of resolving to addon.com it is instead resolving to primary.com/addon.com
I've never seen this happen before so I'm lost.
There's no errors in any available logs.
All file permissions are correct.. I've triple-checked.
I've tried deleting all files and creating simple index.php and index.html files to see if it would access them ... it doesn't.
This happens in each browser I use on Windows and Linux.
I don't understand it because all I did was swap out the old WP install for a new one.
I went and re-uploaded the old WordPress installation so everything is 100% how it was but it is still going to primary.com/addon.com instead of addon.com.
Has anyone faced this issue before? I usually use Bluehost but even when I've used Hostgator in the past I've never seen this happen.
I double-checked the addon domain settings as well as anything else I could think of and everything appears normal.
I even deleted the addon domain and re-added it with the document root of /home1/username/addon.com and it still goes to primary.com/addon.com in the browser.
I submitted a ticket with Hostgator but they have not replied yet.
I'm sorry if this is long. This is my first time asking for help on here and I wanted to be sure I included everything I could.
Hostgator finally got back to me.
The previous developer had used the one-click WordPress install.
Apparently once someone uses a one-click install the only way it works is if you keep using the one-click install/you cannot do it manually any more.
From all the servers and sites I've setup this makes no sense and is a problem with Hostgator. Support did not really tell me anything other than "you have to use the one click install since the prior developer did". Great service.
Hope this saves someone some hassle.
From this it sounds like you were moving a WordPress site from the primary domain to an add on domain.
Simply moving the files from the primary to the add on domain will not make it work on the add on domain because in the database and throughout the coding of the WordPress site it would all be configured and coded for the primary domain.
It sounds like you would need to update the site home and site url from the primary to the add on domain url.
http://support.hostgator.com/articles/specialized-help/technical/wordpress/wordpress-home-fix
Also I would be suggest using a search and replace type plugin to go through all the internal coding to update the urls and links to the add on domain.
There is more information here as well http://codex.wordpress.org/Moving_WordPress

Megento dev site re-directing to live site URL

I'm having a huge issue with accessing my dev site. I two magentos sites on different servers. One is the dev site, the other live. However I needed to copy the database from the live to the dev site.
Ever since i did this i've had problems with accessing the dev URL. As it keeps re-directing me to the live site. I've googled the issue and tried the following:
Accessed the 'core_config_date' and changed the unsecure/BASE_URL & secure/base_url and changed them back to the dev URL.
I then went to clear the cache on the dev site, which had already been cleared from when i was installing a plugin.
Set everything to 0 in 'core_cache_option'.
Cleared cache on my browser
But i'm still getting the issue of the site re-directing to the live URL.
I've noticed a few people had had the same problem, but the above solution doesn't seem to be working for me. Any help would be much appreciated.
Thanks
Right so managed to sort it. It was a permissions issue. I overlooked it as I didn't have a linux user setup for this site. However the folder user was set to 'root' as opposed to 'www-data'.
For anyone with this issue in the future, I strongly recommend checking permissions on the server/folder for caching.
Steps to fix the issue:
Change base URL in the 'core_config_data' table (can be found on line 5 or 6, give or take)
Check permissions on your siteroot/var folder. Delete everything from /var/session & /var/cache
Run 'chown websiteuser -R siteroot' and then 'chmod u+w -R siteroot' for permissions changes.
That should be enough to get it working.
Do the below steps in your development server :
1) Check the development server database hostname,username, password in your config.xml file in below path : app/etc/.
2) Open your live server database in any editor and find the live site url entirely.
and replace with your development server url with searched result.
above two steps will solve your issues.
here after it will now solve.
3) Check your .htaccess file in your root folder to check the any redirection rule.
Check your file permissions and set them properly so Magento doesn't end up creating a MagicCache in the system /tmp folder which is where your core configs are being cached, allowing for you to clear var/cache till the end of time and have the settings in the database never take.
All over here Can't change Magento base URL -> Stuck in cache

Magento Backend Catalog page keeps refreshing

I have a magento install on a staging environment, everything is working except the catalog backend page and the frontend layered navigation. Look at the image below. There is a backend within the backend. When visiting the page it refreshes to infinity. See this identical problem
My first guess is there is a bug in the template file but an identical template file on my local machine does not cause any issues. Additionally the database between my local and staging site are identical minus the core_config_url. The only difference is local I am running Apache and on staging I am running nginx.
The second issue which I imagine is related is that the filters on the frontend catalog page dont work. They are visible but clicking on them reloads the page without changing the products.
Any help would be appreciated. Thanks
UPDATE: After switching from NGINX to Apache the issue disappeared. I still would like to figure out what is causing the problem
I take for granted that you had already tried different browsers/clearing your browser cache and Magento cache (empty the cache directory), etc.
Are you sure you put the correct value in the cookie_domain setting? Many users that had your same problem seem to have setted up an incorrect value in that setting.
Take a look here and let me know.
I have found that usually this is caused by a server-side error on the ajax request. If there is any kind of error response returned, it will just continue to spin. Either check your Chrome console for a 500 response, or look in your server's error logs.

Localhost is no longer working properly

I just built a site using Xampp and it worked great. I just transferred my site (that I used to develop by updating to live server) to localhost, and it isn't working right at all.
The images do not show and the pages are not refreshing properly.
I had to change the CSS images to /folder/x instead of just x, which I can understand I guess, but why are my HTML images suddenly not working?
One of the pages, the paths are even absolute, but the page just isn't updating even though it's saved in the local folder.
What gives? All I did differently was added a password to root user in MySQL and tried (and failed) at some mod_rewrites, which I removed.
It points the images from localhost/ instead of localhost/folder, even adding folder/x doesn't work.
You probably forgot to convert a link or made a mistake.
Remember that /images/x.png means that it's trying to find the folder images from root and not from the current folder your site is located in. Try using ./images/x.png instead.
Perhaps you could post an example from your site?
Try looking at the Apache access logs and see whether you can find a request for an image with the wrong path.

Resources