Can't Locate Upgraded Version on the Server

Can't Locate Upgraded Version on the Server

by Arlo Speer -
Number of replies: 16

I am upgrading from 1.9.2 (Build: 20080711) on as server that uses PHP Version 5.2.17.

I backed up my files, renamed my Old Moodle folder, uploaded the 1.9.14 .zip file, expanded it, copied over my config.php file into the new Moodle folder and attempted to visit the administrator notifications link.  That's where the problem entered the picture.  I've re-confirmed that the config.php file is actually present.

I get a message saying "The requested URL /Moodle/Admin was not found on this server." (... or "The requested URL /Moodle/ was not found on this server.", if I simply try to access the site normally).

I also get this message: "Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

If I rename the new Moodle folder and return my former Moodle folder back to its "Moodle" name, I can once again access the original 1.9.2 version.

Initially, I attempted to upgrade to 2.0.5 with the same results.  Assuming that the problem might be version-related, I tried upgrading to 1.9.14 as an interim step ... with no joy.

Can anyone suggest what I might be missing in my procedure?  After some months of inactivtiy, I wish to bring my Moodle site back into action so 2.1.2 is where I ultimately want to be.

Average of ratings: -
In reply to Arlo Speer

Re: Can't Locate Upgraded Version on the Server

by Nilesh Gamit -

Hi

let say moodle 1.9.2+ is installed in moodle/ directory and moodle data is there in moodledata/

step1: take backup of moodle/ and moodledata/ directory, take backup of database
step2: have copy of config.php handy
step3: delete everything from moodle/ directory
step4: download moodle 1.9.13+ (which is stable and next stable is 2.0.4+)
step5: copy data from moodle 1.9.13+  to moodle/ directory
step6: change config values in config.php (db user, db pwd, db name etc)
step7: visit your admin section of site & it will show upgrade instructions

- Nilesh

 

In reply to Nilesh Gamit

Re: Can't Locate Upgraded Version on the Server

by Arlo Speer -

Thank you, Nilesh.  I appreciate the help.

Steps 1 - 5 have been done -- except that I renamed the old Moodle directory ... that should have the same impact as deleting everything from them since the install process creates a new Moodle directory structure anyway -- right?, or am I missing something?.  

I can't achieve step 7 -- it's when I try to visit the admin section that I get the error message.

What I haven't tried is your step 6 -- it brings me to two questions:

a) how to I change the config values?, and

b) to what to I change those values?

Arlo

In reply to Arlo Speer

Re: Can't Locate Upgraded Version on the Server

by Robert Brenstein -
Since you renamed folders, config.php might be fine as it is. Have you checked that the new Moodle version has the same permissions and owner/group settings as the old one? I mean folders and files. May be the new version is there but not accessible to the Apache process.
In reply to Robert Brenstein

Re: Can't Locate Upgraded Version on the Server

by Arlo Speer -

Thank you for the suggestion, Robert.

Right now, I have two "moodle" folders -- one called "moodle" that is the old 9.2 version and it runs as it should.  I also have another folder called "moodlenew" that is the 9.14 version.  When I rename the folders so that the new folder has the name "moodle", I get the "Can't locate ..." message.  Each folder has a config.php file and I have checked the two files -- they are identical.

Since I can't access Moodle through the new moodle files, I can't change permissions through the Moodle site itself.  I have used cPanel's File Manager to check the permissions on the folders within each moodle directory and on the individual files within each moodle folder.  The permissions are identical across the two folders.  All folders within the Moodle folders have permissions of 7 5 5 -- (Read, Write and Execute all checked for User and just Read and Execute for Group and World); individual files within the moodle folders all have permissions of 6 4 4 (Read and Write for User and just Read for Group and World).  I haven't checked every sub folder down a second level, but I have spot checked them and the ones I checked have the same permission settings, too.

When you mention "permissions and owner/group settings", I assume that the "owner/group" reference was to what the cPanel "permissions" option calls User, Group and World ... is that correct, or am I missing another meaning for "owner/group"?

If the new version isn't accessible to the Apache process, how can I address that possibility?

Thanks again for the help ... I'm still not able to access the new site; however, I am getting a different error message tonight -- not that I've made any changes to what was running yesterday.  I did notice that cPanel has logged half a dozen errors in its Error Log -- they are from five different (and unknown) clients, none of which me me. 

Here are the messages I get today:

Warning: require_once(/home/learning/public_html/Moodle/lib/setup.php) [function.require-once]: failed to open stream: No such file or directory in/home/learning/public_html/moodle/config.php on line 22

Fatal error: require_once() [function.require]: Failed opening required '/home/learning/public_html/Moodle/lib/setup.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/learning/public_html/moodle/config.php on line 22

Hmmmm!  Any ideas?

Arlo

In reply to Arlo Speer

Re: Can't Locate Upgraded Version on the Server

