DATA FILES LOCATION ?

DATA FILES LOCATION ?

door John Gone -
Aantal antwoorden: 12
Hello Moodlers,
I,m sooo close I can almost touch it but...
I don,t know if this is the problem but I don,t seem to be able to get to my admin set-up page after I initialize from /moodle/admin.php. All sets up perfectly but no admin GUI. Actually during set-up I don,t get the "super admin" set-up page.
Windows server; mysql; smartFTP; phpmyadmin; shared hosting; great server admin and tech support [very important].
Could the following be the problem? I don,t clearly understand the process that follows. Somebody must be able to help put this in terms even I can understand.

// 4. DATA FILES LOCATION
//=========================================================================
// Now you need a place where Moodle can save uploaded files. This
// directory should be readable AND WRITEABLE by the web server user
// (usually 'nobody' or 'apache'), but it should not be accessible
// directly via the web.
//
// - On hosting systems you might need to make sure that your "group" has
// no permissions at all, but that "others" have full permissions.
//
$CFG->dataroot = "D:\inetpub\sites\www.mysite.com\web\folder\moodledata";

Thanking you in advance for your kind efforts,
Dimwit in Calgary, Alberta Canada

Gemiddelde van de beoordelingen:  -
Als antwoord op John Gone

Re: DATA FILES LOCATION ?

door Mark Smith -

This looks like a windows sad.gif set-up and I use linux, but I think I see a problem:

$CFG->dataroot = "D:\inetpub\sites\www.mysite.com\web\folder\moodledata";

The www.mysite.com needs to be the actual path, not the url.

I hope this is right.  Try it and we will see.

Good luck!smiley.gif 

Mark Smith

Gemiddelde van de beoordelingen:  -
Als antwoord op John Gone

Re: DATA FILES LOCATION ?

door Chris Hayes -
I'm pretty sure (i'm quite new to Moodle but have experience with PHP CMSes) that the access data for the admin is in the database and not in the file upload directory.

When you ran install.php, did you see all the pages mentioned in doc/install.html ?
Gemiddelde van de beoordelingen:  -
Als antwoord op Chris Hayes

Re: DATA FILES LOCATION ?

door Mark Smith -

Yes, I saw all of the pages.  However, I learned this one the hard way and had to have Martin's intervention to get it straightened out.  The lines of code mentioned in the installation instructions really are all that need modification.  I tried figuring it out without reading the instructions very close (a man thing) and changed several files until all was messed up.  Then, after several e-mails with Martin, I just reinstalled and only made the changes in the directions (which I knew by heart then).  Amazingly enough, upon following the instructions, it actually worked!

 

What I am saying about the request is that the only place where one uses the www.mysite.com type of reference is in the first listing of items to change in the config.php file.  After that, it has to be the actual path, or many "interesting" messages can appear.  Perhaps when Martin returns he can give us the technical reason why, but this has worked for me.  Actually, I did a Windows XP install first and even though I find that platform to be EXCESSIVELY unreliable, that one worked as well when I followed the instructions.  Again, I do not know the technical reason behind my initial install with creative "changes" not working-- I just know that the instructions saved my backside.

 

Mark

Gemiddelde van de beoordelingen:  -
Als antwoord op Mark Smith

Re: DATA FILES LOCATION ?

door Chris Hayes -
great, so it works now!

"(..)is that the only place where one uses the www.mysite.com type of reference is in the first listing of items to change in the config.php file. After that, it has to be the actual path, or many "interesting" messages can appear. Perhaps when Martin returns he can give us the technical reason why (,..)"

Some php functions, like for file handling, work easier or exclusively with the full file path on the server, in stead of the URL.

Another reason is that uploaded files may not be put inside the webdirectory. The public html files of www.whatever.org may be in
/home/whatever.org/www/
or any location that the host instructed the webserver to look at with www.whatever.org requests. In this directory any file can be activated with a url, and suppose someone uploads "hack.php" and then goes http://www.site.org/moodle/datadirectory/3/hack.php, it would be executed! (well - supposing the ownership and chmod allow it)

So security-aware people may put the data-directory OUTSIDE of the webdirectory, not reachable with a url.

In that case you cannot give Moodle a url-type path to the data-directory: with the security-aware people it would not be inside the /www/ directory.




"Windows XP ... be EXCESSIVELY unreliable"
oh that's funny, compared to win98 it is much more stable -in my case. But then again, I do not know what you compare it with, maybe linux or a win NT version.
[hehe but you may have done some 'man things' ;)]


