Weird behaviour with PHP 5.01. Course mainpage load stalls.

Weird behaviour with PHP 5.01. Course mainpage load stalls.

by Osku Kannusmäki -
Number of replies: 4
Hello,
our institution is changing main web-server and I'm having problems with Moodle 1.4. We now have working server with php version 4.3.4 and moodle works fine. When copied moodle and database for new server which has php 5.01 Moodle behaves weirdly. Both computers are Sun Ultra Sparcs with Sun Os operating system. Anyway, new server doesn't seem to have the absolute path issue which has been discussed in other threads.

When I try to view main page, left side blocks and course outline seems to be fine, but right border is completely empty. Page source just shows that page load has ended in the midle of the page. Last visible line in page's sourcecode (wrapped for viewing) is:
</td><td nowrap bgcolor="#b3d1e7" class="weeklyoutlineside" valign=top
align=center width=10><font size=1><a href="view.php?id=16&week=7"
title="Näytä vain viikko 7"><img src="http://193.167.41.119/moodle/pix/i/one.gif"
height
=16 width=16 border=0></a><br /></td></tr><tr><td colspan=3><img src="../pix/spacer.gif"
width
=1 height=1></td></tr></table></td><td style="vertical-align: top; width: 180px;">

This is the last html source code line for course week selection. Next block should be latest news. So it must cause this stall somehow. I was not able to find any error messages from php or apache logs. Both servers have same mysql database server version.

Any help or idea about how to fix this would be highly appreciated.

- Osku
Average of ratings: -
In reply to Osku Kannusmäki

Re: Weird behaviour with PHP 5.01. Course mainpage load stalls.

by Matt (M) -
I did not analyze your post in detail, however, I thought it worth mentioning that I could not get Moodle 1.3.4 to work with php 5.x (nor could I get phpBB 2.0.8 to work with php5) under XAMPP 1.4.5 for Windows.

When I switched to php4 in XAMPP (there's an automatic means to do this in XAMPP for Windows), both Moodle and phpBB worked just fine.

There were several "breaking" points with my php5 setup, so many I can't remember, but they did involve web-page hangs, particularly on the admin side for Moodle.

So...my basic suggestion would be to try php4.

-Matt
In reply to Matt (M)

Re: Weird behaviour with PHP 5.01. Course mainpage load stalls.

by Osku Kannusmäki -
That is the last option... Anyway, I was wrong. This error is related with those require_once things. I'm trying to investigate it further... It is just very diffrent than any require_once error that I've encountered  before, because there is no error message of any kind. 

- Osku
In reply to Osku Kannusmäki

Re: Weird behaviour with PHP 5.01. Course mainpage load stalls.

by Daryl Hawes -
Dan Marsden and I just went through a similar require_once problem in trying to test the blog module with PHP5.
Try loading the required file directly. In most cases this should not work, but for us we were able to see the PHP error it was having a problem with - a function that had been declared which conflicted with a new PHP function in version 5.
Good luck and hope that might help.
In reply to Daryl Hawes

Re: Weird behaviour with PHP 5.01. Course mainpage load stalls.

by Osku Kannusmäki -
I found out that the problematic file was moodle/blocks/news_items/block_news_items.php it's line 23 is require_once($CFG->dirroot.'/course/lib.php'); I was not able to produce any errormessages by simply running that file. When I commented this line everything seems to work.

Is there a possibility that this file is not included beforehand and this require is needed at some point?

- Osku