Upgrading or New Install

Upgrading or New Install

by Kelly Bramble -
Number of replies: 13

Situation:

My server currently runs two separate versions of Moodle on two different websites.

One website runs version 2.3.11 and the other runs 1.9.12

Both versions of Moodle works as expected... NO PROBLEMS.

I have attempted all of the following with no success.

Upgrade from 1.9.12 to to 2.0.10, I get as far as the plugins check, then on clicking the "upgrade" button I get a blank screen. No errors, no apache errors, no nothing errors...

I have attempted a fresh install of 2.0.10 with the same results.

I have attempted a fresh install of version   2.5.7 as well as 2.6.4 - nothing works, all installs or upgrade attempts indicate that my server has all the right PHP, MySQL versions, etc... I have experimented to various tweaks in the config.php and many other hacks. 

I have searched Moodle forums for solution and read and attempted every logical suggestion or similar suggestion fix - nothing works.

This is beyond frustrating - my server is running two versions of Moodle just fine...

Suggestions?        Are there any advanced server configuration capability checks available for Moodle?



Average of ratings: -
In reply to Kelly Bramble

Re: Upgrading or New Install

by Scott Karren -

Kelly,

Do you have PHP error logging turned on?  This may help if PHP is throwing any errors in the background.  Take a look here for some options http://uk3.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting

HTH

Scott

In reply to Scott Karren

Re: Upgrading or New Install

by Kelly Bramble -

New install, 2.0.11 - unique working directory, database and dataroot on server/website with 1.9.12+ running.


I get to plugins check - then select "upgrade" and I get Errors as follows:

GET http://www.mywebsite.com/moodle/theme/styles.php?theme=standard&rev=1 500 (Internal Server Error) index.php:29

GET http://www.mywebsite.com/moodle/theme/javascript.php?theme=standard&rev=1&type=head 500 (Internal Server Error) index.php?confirmplugincheck=1:38


In reply to Kelly Bramble

Re: Upgrading or New Install

by Kelly Bramble -

To get php error messages I added the following to mt config.php:


$CFG->debug=6143;
$CFG->debugdisplay=1;


Then I got the following errors:



Warning: require_once(/Zend/Server/Reflection/Function.php) [function.require-once]: failed to open stream: No such file or directory in /home/phost/public_html/moodle/lib/zend/Zend/Server/Reflection.php on line 24

Fatal error: require_once() [function.require]: Failed opening required '/Zend/Server/Reflection/Function.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/phost/php') in /home/phost/public_html/moodle/lib/zend/Zend/Server/Reflection.php on line 24

What do you think?
In reply to Kelly Bramble

Re: Upgrading or New Install

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Looks like Linux. Which distribution? Version? Is the server your own or hosted?
In reply to Visvanath Ratnaweera

Re: Upgrading or New Install

by Kelly Bramble -

Dedicated server...


2.6.18-348.12.1.el5 #1 SMP Wed Jul 10 05:28:41 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux


This is a path problem.. Recommendations?

In reply to Kelly Bramble

Re: Upgrading or New Install

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
CentOS? 6?

Do you know CentOS well enough? Is SELinux running? How is Apache open_basedir set? What is Moodle "Use slash arguments" setting?
In reply to Visvanath Ratnaweera

Re: Upgrading or New Install

by Kelly Bramble -

WHM Accelerated (Cpanel).

I tried changing open_basedir - same results.

I've tried cfg slash arguments -> true, false and default which is no entry in config.php.


I just escalated this to my host front line support (liquid web).


PHP is just not interpreting includes right ~ I think.


Your help is appreciated... 


In reply to Kelly Bramble

Re: Upgrading or New Install

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hard one! Did you (or your provider) follow the SELinux line? (On the other hand, if it is SELinux how come the old sites work?)

How do you install exactly? Do you follow a tutorial?

You say dedicated server. Do you have command line access?
In reply to Visvanath Ratnaweera

Re: Upgrading or New Install

by Kelly Bramble -

Did the following:

Reload PHP - same results.

I did get the software to finally install after I edited many files in the zend directories to include the full root path for the includes.

The software is running but as you can imagine there are still path problems in that the CSS is not loading and the software is not writing to the /cache/js directory.

Note that this server is currently running over twenty php based applications other then Moodle accross multiple websites. All these application run flawlessly (vBulletin - multiple versions, PHPMotion - ever tried to get this low quality software to run, OSCommerce), and many, many more.

I don't believe my server is perfect, however I think  Moodle developers should consider coding that is more robust for installation and operation.


In reply to Kelly Bramble

Re: Upgrading or New Install

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Until you diagnosed the problem, you don't know whose falut that is.

