I've installed my laravel project on shared hosting. Everything was fine until when server starts loading old pages and scripts after uploading changes.
I've checked and cleared browser and laravel caches every time but the problem still. Then I've deleted laravel files but the server still loads main page while it should loads main directory content.
Now after installing laravel again the server loads the directory content for main url and works fine for other laravel routs.
The most confusing issue is the when trying to refresh browser several times, it loads the actual pages for one or two times then it back to load old cached files.
That was because of cloudfare caching.So I've to develop locally then upload the final release to remote server
Make sure that you are not using any caching services for page caching(actually page caching is a good feature), if yes please try invalidating the page cache.
If you are using Cloudflare, purge your cache. you can purge the cache of objects or full objects.
Related
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.
I'am currently working on a hosted web site which was developed with Laravel 5.3 in Bluehost . So for futher developments I have folled below procedure.
Compressed the folder and downloaded it in to local machine.
Created a public folder and moved relevant folders into it.
Via php artisan serve develpment started and everything went fine.
After the development only 4 files to be changed in the server. So I have opened the related files in server and updated the coding by just copy and paste.
When I refresh the web url after updating files I can see that php
and html updated correctly but css and javascript was not
updated. So I checked the files again but they are almost updated. But
when I view the source I can see that both css and javascript
files have not updated.
So I just created new files in the server with different names and linked them into the blade.php files and then css and javascript working fine .Also when I view the source they are also updated.
Can anyone say what is the reason for this?
This happens due to caching most of the time.
If you are using Cloudflare as a service purge the cache and give it a try.
Steps to purge your domain cache due to Cloudflare
STEP 01
Login to your Cloudflare account and select the domain you want to purge the cache.
STEP 02
Go to the caching tab.
STEP 03
In there, there are two options you can select. one is, you can purge the cache on selected file by simply given the URL of the file you want to purge the cache.
the second one is you can purge all cache in Cloudflare server under your domain by clicking purge everything button.
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?
The project is based on laravel and uploaded in cpanel. When I view the file from file manager it shows new source code, but browser is rendering pages based on old ones that I already deleted. Not the case with every page however, some are showing new updates.
I have tried uploading after clearing laravel cache and server apcu and opcache cache.
I think it's a caching problem, try deleting files in storage\framework\views\ directory.
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.