Can't save config

Can't save config

by Manh VU -
Number of replies: 6

Hello every one.

I develope moodle 2.8, run as well as in window server. But I deploy on Oracle Linux, I have get a message.

"Can not read file, either file does not exist or there are permission problems

More information about this error"

I have config moodledata with

chmod -R 777 moodledata

please let me your solution.

Thanks

Average of ratings: -
In reply to Manh VU

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Trả lời: Re: Can't save config

by Manh VU -

Hi Alan Hess,

I am very nice to get your help.  I am customizing moodle 2.8 on windows os and Xampp. I have deploy in a server with windows 2008 server. The moodle run as well as.

today, I have to deploy the moodle that was customized on oracle linux. I have met the proplem. some steps I did.

1. export mysql database:

2. zip moodle source code folder and moodledata folder.

3. upload all file to linux server by ftp with root

4. create database and user

5. import database from the mysql file.

6. unzip moodle to /var/www/html/ and moodledata to /var/moodledata

7. chmod -R 777 moodledata and chown -R apache:apache moodledata

8. chown -R apache:apapche moodle

7. Edit config.php file

That is all I did that

Thanks

In reply to Manh VU

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Trả lời: Re: Can't save config

by Manh VU -

Thank you,

I have installed the other server it seems works, but  after login the home is blank page and detail of course. other page is very good such as course list, ....

I have attacked  2files.


Thanks


Attachment 4-21-2015 4-06-33 PM.png
Attachment 4-21-2015 4-07-13 PM.png
In reply to Manh VU

Re: Can't save config

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Manh

As far as i can see, you have carefully followed https://docs.moodle.org/en/Moodle_migration#Migrating_a_complete_Moodle_site_-_method_2, except step 8. The apache user need only read permissions in /var/www/htm/moodle. Having write permissions is a security hole. But that is not your current problem.

Another pending point is http://yoursite/admin/tool/replace to replace the full URLs in the database. Again, unlikely to be your current problem.

After going through those eight steps you get https://docs.moodle.org/en/error/moodle/storedfilecannotread error? Are you sure you have the full (absolute) path of moodledata in config.php? Does that error come up in the main Moodle page, too? The usual cause is missing files in moodledata. Can you walk through the directory and compare with the original?
In reply to Manh VU

Re: Trả lời: Re: Can't save config

by Ken Task -
Picture of Particularly helpful Moodlers

First, Oracle Linux appears to be "like" RedHat Enterprise with some "suttle" differences - that's assumed reading over their website/information.  They offer training classes ($3500.00 per course) in admin of their system.   They do NOT offer any community (at least open to public) support forum.   You can, however, purchase a support contract - I didn't bother looking up that cost.   This to say ... when you have issues with Moodle related to the OS, not much support may be acquired here in these forums *UNLESS* the responder happens to run Oracle Linux.   What answers you do get are 'educated guesses' ... such as below ...

Before one places moodledata and does something 'non-standard' for the OS they run, suggest finding the config file for your apache server.   IF Oracle Linux is like RHEL, that is located in /etc/httpd/conf/ and the file is httpd.conf.

*IF* I am correct this command will show where your apache instance has defined 'DocumentRoot':

fgrep DocumentRoot /etc/httpd/conf/httpd.conf

It should show this:

# DocumentRoot: The directory out of which you will serve your
DocumentRoot "/var/www/html"

this means your moodle folder or moodle code goes into /var/www/html/

Your moodledata folder then *should* reside in /var/www/

Reason ... apache user (under which apache runs) already has access permissions to that directory AND it satisfies Moodle requirement NOT to be directly accessible via any browser via URL.

Still have to change ownerships (like you have done) and check permissoins.

Am a little confused about the screen shots ... those show the same IP address when accessing.

If the site was developed on a server with a different IP address (say 192.168.1.120) then part of the migration to another server (different IP address) is to find all the references in the DB that pointed to that 192.168. IP address and change them to the current IP address - the IP address of the server to which you are  migrating.  There is a tool to do that: http://10.IP/admin/tool/replace/

IF using that tool, be sure to search for 'http://oldip/' and replace with 'http://newIP/' ... ie, include the http:// in front and the trailing slash at the end.

Also, *IF* Oracle Linux is like RHEL, SELinux might be running.   SELinux will prevent successful migration of  Moodle IF moodledata is placed outside of what apache considers it's 'working' directory ... ie, /var/www/

'spirit of sharing', Ken

Average of ratings: Useful (1)