You seem to evade some of my questions for reasons unknown to me. I wish you good luck in your search!
In reply to Kelly Bramble

Re: Upgrading or New Install

by Ken Task -
Picture of Particularly helpful Moodlers

Like many open sourced apps, maybe Moodle considers ruling the roost ... kinda like Joomla/Mambo + others.

Have been involved with CentOS and many open sourced apps that are AMP stack and have run into a few issues with running multiple apps on one server.  The errors you've shared relate to something Zend.  You say, however, you think it's not interpreting 'includes' ... uhhh, that's not apache includes you are talking about, is it?  Moodle does have 'required/required once' statements in PHP code, but no .shtml or includes of which I am aware.

Did you check to see those files are really there?  How did you install the moodle code?  Unzipped locally then FTP's up?   Using git?

In install.php there is this:

//point zend include path to moodles lib/zend so that includes and requires will search there for files before anywhere else
ini_set('include_path', $CFG->libdir.'/zend' . PATH_SEPARATOR . ini_get('include_path'));

Moodle does use caching of it's own now.   Have you purged cache?  Have you checked config and purged APC or Zend Optimizer?   Have you manually purged the cache - ie removed css files in

moodledata/cache/theme/[yourtheme]/css

A dedicated server probably has command line access ... or you can turn that on and start to use command line for some things that maybe the control panels, etc. doesn't show you.

Ok, you may already know, but just for the sake of communcations ... what does:

php -v show?

For another: php -i will show how php is configured.   Do you have ONE version of PHP for all those apps?   which php will show path to the command line version of PHP on your server.  What modules (extensions) are loaded?   php -m will show that.

Also how those extensions are configured ... on a typical CentOS vr. 5 box there is also a /etc/php.d/ directory with .ini files that initialize those modules.

Maybe one is missing Zend supports needed by the operating system.

Yes, installation of Moodle via web interface leaves something to be desired, but the command line method is (in my experience) flawless - IF all the requirements are met.

This is the 'fun' of open sourced community supported apps. ;)

'spirit of thinkering', Ken

In reply to Ken Task

Re: Upgrading or New Install

by Kelly Bramble -

"You seem to evade some of my questions for reasons unknown to me. " 

Evading your questions?  Really? I hope you don't think this is about who is at "falut" sic Fault?


Ken, I have attempted the install using every method you mentioned.  The install directions provided for Moodle are not complicated. 


Let me repeat portions of my last post.

"I did get the software to finally install after I edited many files in the zend directories to include the full root path for the includes."

also, "Note that this server is currently running over twenty php based applications"


In one of my previous posts I used the word "includes right" in error and haste. I should have wrote "require_once".


So, the software now functions less loading CSS and a 500 error when loading /moodle/lib/javascript.php?file=%2Flib%2Fjavascript-static.js&rev=167

Let's be clear on the changes I had to make to get as far as I have..

File: /lib/zend/Zend/Server/Reflection.php

From

require_once 'Zend/server/Reflection/Function.php';

To:

require_once '/home/phost/public_html/moodle/lib/zend/Zend/server/Reflection/Function.php';

Every time I got a path error I edited the concerned file until I got an install.

I appreciate the suggestions given however I'm not going to respond point to point on this forum.






 

In reply to Kelly Bramble

Re: Upgrading or New Install

by Ken Task -
Picture of Particularly helpful Moodlers

Really didn't expect responses ... those questions were 'food for thought' or investigation by op.

Hmmm .... '/home/phost/public_html/' is the sort of path/config one would find on a shared hosting box ... or one configured for shared hosting (allowing access to public_html of user accounts located in home.   Guess I really didn't catch that. :\

If that assumption is correct, wonder if you have suPHP or some other add-on to PHP that providers use to protect customers from one another.

(include_path='.:/usr/lib/php:/usr/local/lib/php:/home/phost/php') ... hmmmm, your server is searching the above paths.   Must be environmental paths of some sort.  

php -i would/should have shown you a path or several paths depending upon what is installed.

On a Mac without Zend:

ENV["PATH"] => /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

On a CentOS 5. server, kinda depends upon how PHP was compiled ... ie, switches like '--with-png-dir=/usr' and config.  

php -m might have shown:

[Zend Modules]
Zend OPcache

which means there is a opcache.ini in /etc/php.d/ ... this on a PHP 5.3.3  with Zend OPcache v7.0.3 that was installed manually.

Bottom line, CentOS server is flexible enough to be configured with 'not so common to typical' variables/locations, etc..   Difficult for programmers to take that into account.  Hard to know exactly what the problem is ... not very good at Vulcan mind melds ... that's why the sig said ... in the spirit of thinkering.

Yours, in the spirit of sharing,  Ken