by Robert Brenstein -
755 for folders and 644 for files sounds right. However, something is amiss somewhere. Those errors are indicative of either files really not being there or permissions problem. Did you use cPanel's File Manager to check the permissions of the "moodlenew" folder itself? You mention only checking within.

By owner/group settings I mean unix-level owner and group settings which are separate from permissions. However, I don't think you have access to control these through cpanel.
In reply to Robert Brenstein

Re: Can't Locate Upgraded Version on the Server

by Arlo Speer -

Robert:

Thanks for sticking with me ....

Yes, both the operating "Moodle" (9.2) and the "MoodleNew" (9.14) folders have 7 5 5 as their permissions.  I've checked every subfolder in each of these folders along with every file within both the Moodle and Moodlenew folders -- they're all the same across the two moodle folders.

I have also spot-checked some (but not all) of the sub-folders within each sub-folder of each of the two moodle directories (i.e., two levels down from the moodle directories themselves).  The ones I've checked are all the same in each of the two moodle foldlers and sub-folders all seem to retain the same permission values as the parent folder.  Is it worth checking all of sub-, sub- folders and files individually?  I've assumed that the permissions will continue down through subfolders (since that's what I've seen so far) and assumed that since my sampling saw no changes, there liklihood of differences were slim to none.  Is it worth checking each and every folder and file -- that's certainly possible if it's likely to be productive.

You're right, cPanel doesn't give access to the unix-level settings.  I've asked the site administrators to confirm certain other settings (based on a suggestion from an earlier reply to my original posting) -- haven't heard back yet (hmmmm).  I'll ask also about the unix-level owner and group settings -- can you give me some idea of what those settings should be so I can make my request sound a bit intelligent and directed to what is needed?

Thank you again for the continued help .... 

In reply to Arlo Speer

Re: Can't Locate Upgraded Version on the Server

by Robert Brenstein -
Caching could be another problem, although I doubt that moodle changed its file structure between versions 1.9.2 and 1.9.14. What you can try is to edit the config..php in the moodlenew folder to match the folder name to moodlenew and try accessing it under moodlenew instead of moodle.

In reply to Robert Brenstein

Re: Can't Locate Upgraded Version on the Server

by Arlo Speer -

Robert:

Making progress (I think).  I edited the config.php file in the new moodle directory.  Then, when I tried to access the new moodle, I got exactly the same error messages from the new moodle (9.14) and was still able to open the old moodle (9.2).  

Then, I did the opposite -- I gave the 9.14 the name "moodle" and 9.2 the name "old moodle" and modified the config.php accordingly.  The result was that I could access the 9.2 version with its new name and got the error messages with the 9.14 version when it was called just "moodle".

Or, said another way, whether I call the 9.2 version "moodle" (with "moodle" in its config.php file) or call it "moodleold" (with "moodleold" in its config.php file), it opens with no error message.  Whether I call the 9.14 version "moodle" (with "moodle" in its config.php file) or call it "moodlenew" (with "moodlenew" in its config.php file), it gives the same error message.

That seems to tell me that the problem (whatever it is) rests within the files of the new moodle directory (regardless of what I call that directory) ... am I right?  (Not that it points me to a solution, but .....).  Does it point you anywhere?

Arlo

In reply to Arlo Speer

Re: Can't Locate Upgraded Version on the Server

by Robert Brenstein -
yes, that seems to be the gist of it. I would suggest you just get rid of that new folder and install again.
In reply to Robert Brenstein

Re: Can't Locate Upgraded Version on the Server

by Arlo Speer -

Robert:

I blasted the initial moodlenew.  I tried installing 9.14 again -- with exactly the same results.  I then blasted 9.14 and installed 2.0.5+ ... again with the same results: I'm still getting the same error messages.

I notice that the config.php file includes this line:

$CFG->directorypermissions = 00777 ;

Are those "permission" the same ones that I checked before?  If so, this number differs from what shows on the individual folders and files (644 or 755).  Does that help point to any potential problem?

Still puzzled and still most appreciative of your help,

Arlo

In reply to Arlo Speer

Re: Can't Locate Upgraded Version on the Server

by Arlo Speer -

Grasping at straws ....

1) I'm still trying to get some response from my hosting service (hmm!) about the possibility that Apache modification will help.

2) In digging through my site, I find a couple of "Server Checks" messages in the "Environment" section of my site.  One talks about the need for UTF-8 format and the other about an xmirpc extension -- the former in a scary, red colour and the latter in a yellow colour.

Each of these messages seems to relate to errors that the page claims need to be resolved before installing another version of Moodle.  Is there any possibility that either of these issues would cause my problems?

I'm particularly puzzled buy the UTF-8 message.  From what I can see from MoodleDocs, the non-UTF-8 format was used with older versions of Moodle (i.e., from before my 9.2) and that UFT-8 was mandatory from 1.8 onward.  9.2 was my initial installation, so I assume that I'm already at the UTF-8 format, but ......?