Gemiddelde van de beoordelingen:  -
Als antwoord op Chris Hayes

Re: DATA FILES LOCATION ?

door Mark Smith -

"Windows XP ... be EXCESSIVELY unreliable"
oh that's funny, compared to win98 it is much more stable -in my case. But then again, I do not know what you compare it with, maybe linux or a win NT version.

I don't know how to tell you this...  I purchased a fully loaded notebook with Windows XP.  I lost all my data twice due to having to restore the hard drive from crashes.  CD back-ups saved most of what was lost.  I then purchased software to partition the hard drive to separate the data from the programs... you know, like they used to allow from windows before bill decided he wasn't making enough money???  Then when it crashed the next two times, all I lost was the program reload time, not the data.  (By the way, some of the programs for diagnostices are actually in the Home edition, just turned off by default.  I was informed of this when I asked their support people for the name of the corporate legal coucil.)  The interesting thing is that when the program restores, it says "starting Windows 98"...  And I thought I paid extra for XP!!!!!!!!

I am currently trying to move everything to linux and am promoting the use of free/inexpensive software through the local linux users group.  I personally believe that the practices of M$ are putting the data of Americans, and therefore the Americans themselves, at risk.  Don't know about other places-- I live in America.

 

Gemiddelde van de beoordelingen:  -
Als antwoord op John Gone

Probably sessions

door Martin Dougiamas -
Foto van Core developers Foto van Documentation writers Foto van Moodle HQ Foto van Particularly helpful Moodlers Foto van Plugin developers Foto van Testers
It's great to see all of you helping others out!

My 2c is I don't think the problem is because of the data files, but it could be a problem with sessions (there are a couple of bugs with some combinations of PHP and IIS on Windows).

Test this by going to: http://www.yoursite.com/moodle/lib/session-test.php

It should do the same as this: http://moodle.com/lib/session-test.php

See also: http://moodle.com/mod/forum/discuss.php?d=523
Gemiddelde van de beoordelingen:  -
Als antwoord op John Gone

Re: DATA FILES LOCATION ?

door John Gone -
Hello Everyone,
Wow, you all jumped right in with some great ideas and clues. Thank you.
Well, it turns out that Martin had the most direct answer as to this particular problem of setup issues.
The problem was with the PHP version on the server.
Hosting server was PHP 4.1.2, we need 4.1.3
So stripped the database tables out, reloaded the entire Moodle directory with new config.php to reflect the fact that uploads will be sent to a directory outside of the web directory. Upon trying to access Moodle admin.php for the first time I am now recieving the following message.

Fatal error: Failed opening required 'd:\inetpub\sites\www.mysite.com\web/lib/setup.php' (include_path='.') in d:\inetpub\sites\www.mysite.com\web\zz\config.php on line 112

