Symptoms: After completing install.php, my browser (Firefox 18.104.22.168) is redirected to index.php in the root directory, which is set to '<domain>/moodle/' . My browser is then redirected to <domain</moodle/admin/index.php, where the request promptly throws up a 404 Document not found. Interestingly, requests for other .php files in the same directory are also rebuffed. I am able to edit and view these invisible files using both Notepad and Word.
I am running IIS 5.0, PHP 4.4.4, and MySQL 5.0.24 essential, as well as Moodle v 1.6.2+.
The IUSR_<machine name> account has read, execute, list, and write powers on all directories in <domain>/moodle. There are no spaces or extra lines after the final ?> in index.php or either of the config.php's. The 'strict_table_'something setting in my.ini has been deleted. vaguely suspect that the 'default document' setting is wonky, but I've not enough experience with any of these technologies to be certain of anything.
Thanks for any ideas,
Check your config file and make sure you don't have a trailing slash at the end of your wwwroot. It should be something like:
$CFG->wwwroot = 'http://domain/moodle';
$CFG->wwwroot = 'http://domain/moodle/';
I'm thinking, if you put in a test index.php, chances are you called it by typing the url into the browser. The test index.php answers correctly.
When you try access the real index.php by clicking a link, the details in the config file are calling the file, and seem to be doing it from the wrong place. Hence, I suspect some minor fault in the config file.
If you restore the real index.php and type the proper url directly into the browser yourself, it should answer, just as the test one you put in there.
Then, maybe, click on a link to the page, and see what differences there are in the url in the address bar.
It might be of some help, hopefully,
Thanks for your help with this, Matt.
The installation process creates the config.php and fills it with the details you supply.
If your server answers a phpinfo.php file, it shows you have a php engine running, so, assuming your moodle folder contains all the files it should have, then the php files should be able to answer you.
I can only think of 2 possibilities: the moodle folder is somehow corrupt or incomplete,
there is some slight misconfiguration in your config.php file.
Maybe you could post the file here, taking care to mask any usernames and passwords contained therein for database access.
Contents of /moodle/config.php, edited for security:
<?php /// Moodle Configuration File
$CFG->dbtype = 'mysql';
$CFG->dbhost = '10.2.23.5';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'moodle';
$CFG->dbpass = '';
$CFG->dbpersist = false;
$CFG->prefix = 'mdl_';
$CFG->wwwroot = 'http://10.2.23.5/moodle';
$CFG->dirroot = 'C:\inetpub\wwwroot\moodle';
$CFG->dataroot = 'C:\inetpub\moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 00777; // try 02777 on a server in Safe Mode
$CFG->unicodedb = true; // Database is utf8
// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
Although, looking at it, I do notice that require_once() is called on "C:\inetpub\wwwroot\moodle/lib/setup.php", which contains two different slash conventions. I just tried fixing it, and got the same 404; it's been changed back to the wierd version to prevent confusion.
I'm going to try calling /admin/config.php manually and see if that fixes anything.
Thanks for your help,
Make sure there is no blank space after the last php tag. Even if there is one blank space, delete it can resolve the problem.
Hope this will help
Notice: Fatal: $CFG->wwwroot is not configured! Exiting. in C:\Inetpub\wwwroot\moodle\lib\setup.php on line 84
I tried accessing this with word; it worked fine, but I'm unable to check the appropriate line due to word-wrapping. Notepad apparently isn't reading the endline characters correctly, and so renders serveral lines of text all on the same screen line. I've had this problem with several .php files in the installation; is this indicative perhaps of corrupt files?
Warning: main(config.php) [function.main]: failed to open stream: Permission denied in C:\Inetpub\wwwroot\moodle\index.php on line 15
Fatal error: main() [function.require]: Failed opening required 'config.php' (include_path='.;c:\php4\pear') in C:\Inetpub\wwwroot\moodle\index.php on line 15
My PHP newbie sense informs me that its not being allowed to open a \moodle\index.php, which presumably handles the next step in the installation. I therefore suspect a permissions problem both with this and the previous install attempt; unfortunately I am also an IIS newbie (and MySQL, it's a trifecta!) and apparently don't know how to check these permissions. I've been using right-click->Properties->Security tab, but that just reports that IUSR_ has read, write, and execute privileges. The scripts were also unable to create moodledata or config.php programmatically. I'm using Windows 2000 Pro; how does one go about doing this the correct way?
Thanks everyone for your time and patience.
congratulations for resolving the problem.
i followed the postings quite a while, because i have got the same problem.
but it seems that the cause is different.
up to now i was not able to solve it on my system.
even your newbe tip didn't help me. everyone has got full control on the web directory.
so, i have no clou anymore.
I still got the problem but found out some more details.
a test php and the cron.php worked.
So, I tried to localize the problem in the index.php file by changing certain configurations and thus forcing some checks to raise the error message.
this worked up to here: if (!file_exists('../config.php'))
but not here anymore: if (ini_get_bool('session.auto_start'))
I assume the problem is in between...or completely somewhere else.
I appreciate any help (and others too, as i can see in the forum).