If i can view config.php...

If i can view config.php...

Dario De Notaris -
回帖数:10
Sorry for my english... i'm italian.

After i uploaded and modified config.php i launch it with http://domain.com/moodle/ .
But the browser (firefox) show the lines included in config.php :


dbhost = " user='muser' password='mpass' dbname='mdata'"; //
//
$CFG->dbtype = 'mysql'; // mysql or postgres7 (for now)
$CFG->dbhost = 'localhost'; // eg localhost or db.isp.com
$CFG->dbname = '_moodle'; // database name, eg moodle
$CFG->dbuser = '_moodle'; // your database username
$CFG->dbpass = '****'; // your database password
$CFG->prefix = 'mdl_'; // Prefix to use for all table name

etc etc etc...

Why?
回复Dario De Notaris

Re: If i can view config.php...

Shane Elliott -
Core developers的头像 Plugin developers的头像
2 quick things to check:
1. Have you got PHP installed and properly configured?
2. The first line of config.php should be:
<?php
otherwise the file will be treated like normal html

HTH
回复Shane Elliott

Re: If i can view config.php...

Dario De Notaris -
tnx. now the config.php works, but it show :

Warning: mkdir(/home/domain/public_html/moodle_upload/cache): Permission denied in /home/domain/public_html/moodle/lib/moodlelib.php on line 3753
ERROR: Could not find or create a directory (/home/domain/public_html/moodle_upload/cache)


Warning: mkdir(/home/domain/public_html/moodle_upload/sessions): Permission denied in /home/domain/public_html/moodle/lib/moodlelib.php on line 3753
ERROR: Could not find or create a directory (/home/domain/public_html/moodle_upload/sessions)


Warning: Cannot modify header information - headers already sent by (output started at /home/domain/public_html/moodle/lib/moodlelib.php:3753) in /home/domain/public_html/moodle/lib/setup.php on line 350

then Copyright Notice
then
Warning: Unknown(): open(/home/domain/public_html/moodle_upload/sessions/sess_ee9424aec352b18cecfe651779c7ecff, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/home/domain/public_html/moodle_upload/sessions) in Unknown on line 0

where's the problem?
回复Dario De Notaris

Re: If i can view config.php...

Herbert Keijers -
Check if the webserver has write permissions to /home/domain/public_html/moodle_upload

回复Herbert Keijers

Re: If i can view config.php...

Dario De Notaris -
I've created manually subdirectories cache and sessions; the up errors not more show, but the down error yes.

the CHMOD is 755 and in the directory moodle_upload there isn't an .htaccess file.
What I must check?

tnx2
回复Dario De Notaris

Re: If i can view config.php...

Herbert Keijers -
To get you started, the easy way is to chmod 777 on your moodle_upload directory.
One's your moodle is running, lets worry on security ...

回复Herbert Keijers

Re: If i can view config.php...

Dario De Notaris -
ok tnx. now it's works 微笑

but (oh yes, another "but" :p) i cannot login. After installation isn't showed admin-login panel. Now, with phpmyadmin, i've changed admin password but i cannot yet login. How can I do?

tnx mooore 微笑


回复Dario De Notaris

Re: If i can view config.php...

Dario De Notaris -
resolved.

(this discussion can be closed 微笑 )
回复Dario De Notaris

Re: If i can view config.php...

Martin Dougiamas -
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像
And the solution was...?
回复Martin Dougiamas

Re: If i can view config.php...

Ava Firth -

Good question. I am seeing Exactly the same error messages (well, same line numbers and files, although different path obviously). Any or all help appreciated.

Thanks, Ava

回复Ava Firth

Re: If i can view config.php...

Ava Firth -

I've solved the first three error messages

(refer to the third post of this thread

Re: If i can view config.php...
by Dario De Notaris - Friday, 2 December 2005, 03:31 PM

)

by creating  .../moodledata/cache and .../moodledata/sessions  directories manually.

-----------

Still trying to figure out the solution to the following errors:

Warning: Unknown(): open(/hsphere/local/home/talogaco/moodle.taloga.com/moodledata/sessions/sess_3e2fbaf6822dd153273c98b10663a9d2, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/hsphere/local/home/talogaco/moodle.taloga.com/moodledata/sessions) in Unknown on line 0

--------

I can get past the errors by accepting the GNU license; database tables were then created successfully, but also followed by same error message as above re not able to write session data files. I think I should be worried that the session data files are not being updated !?

Any help appreciated, thanks, Ava