[ line 112 is the following: require_once("$CFG->dirroot/lib/setup.php"); // Do not change this ]

No extra spaces or characters at page bottom, config.php has to be the problem but I can't see where.

I contacted my hosting provider admin and we did the setup together so I'm sure this is a very simple issue with config.php

Any ideas?

Thanks again everyone,
John in Calgary
Gemiddelde van de beoordelingen:  -
Als antwoord op John Gone

Re: DATA FILES LOCATION ?

door Mark Smith -

This is exactly the error message I received when I was trying to do some modifying other than what was required by the directions.  I stripped everything out.  I unzipped the moodle file again.  I also made sure that the database name, owner, and permissions were set properly.  Then when I started up, all went perfect!!biggrin.gif

Start over.  It will be easier in the long run.  I would also recommend using a server that runs linux.

Mark

Gemiddelde van de beoordelingen:  -
Als antwoord op John Gone

Re: DATA FILES LOCATION ?

door Terri Teacher -
Hello All,
Finally up & running! A large thanks once again to everyone for the help. Martin, thanks for sharing this and I hope the research goes well. This is a way interesting project. The list of participants and their locations is very diverse.
The setup is a snap but with limited skills combined with virtual server hosting it's easy to get lost in the terms and phrasing. Be prepared to contact your hosting provider and ask for help, if they won't help find someone else to host your site.Best to spend the time before hand reading the documentation regarding server requirements.
I think my server admin learned a few things during my setup of Moodle on his server (Windows 2000).

Unrelated- sort of. To "MARK SMITH" I've been running XP pro since Nov.2002 and in spite of my inherent dis-like of MS I must say this is a very stable OS. I work the daylights out of this poor PC
XP pro/ AMD 450/ 192 MB/ 4MB video/ 10.2GB Maxtor & 8.1GB MAxtor totalling 6 partitions with Page File on seperate drive from OS.
and I have never, repeat NEVER, crashed. I've shut down my photo editor a couple of times but simply reopened the image and carried on. These crashes were likely due to the crummy 4MB video card.I think you should really discuss the laptop issues with the manufacturer. One thing for sure is XP does not like to run on a drive with less than 15% free space. That's why I run the OS on a seperate partition with plenty of free space. Data resides elsewhere, OS is very happy. Good luck.
Sorry for the book length article folks, thanks again for the help,
John in Calgary
Gemiddelde van de beoordelingen:  -
Als antwoord op Terri Teacher

Re: DATA FILES LOCATION ?

door John Gone -
Sorry for the post using "Guest teacher". I was moodling around in here using, obviously, the guest teacher account. I,m posting again in case of destruction by subsequent "Guest teacher" log-ins.
John in Calgary.


Hello All,
Finally up & running! A large thanks once again to everyone for the help. Martin, thanks for sharing this and I hope the research goes well. This is a way interesting project. The list of participants and their locations is very diverse.
The setup is a snap but with limited skills combined with virtual server hosting it's easy to get lost in the terms and phrasing. Be prepared to contact your hosting provider and ask for help, if they won't help find someone else to host your site.Best to spend the time before hand reading the documentation regarding server requirements.
I think my server admin learned a few things during my setup of Moodle on his server (Windows 2000).

Unrelated- sort of. To "MARK SMITH" I've been running XP pro since Nov.2002 and in spite of my inherent dis-like of MS I must say this is a very stable OS. I work the daylights out of this poor PC
XP pro/ AMD 450/ 192 MB/ 4MB video/ 10.2GB Maxtor & 8.1GB MAxtor totalling 6 partitions with Page File on seperate drive from OS.
and I have never, repeat NEVER, crashed. I've shut down my photo editor a couple of times but simply reopened the image and carried on. These crashes were likely due to the crummy 4MB video card.I think you should really discuss the laptop issues with the manufacturer. One thing for sure is XP does not like to run on a drive with less than 15% free space. That's why I run the OS on a seperate partition with plenty of free space. Data resides elsewhere, OS is very happy. Good luck.
Sorry for the book length article folks, thanks again for the help,
John in Calgary
Gemiddelde van de beoordelingen:  -
Als antwoord op John Gone

Re: DATA FILES LOCATION ?

door Mark Smith -

Yes, I have heard good things about XP Pro.  My concern is that M$ may have taken a decent operating system (XP Pro) and then disabled it (XP Home) and vioala! a chance to sell a "diversified" product.  However, when it repeatedly crashes and the system itself has software turned off that would help, where is the responsibility?  Especially when M$ requires what needs to be on these notebook systems?  And I agree with the partition issue, but does M$ not have enough computer savvy to know that it is a good idea to keep the data separate from the OS in case of a (heaven forbid) crash?  If not, what does that say about the collective intelligence there?  Oh well, with bill's partial ownership at apple maybe he will get some better ideas...wink.gif

 

In any case, this system is great!biggrin.gif

Gemiddelde van de beoordelingen:  -
Als antwoord op Mark Smith

Re: DATA FILES LOCATION ?

door John Gone -
Hi Mark,
Just to clarify a couple of points. My point with keeping OS seperate from data wasn't so much to protect the data as it keeps the C: drive clean as there is no more data being written and removed from the drive than necessary. OS resides at C:/ page file (virtual memory) resides on G: MP3's on I: etc. Seperating the OS C: drive [HDD1] from the page file G: [HDD2] 1st partition for efficiency simply speeds up this old underpowered PC is all. As far as keeping data safe that's what regular and frequent back-ups are for. XP pro and XP Home are both adequate. XP Pro simply has a few additional connectivity options really. I think if you stripped the hard drive on that laptop, an external hard drive would help with this chore, and started over with a slightly more practical setup you would maybe have the laptop you thought you were getting.
Finally, yes this is a great CMS and I'm grateful to M.D. for letting us use it. I will enjoy watching it develop in the years to come.
Good luck with the laptop, long live open source!
John in Calgary
Gemiddelde van de beoordelingen:  -