Welcome Guest, Not a member yet? Register   Sign In
Version skip?
#1

[eluser]pilage[/eluser]
Hi,

I have sort of inherited a CI site that is sitting on my server. I recently changed server software to nginx from apache. during that process I lost php4.
Issues:
-some of the images on the "projects" page are missing.
-Hitting project link a second time gets 404. link changes from www.triumphrestorations.net/projects.php to www.triumphrestorations.net/projects.php/current/
-there was another problem with the project and admin pages getting a 404 but the "?" in the link settings in config.php took care of that.

I was thinking that upgrading to the latest version of CI might take care of the issues. Thinking that CI code would be all php5 now and hoping that the old code(1.3) would have php4 only compatible stuff hence causing the issues. from what I can tell the site is CI 1.3. looking at the upgrade path it seems I need to hit every version from 1.3 to 1.7.1. Is there a way avoid doing all fourteen upgrades? just downloading every version would be a pain let alone doing the upgrade for each.

If there are other fixes people may know about for these issues pllease let me know. I have had only a day or two with CI so I am sure there is stuff I missed.

Thanks,

Pilage
#2

[eluser]jedd[/eluser]
Hi Pilage, and welcome to the CI forums. Shame about the unfortunate circumstances, though.

Others have much better knowledge on some of these issues, but I'll throw my 2c in up front.

In general - and you can read the changelogs to verify - CI upgrades tend to be less about bug fixes and more about feature changes, so while your logic is sound, I wouldn't rely upon this as solving your problems. The core code is designed (still) to be resilient on both PHP4 and PHP5.

Obvious caveat here is if your previous developer did some dodgies with the core code. I'd check through to make sure that they did not, but that might be tricky if they weren't the kind of person to annotate code whenever they made a change.

Similarly, you should be able to go from old to new version, without the intervening 14 steps (you're right - that'd be a total pain in the proverbial) by just reading the various changelogs, and making sure that you've got everything covered. 9 times out of 10 the upgrade for each version just involves primary code code (which as I say you shouldn't have modified versions of anyway) so it should, to use the vernacular, Just Work.

Of course you'd want to test this in your development environment first to be happy.

On that note ...

Quote:-some of the images on the "projects" page are missing.

Some fits in the same category as intermittent, when it comes to describing errors. Very bad news. This sounds like it could be quite messy (and obviously makes regression testing (above) harder as you'd want to test every image.

Quote:-Hitting project link a second time gets 404. link changes from www.triumphrestorations.net/projects.php to www.triumphrestorations.net/projects.php/current/

You might have already fixed this, but it works okay for me at this end (konqueror on KDE).
#3

[eluser]tomcode[/eluser]
Welcome pilage,

I run CI powered sites with no problems under PHP5.

The code You changed is just the frame work, not the application built on top.

Upgrading through all the different vesions of CI is pointless. Stick with the latest release.

You need to adapt the application code to PHP5.

EDIT : and maybe some app code to the new functionalities found in the latest relase of CI.
#4

[eluser]jedd[/eluser]
Addenda - ahh, I see what you mean. If you hit the menu item 'Current Projects' a second time, while you're already on the current projects page, you get the URL change (it suffixes /current/ ) and the subsequent 404.

Without seeing the code - and you might have to start thinking about sharing some of this with the brains trust here - it's tricky to say. Normally header stuff is done in one fell swoop, so you should have a view snippet or a controller method that generates that menu bar at the top. If you can find the code, and you can't work out what's wrong, then post that for starters. Obviously it's looking like it does some modification of the menu based on the current URL (you're looking for code that refers to this->uri->segment (or rsegment) stuff).

EDIT - I see that each of the menu URL's, if you are on that particular page already, modify its menu item to suffix a '#', with the exception of the current projects page, which suffixes the '/current/'. That may be insightful. Or it might not. Hmm, I feel like Alain de Botton. (Or do I?)

EDIT 2 - I see that the 'menu' at the bottom of the page offers the same links,but does not do the same screwy stuff with each link based on the current context. This is insightful insofar as it suggests the developer was perhaps not burdened with excessive competence.
#5

[eluser]pilage[/eluser]
Thanks guys,

I will start checking those. I am not a php coder but i can usually look at things and see what they are doing and figure them out. with that said i am still trying to wrap my head around the CI structure/framework. I would gladly post code, if i knew which code to post Wink
I saw another post refering to trailing slashes and .htaccess files. i went back and looked and there are no .htaccess files on the site(which is good cause i am no longer using apache).

I will keep digging and try the upgrade. even if it doesnt fix the issues, it is usually a good idea to be on a recent version when asking for help.

Thanks again i will be back

pilage
#6

[eluser]jedd[/eluser]
As you'll have discovered from the installation / upgrade guides, all the site-specific code should reside under the application directory within the system directory.

So if you're on Win32, you can drop to a CMD shell, and do a dir /s > dirlist.txt in there, and that should give you a full list of application files that you can paste here - only needed if it looks like it'll be useful (ie. depending how you go with your upgrade).
#7

[eluser]pilage[/eluser]
Ok, so this may not be the best route but I figured I would do the upgrade and then work out all the problems. Two reasons behind this:
1.some problems may be fixed with the upgrade
2.If I worked out all the problems then went and did the upgrade and then had a whole new set of problems I would not be happy.
Don't worry I made a backup.

So i copied over the entire system folder and then set the DB properties and these:
$config['base_url'] = "http://www.triumphrestorations.net/";
$config['index_page'] = "projects.php?";
I get the welcome_message.php now on my projects.php instead of content.
I also tried changing the $config['uri_protocol'] = "AUTO"; with no changes.
I looked at hooks, autoload, constants and routes. I tried changing the default route away from welcome to projects and got a php error so i changed it back.

There is probably a noob setting that I am missing that the original person who set it up did and i just haven't found it yet and probably over-wrote it with the upgrade.

I need to run out for a bit but will be back later.

I really do appreciate all the help

pilage

p.s. FYI server info:
OS: Gentoo Linux
Web server: nginx
php: PHP5 w/fcgi support
if someone thinks it may be with those i can provide more info/configs.
#8

[eluser]pilage[/eluser]
jedd,
I just saw your edits. I will check those when i get back. the lawyers office awaits Sad

pilage




Theme © iAndrew 2016 - Forum software by © MyBB