It seems that each of these modifications requires work in Apache and I haven't been able to find how to access Apache through either my Moodle installation or through cPanel.  Is there something I'm missing or will this involve action by my hosting service?

(Aren't you sorry you answered my initial posting?  I'm sorry to keep pestering you, but your ideas have helped me so far be pointing me to elements that I hadn't worked with before.  I do appreciate your help.)

Arlo

In reply to Arlo Speer

Re: Can't Locate Upgraded Version on the Server

by Stuart Morrison -

Hi

Reading through some of your posts there are a few things I notice.

On occasion you use Moodle (with a capital M) and on occasion you use moodle (without the capital) if your "new" moodle is being unzipped it would naturally create a folder called moodle (lowercase m) - if your old config.php file specifies an uppercase M at the start of Moodle in the path it might not be able to find the files.

There is a whole section on converting to UTF-8 and a script included in moodle to do so.  It is something you will have to do.  I think it is easiest to convert to UTF 8 from the command line using th escript included with moodle, it can also be done in phpMyAdmin.

I believe xmlrpc allows moodle instances/servers to talk to one another - if you do not need to facilitate this you probably do not need to worry.

Hope something helps!

In reply to Stuart Morrison

Re: Can't Locate Upgraded Version on the Server

by Arlo Speer -

OK, Stuart ... this is me, very red-faced!!!!

uppercase / lowercase ... whoda thunk.  I was so hung up on the new environments of cPanel and the inner workings of Moodle that I forgot the basics.  Thank you so much!

However .... I am puzzled by the UTF-8 situation.  My understanding is that 1.9 requires UTF-8, so it seems that my site should already be there.  Checking further, using phpMyAdmin from my cPanel, it tells me that "My SQL Connection Collation" is UTF-8.  (It was originally UTF8_general_ci  and I've also tried UTF8_unicode_ci.)  phpMyAdmin also tells me "MySQL charset: UTF-8 Unicode (utf8)".  Doesn't that mean I'm already operating with UTF8?  Also, I can find much discussion on the Moodle site about the need to convert to UTF8, but I'm missing the steps to do that.

As I understand it, I'm confused.

Arlo (still, with the red face!)

In reply to Arlo Speer

Re: Can't Locate Upgraded Version on the Server

by Stuart Morrison -

The UTF 8 I think might be caused by a few tables that are legacy and are not UTF 8 (even if general collation is).

Instructions for converting databases with tables are:

http://docs.moodle.org/20/en/Converting_your_MySQL_database_to_UTF8#Converting_a_database_containing_tables

There is also a link to a forum post which might help:

http://moodle.org/mod/forum/discuss.php?d=165313

I was thinking there was a script, but after refreshing my memory looking at bash_history that is for changing from ISAM to InnoDB.

It is nice to think I have been of help and you are getting sorted.

In reply to Arlo Speer

Great News & Bad News

by Arlo Speer -

My initial "Can't Locate" problem was finger problems on my part ... I had mixed upper and lower case instances of "moodle" and "Moodle" -- once I stopped that, the upgraded version could in fact be located.

Regarding the UTF8 thing, wall as I understand it, I'm officially confused!

After a number of days of getting the "can't upgrade because it needs to be UTF8" message (followed by checking everywhere and finding every indication that I actually AM UTF8), today when I logged on, the UTF8 message was gone and I was able to upgrade without issue.

The system is not running 1.9.14 and (after a few checks of various parts of the site) seems to be running well.

So, the great news is that whatever wasn't working before is now working.  The bad news is that I have no idea what changed to make the upgrade work, but ... at least it's working.

Thanks again for your help ... your input certainly left me more wise about things Moodle and I appreciate it.  I'm just sorry that I took so much of your time over my inability to remain consistent with "M" or "m".

Arlo

In reply to Robert Brenstein

Re: Can't Locate Upgraded Version on the Server

by Arlo Speer -

My initial "Can't Locate" problem was finger problems on my part ... I had mixed upper and lower case instances of "moodle" and "Moodle" -- once I stopped that, the upgraded version could in fact be located.

Regarding the UTF8 thing, wall as I understand it, I'm officially confused!

After a number of days of getting the "can't upgrade because it needs to be UTF8" message (followed by checking everywhere and finding every indication that I actually AM UTF8), today when I logged on, the UTF8 message was gone and I was able to upgrade without issue.

The system is not running 1.9.14 and (after a few checks of various parts of the site) seems to be running well.

So, the great news is that whatever wasn't working before is now working.  The bad news is that I have no idea what changed to make the upgrade work, but ... at least it's working.

Thanks again for your help ... your input certainly left me more wise about things Moodle and I appreciate it.  I'm just sorry that I took so much of your time over my inability to remain consistent with "M" or "m".

Arlo