blank pages after installing through install.php and/or manually gernerating config.php

blank pages after installing through install.php and/or manually gernerating config.php

Micheal Cooper -
回帖数:7

I have read and tried the other posts here about "blank pages", but nothing in them has worked. I would very much appreciate some help.

I am a Moodle and sysadmin newbie, so please forgive my ignorance. Once I get into it, I hope to join Moodle.org so that I can further both the project and my own research into vocabulary acquisition and eductech.

Background:

  • I am setting up my 2nd Moodle. The first went fine, but this second one just won't cooperate.
  • 1st: old Gateway Japan clunker of a workstation, running RedHat Enterprise Linux Advanced Server 3 - Apache 2 - postgresql - MOODLE_14_STABLE from cvs. I followed the directions on download.moodle.org/cvs and moodle.org/doc. Things work perfectly, and I experienced no problems. Faculty is playing with it now.
  • 2nd: I wanted to install it on my home server, which is frankenstein PC running RedHat Enterprise Linux Advanced Server 4 instead of 3, but otherwise I did exactly the same as the installation at work.

Symptoms:

  • Web server and phpinfo work on this machine, and selinux is off.
  • When I first cvs it in, I change the directory name. The ownerships on the directories are set 2775 so that all files created have the same group, which is apache. Since the group is apache, and since group has rwx, there shouldn't be permissions problems.
  • I am setting up my 2nd Moodle. The first went fine, but this second one just won't cooperate.
  • Upon accessing the URL for the first time, everything is fine. The system check says ok, and I enter my info in install.php. Then I press the button to submit the database name, user, etc, and I get a blank screen. Even rebooting and then accessing the moodle URL again still gives me a blank screen.
  • Upon looking at the moodle directory, the install.php did not create a config.php file.

Failed Solution:

  • So I made the config.php file myself, checked the ownerships and permissions and contents several times, restarted httpd and even postgresql (though it couldn't be the problem) and even rebooted, but to no avail. Whether I access the moodle top (moo0529/) or the admin subdirectory (moo0529/admin/), I just get a blank screen.
  • I turned on error reporting from /etc/php.ini, and I did a 'tail -f' on the /var/log/httpd/error.log file while going through the entire ordeal again. Nothing. Just a blank screen, no browser error messages, and nothing in the error.log but that annoying attempt by the browser to download favicon.ico.
  • I deleted the entire directory and restructured the virtual server and reinstalled three times. Nothing.
My phpinfo is attached for checking.

回复Micheal Cooper

Re: blank pages after installing through install.php and/or manually gernerating config.php

Micheal Cooper -
I tried to install another php cms-type of application (Xoops) to see if it would give me a hint at what I am doing wrong. Like Moodle, it stops during the install, and I get only a blank page.

I am trying to install into a home server through DDNS, and my router does not allow direct connections, so I have my /etc/hosts file set up to direct me to the NAT'ed intranet address when I type in my ddns domain name. That should allow me to set up Moodle, shouldn't it?

Should I try it from work tomorrow? Could it possibly be that I cannot directly access the URL from the same machine? I can see other web pages in the same directory on this machine because of my /etc/hosts setting, but does Moodle check for real connections in some way?


Micheal

回复Micheal Cooper

DDNS is not the problem

Micheal Cooper -
I took the broadband router out of the loop and connected the linux box directly to the adsl line. I was able to hit my web page directly (so it is my router, not my ISP, that prevents loop backs), and I redid the Moodle installation AGAIN (5th time). I stopped at the same place, after the database info on install.php, and ended up looking at the same blank page.

I was hoping that the problem was my router, but it seems to be something with my server settings. PHP, probably. OR it is something to do with RHEL4.

Any advice or pointers would be appreciated. Obviously, I have been trying to solve this myself, but I am just stuck.


回复Micheal Cooper

Re: blank pages after installing through install.php and/or manually gernerating config.php

Zbigniew Fiedorowicz -
Here's your problem:
_ENV["SELINUX_INIT"]    YES

You should turn it off: http://fedora.redhat.com/projects/selinux/

回复Zbigniew Fiedorowicz

Re: blank pages after installing through install.php and/or manually gernerating config.php

Micheal Cooper -
I might be wrong (hope so), but selinux does not seem to be the problem.

From the beginning, I had it set to 'disabled' in /etc/sysconfig/selinux, which means that it does not load a policy and is not working. With it set to disabled, if you run sestatus, you get:
[root@mame ~]# /usr/sbin/sestatus -v
SELinux status: disabled

If you try to see the selinux info from ls, you get:
[root@mame ~]# ls -Z
Sorry, this option can only be used on a SELinux kernel.

So I was pretty sure selinux was off, but to be more thorough, I tried changing the setting from 'disabled' to 'permissive,' which only warns and doesn't restrict. I rebooted, but to no avail. Same blank pages.

Then, upon reading the following at http://fedora.redhat.com/projects/selinux/:
"However, setting the value to disabled is not the same as the selinux=0 kernel boot parameter. Rather than fully disabling SELinux in the kernel, the disabled setting instead turns enforcing off and skips loading a policy."

I went into /boot/grub/grub.conf and added selinux=0 to the boot parameters and rebooted.

Still, no improvement, even after Moodle cvs install number 6 or 7.

I am pretty sure that selinux is turned off, since the phpinfo() message no longer contains the string selinux at all.

If the issue IS selinux, then I guess I have no choice but to install RHEL3 instead or download the docs on selinux and really understand and master them, which is something I was planning to do AFTER I got my server up and had people experimenting on it. I am in a little bit of a rush because I have been recommending Moodle to a friend of mine who is working with slow learners, and I really want to get him going so that he can see what it is like.

I would be grateful for tips. It would be nice to resolve this and make it a troubleshooting reference for others.

There is, of course, the possibility that my installation is just irrevocably messed up...

mec

回复Micheal Cooper

Re: blank pages after installing through install.php and/or manually gernerating config.php

Micheal Cooper -
New phpinfo() attached.
回复Micheal Cooper

Re: blank pages after installing through install.php and/or manually gernerating config.php

Thomas Haynes -
Do you have the postgresql equivalent of php-mysql installed?

I have Moodle installed on a recompiled version of RHEL4, and it seems to work pretty well.

Your phpinfo does not have a section for the database. I have a section for Mysql in mine.

Best... Tom
回复Thomas Haynes

solution: blank pages after inputting database info; blank admin directory top page

Micheal Cooper -
Thank you. That was it. I had assumed that using choosing postgresql and php server options in the install and then using up2date to update postgresql and php would include the php-postgresql packages. I overlooked the most fundamental initial settings for more esoteric solutions. Hubris: I assumed that I had the basics down when I didn't. Thank you.

So now for the recipe:

Symptom: Install is fine until I fill in my database info and click continue, after which I get nothing but blank pages. If I come back to my moodle directory, I don't even see the install.php anymore. Just blank pages.

Solution: You have forgotten the library that links your database to your php. For postgresql, install 'php-postgresql', and for mysql, install 'php-mysql'. After installing this, go back to your moodle top and begin again. It should be fine.

RedHat Enterprise Linux 4 and Fedora Core 3 user notes:

SELinux: Moodle works as-is with selinux set to 'disabled' or 'permissive' in the file '/etc/sysconfig/selinux'. When you install, set it to disabled or permissive. If it is too late, you can sort-of turn off selinux by changing '/etc/sysconfig/selinux'.

Up2date: To prepare for Moodle, do the following: "up2date php-postgresql php-mysql" in addition to installing php and postgresql/ mysql.

Thank you.