I've been having a reoccurring issue with my VPS since I moved to a new company and I'm trying to figure out what the issue is. There are a few different things going on (I believe they are all connected) --

  1. When you visit a page that doesn't exist, instead of throwing a 404 error, it shows a page which looks like the index.php file in the respective directory you are in.
  2. The bigger issue, is that when I'm uploading new files through FTP, they are successful but when I visit the page in the browser, nothing has changed. In fact, I've tried clearing the browsers cache and I've even visited the site in three browsers (Safari, Firefox, & Chrome) to make sure it wasn't something specific to one of them. In all cases, the same (old) page displays. I've also noticed a similar behavior when you log in to the site. As it's setup you are shown a login link if you're not logged in, upon logging in, the link changes to show your username. I'mm logging in (and it's updating a timestamp on the database which is working correctly) but it doesn't show me logged in at the top of the screen. It still shows the Login option.

#1 I have no clue on so any help would be appreciated. As for #2 I am thinking the host is doing some sort of caching on their side that's causing this error? Of course, I'm no expert either so if you all have some ideas please let me know.

Specs: I'm running a Xen Linux VPS. Apache 2.2.19, PHP 5.3.6, mySQL 5.1.56, and cPanel/WHM are all installed and running.

So I’ve done a little more digging and fixed the 404 issue, it appears there was something in the .htaccess file that was causing the problem. I deleted the file completely and that’s running good now.

I’ve also been doing some testing on the cache issue. I’ve tried restarting both Apache and my VPS to make sure it wasn’t some glitch, the error still persisted. So I removed the index.php file to make sure when I was FTPing files the timestamp was updating and it is. I also created a test page (test.php) that has just some words and a php function to print the current date/time. That works and on refresh, the time updates as it should. When I put that same function however into one of my “normal” pages, I get the same error whereby on each refresh, the time stays the same.

Hopefully this update may help in identifying the problem.

I've fixed the issue! :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.