Blank admin/index.php file - please help diagnose

Blank admin/index.php file - please help diagnose

by Fiona MacAlister -
Number of replies: 17

I've installed Moodle 1.7 (version available on 20-3-2007) on Ubuntu Linux 5.10, using PHP5 and MySQL version 4.1.12, and everything runs smoothly until I hit the admin/index.php file which is blank.  No errors appear, even though I have enabled display_errors in the php.ini file.

I've determined that there is a problem from the following point forward (line 142 forward in my text editor) in my admin/index.php file (using die ("the code seems to be fine from this point ...");):

/// Both old .sql files and new install.xml are supported
///But we prioritise install.sml (SMLDB) if present

Where do I go from here?

Any help greatly appreciated.

Average of ratings: -
In reply to Fiona MacAlister

Re: Blank admin/index.php file - please help diagnose

by Panagiotis Iliopoulos -
Hey everyone,

I had the same problem since I installed the first version of 1.7. But since my moodle site worked ok I didn't give it much thought. I have to add here that I only upgraded to 1.7 in my test site not in my public one. I will not procceed to any upgrades in my public site unless this is fixed.

Today I downloaded the last version of moodle 1.7 20061011 and after a point it shows me a page "New settings - Course Manager" where I have to make some changes in order to procceed with the upgrade.

I then select the roles that I choose, click the "Save Changes" button and it directs me to the http://localhost/moodle/admin/index.php which is blank and from there it goes nowhere.

I can browse through the administrative tools but cannot go to the first page of my site. I logged off and logged in back but again it redirects me to http://localhost/moodle/admin/index.php which is blank. So where do I go from here? Obviously its an incomplete upgrade but how can I finish it and make it work. And more important why is the http://localhost/moodle/admin/index.php page blank?

My test enviroment is: WinXP sp2, apache 2.0.54, php 4.4.4 and MySql 4.1.20

Thank you in advance,

Panayiotis
In reply to Panagiotis Iliopoulos

Re: Blank admin/index.php file - please help diagnose

by James Whitacre -
I'm having the same issue with the blank /admin/index.php file after uprading my 1.71 to 1.72.

Ouch! The upgrade seemed to go just fine but then I'm having this issue. Anybody find a resolution to this?
In reply to James Whitacre

Re: Blank admin/index.php file - please help diagnose

by Richard Enison -

JW,

