Welcome Guest, Not a member yet? Register   Sign In
Upload a new controller to host, old code still running
#1

[eluser]Scott Gunn[/eluser]
Hi, I have uploaded some modified controller code, but the old controller code is still running. I've even modified the code to do nothing but

echo "test";

... yet the old code is still running. The old code does not exist anywhere else on the server, so the compiled version must be getting cached somewhere.

I can create a non-codeigniter php file, upload it, view it, modify it, view it again, and the changes appear instantly on the web page, so it doesn't appear my host (1and1.com) is caching everything on my behalf.

My system/cache folder is empty.

Any ideas what I can look at?
#2

[eluser]elvix[/eluser]
maybe something in your routes config is redirecting the url to another controller?
#3

[eluser]Scott Gunn[/eluser]
Thanks for the reply. I have not added any routes, and there is no other controller on the webhost that can possibly be running the code that is actually getting executed.
#4

[eluser]TheFuzzy0ne[/eluser]
Two solutions:

1) Clear your browsers cache. If that doesn't work then,
2) You are not uploading to the right place.

I had this problem some time ago. I was editing a file in a different location to where I'd thought.
#5

[eluser]Scott Gunn[/eluser]
That's what I thought. It is definitely not a browser cache issue as I've tried from different PCs (as well as clearing cache, shift-refresh, etc.). I can also see in the apache web log that new requests are coming in.

I have also double and triple checked my upload location. There is only one copy of this controller on the entire web server (and on the entire internet), yet it is still an old copy getting executed.
#6

[eluser]TheFuzzy0ne[/eluser]
Are you certain you're using the right URL? Just rename the index.php file to something else, and if it's still working you know that it's a problem with either the location the files are, or the URL you're using to access them. Honestly. You'll kick yourself when you find that duplicate set of files. I'd suggest running a search for something like "controllers" and see how many directories are found.
#7

[eluser]Scott Gunn[/eluser]
Ok, I tried what you suggested. I renamed the index.php file and got the expected error code 500. I am certain there is no other controllers directory on the server.
#8

[eluser]TheFuzzy0ne[/eluser]
OK, check out the $system and $application variables in the index.php file. Perhaps they aren't pointing to the right place? Also, whilst navigating the server view, go into the controllers directory, and open up your controller. See if you can see any of your changes in there. I'd suspect you won't.

If this is the case, the only other thing I can think of is that it may be file permissions.

If you still can't figure out the problem, please post the code to your controller.
#9

[eluser]Scott Gunn[/eluser]
$system and $application are both set to "system" and "application", respectively.

I have emailed 1and1.com's tech support. I have a suspicion they have a caching solution provided that isn't playing well with codeigniter. I have even tried "touching" every file and directory involved (index.php, CodeIgniter.php, mycontroller.php, the directories, etc.) so that modification timestamps are newer, but still no luck.
#10

[eluser]jedd[/eluser]
If they have a caching system, how do you explain the 500 error when you remove the index.php file?

I think your problem lies elsewhere.




Theme © iAndrew 2016 - Forum software by © MyBB