If you look at this entire thread, you will see a post by Howard Miller around 3/22/07 (depending on time zone; for those using the European dating format that's 22/3/07 smile) that suggests doing what the FAQ says at http://docs.moodle.org/en/Installation_FAQ#Why_is_a_particular_page_blank_or_incomplete.3F

Have you tried that? If so, what error log entry do you find?

RLE

In reply to Fiona MacAlister

Re: Blank admin/index.php file - please help diagnose

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Have you checked your logs in case an error popped up there?

http://docs.moodle.org/en/Installation_FAQ#Why_is_a_particular_page_blank_or_incomplete.3F
In reply to Howard Miller

Re: Blank admin/index.php file - please help diagnose

by Panagiotis Iliopoulos -
I read it, understood it, done it, and the error that gives me is this:

Fatal error: Cannot redeclare book_upgrade() (previously declared in C:\Program Files\Apache Group\Apache2\htdocs\moodle\mod\book\db\mysql.php:3) in C:\Program Files\Apache Group\Apache2\htdocs\moodle\mod\book_old\db\mysql.php on line 3

Ok I have no idea what this is, how can I solve it?

I have to say here tha the error I type here is shown on my browser not in the log file.

Thank you,

Panayiotis.

PS: At least now I see what makes it not work tongueout Hopefully someone can help
In reply to Panagiotis Iliopoulos

Re: Blank admin/index.php file - please help diagnose

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Ok, well the book module isn't a standard module so you must have installed it.

The problem is you have two copies...

mod/book
mod/book_old

I would delete mod/book_old and see if that helps smile

In reply to Panagiotis Iliopoulos

Re: Blank admin/index.php file - please help diagnose

by Panagiotis Iliopoulos -
Ok I did a little "trick", I renamed the book module file from "book" to "book_new" and refreshed the page and it procceeded but at the next screen that sets up some book tables shows errors and stays there.

So I imagine that it has something to do with the book module. Is there a new version of the book module for 1.7?

Panayiotis

Ok this is an edit: lol you were right, along with the new installation of the book module, in the mod folder, I had the old installation of the book module as a folder named "book_old". When I removed that folder from the moodle/mod folder everything is correct. The admin page isn't blank anymore and it works great. Lol it was something so simple yet I didn't see it.

Thank you for your help, now I think I am ready to go on upgrading my production site.

Panayiotis
In reply to Panagiotis Iliopoulos

Re: Blank admin/index.php file - please help diagnose

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
In case you didn't notice... I changed my original post, but you replied too fast.

You have two copies of book -- you can't do that regardless of what they are called.

EDIT:
If your database is now in a big old mess it will be quickest to drop the database and start again.
In reply to Howard Miller

Re: Blank admin/index.php file - please help diagnose

by Panagiotis Iliopoulos -
Lol yeah Howard I did reply to fast big grin

I just checked my database and it is fine.

I've removed the book_old folder and I'm fine. cool

Thanks again Howard.

Panayiotis
In reply to Howard Miller

Re: Blank admin/index.php file - please help diagnose

by Fiona MacAlister -

The Apache error log gives me the following:

 [error] [client 127.0.0.1] File does not exist:  /var/www/favicon.ico

Why would a missing icon prevent the page from loading and why is it looking in the www folder instead of the Moodle folder?

In reply to Fiona MacAlister

Re: Re: Blank admin/index.php file - please help diagnose

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It doesn't - you can ignore that error. It's browsers looking for the little icon at the start of the address bar. It doesn't matter if there isn't one.
In reply to Howard Miller

Re: Re: Blank admin/index.php file - please help diagnose

by Fiona MacAlister -

Then this is probably what I should be looking at (although it's not at the bottom of the error log as specified in the instructions):

[error] [client 127.0.0.1] PHP Warning:  fopen(/var/moodledata/.htaccess) [<a href='function.fopen'>function.fopen</a>]: failed to open stream:Permission denied in  /var/www/moodle/lib/setuplib.php on line 127, referer: http://localhost/moodle/admin/index.php

[error] [client 127.0.0.1] PHP Warning: mkdir() [<a href='function.mkdir'?function.mkdir</a>] Permission denied in /var/www/moodle/lib/setuplib.php on line 138, referer: http://localhost/moodle/admin/index.php

Where to from here?

In reply to Fiona MacAlister

Re: Re: Blank admin/index.php file - please help diagnose

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

two possibilities jump to mind, not mutually exclusive...

  1. There's something wrong in your config.php. One of the directory settings is wrong. Check it. Post it here if you are stuck.

  2. You have some permission issues. It is more likely than not that your moodledata directory (/var/moodledta) is not writeable by the web server process. The quick and dirty fix is...

    chmod -R 0777 /var/moodledata

In reply to Howard Miller

Re: Re: Blank admin/index.php file - please help diagnose

by Fiona MacAlister -

Actually, I now realise this was an issue previously when I first tried to install Moodle and I did change the permissions for the moodledata folder, so it can't be the problem.

The only other message that I'm getting is the favicon one, so I'm stumped.  I still can't get the /admin/index.php page to load.

In reply to Fiona MacAlister

Re: Re: Blank admin/index.php file - please help diagnose

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Is this your server or a host? If the former, lets have some more information about it and the phpinfo() output (see the faq entry for how to get that). If the latter, it might be worth asking if they have had any experience with Moodle (good or bad).
In reply to Howard Miller

Re: Re: Blank admin/index.php file - please help diagnose

by Fiona MacAlister -

It is my own test server and this is certainly far from my first installation of Moodle on this particular system - Ubuntu 5.10.  Up until installing various versions of Moodle 1.7 I have never experienced a problem with an installation. I can tell you right now that the problem seems to concern my current version of PHP which is 5.0.5.  If I run PHP 4.1.12 (although it is recommended that you need a higher version), I have absolutely no problem - I eventually had to do this to get a production server running.  Yet, if I set up a test server on Windows using Xampp and their version of PHP5, I have no problem.  I was hoping that I might simply be able to tweak something in the php.ini file or one of the Moodle files to get it working because I would like to stop using PHP4.

What puzzles me is that no error message comes up at all when the page doesn't load and the only error message that continues to come up in the logs is the favicon.ico message.  I have checked through the config.php file twice and there are definitely no errors either in my file paths or in the document itself (i.e. missing slashes etc.).  The Moodle site itself loads fine, but I can obviously only create an account and log in as a user, not as an admin which is really not much use.