Need Generic compile directives for PHP

Need Generic compile directives for PHP

by Marc Grober -
Number of replies: 6
While the docs discuss what may or may not be needed in php, it would be much handier if the docs had a generic makefile commented with regard to the specific configuration options that are required for various elements, such as sockets for chatd, xmlrpc for moodle networking, etc.

Additionally, I would argue for a configuration test tool that could be used before installing moodle. I think many users will be or are using their web hosts php installs rather than compile themselves, and one of the initial admin tasks that should be included in any set-up would be comparing the existing web host configuration with the configuration needed for moodle. That way, someone interested in setting up moodle, especially on a web hosted system, will be advised about what is missing right off the bat so they can discuss the questions with their web hoster.

The lack of such a tool results in hours of thrashing trying to determine why this or that won't work.
Average of ratings: -
In reply to Marc Grober

Re: Need Generic compile directives for PHP

by Richard Enison -
MG,

I asked about this issue myself some time ago. The answers are basically:
  1. The Moodle docs don't give instructions on compiling or installing PHP because the methods of doing these depend on the operating system that is running on the server. It even varies between one distribution of Linux and another.
  2. Moodlers using a commercial web hosting service do not have the luxury of installing their own version of PHP. They just don't have the required access. They can't even edit php.ini; that's one reason why they have to use .htaccess (if the server is Apache and the web host allows it) instead. So what they need to do is ask their host (usually tech support), preferably before choosing which host to use, whether they meet the requirements documented at http://docs.moodle.org/en/Installing_Moodle#Requirements
RLE
In reply to Richard Enison

Re: Need Generic compile directives for PHP

by Marc Grober -
Thanks Richard....
Let me take a few whacks at these straw men.....
The Moodle docs don't give instructions on compiling or installing
PHP because the methods of doing these depend on the operating
system that is running on the server. It even varies between one
distribution of Linux and another.
However, I am really not talking about methods so much as configuration options. Moreover, sample makefiles can provide options, as makefiles usually do.... At least a list of compile options should be offered. In any event, configure options for most will be almost identical, and the docs are full of not only misinformation already, but lots of exceptions....

Moodlers using a commercial web hosting service do not have the
luxury of installing their own version of PHP. They just don't
have the required access. They can't even edit php.ini; that's
one reason why they have to use .htaccess (if the server is
Apache and the web host allows it) instead.

Of course this is simply untrue now, whether it indeed was ever true. I know of half a dozen major web hosting firms that offer the services noted above as unavailable.

So what they need to do is ask their host (usually tech support), preferably before choosing which host to use, whether they meet the requirements documented at
http://docs.moodle.org/en/Installing_Moodle#Requirements

Unfortunately, this is in fact a bit of misdirection because if one were to ask, one would probably be told, "Of course!" if PEAR was available, though in fact Moodle does not support the use of PEAR for all the extensions Moodle makes use of (there seem to be issues with sockets and xmlrpc at least).


Indeed, if one were to be aggressive about the issues involved in xmlrpc, one would argue that no reputable web hoster would force all their clients to use a version of PHP compiled with an experimental extension which has been subject to so much abuse ;=}
In reply to Marc Grober

Re: Need Generic compile directives for PHP

by Richard Enison -
MG,

This is one of the most amazing posts I have ever seen here.
  1. Straw men? I'm not making this stuff up. I'm just reporting what I keep seeing over and over again in this forum from people using commercial web hosts that restrict their users in terms of access to php.ini, httpd.conf, etc. On the other hand, anyone can say they know of a half dozen hosts that don't impose such restrictions, as long as they don't have to name them. I think many Moodlers would love to know the identities of these web hosts. Is there some reason you are keeping their names secret?
  2. In the docs, at http://docs.moodle.org/en/Installing_Moodle#Using_a_.htaccess_file_for_webserver_and_PHP_settings, it refers to web hosts where you need to use a .htaccess file because you don't have access to php.ini or httpd.conf. Why would this be there if it was "never true" that there were such hosts?
  3. Here is one recent example: http://moodle.org/mod/forum/discuss.php?d=96994#p428916
    In this one: http://moodle.org/mod/forum/discuss.php?d=71201#p424944, it seems KAW is under the same illusion as I that some web host users don't have access to their php.ini files. I could go on and on, but it's not worth the time.
  4. I suppose if you were to ask a web host, "Do your servers support the system requirements for Moodle," they might say, "Of course!" That's not what I had in mind. I meant if you really want to know the answer to that question, read the requirements yourself, and ask about each one (don't even mention Moodle). For example, ask, "What PHP version will I be able to run?", and, "Does your PHP have the GD library and extension available?" Or, "What version of MySQL do you have?" And of course, "What directives are allowed/recognized in .htaccess files?"
To all Moodlers who read this forum,

If you are using a web host that does not allow you access to php.ini, httpd.conf, or my.ini/my.cnf, or that doesn't let you compile your own home-grown version of PHP, would you please post a short note in this thread to that effect? If you are using a commercial host that does allow all those things and you want to post a note to that effect, feel free. In either case, please mention the name of the host.

Thank you.

RLE
In reply to Richard Enison

Re: Need Generic compile directives for PHP

by Just H -
G'day Richard

When I was with a shared host (Site5), the company was more than happy for me to use custom php.ini file. That's where I was pointed to the script to append my requirements to the standard php.ini file and distribute throughout directories/delete from directories. I have posted re this script on numerous occasions, such as here, here, here, and here.

Can't say I've looked into it for more than 4 years or so as I haven't needed to, but from memory, even back then there were numerous hosts that allowed it e.g.

http://www.siteground.com
http://www.lvcs.net/
http://iweb.com/
http://www.godaddy.com/gdshop/hosting/shared.asp#tabs
http://www.modwest.com/php/

Pretty sure you'll find it's not hard to find a suitable host that allows it.

Regards
H

PS I in no way endorse any of the half dozen hosts mentioned above as suitable for running anything more than a test-small Moodle site!
In reply to Richard Enison

Re: Need Generic compile directives for PHP

by Marc Grober -
Wow, I didn't mean any personal affront! I was just trying to point out that often times our conclusions are not warranted by the data available. Nor did I say that anything was never true, but simply posed the issue that in a forum there is often no way to verify a poster's premises.

But, as long as the issues are joined......

Using any search engine a search on "web host support custom php.ini" will produce hundreds of web hosts that are willing to provide access to a custom php.ini and in fact there was a recent discussion I believe in this forum on different methods to accomplish same depending on the web host one uses. Many of the web hosts offering custom php.ini also allow client to compile their own php, while others promote using PEAR. Because of the nature of the forum I started this before seeing Harry's response... but his comment suggests that this availability is not new, either.

If we want to take something away from the constant repetition of the same questions in the forums, we could argue that it is not because there are problems so much as it may be because so many new users are too lazy to spend the time to research their questions or because the docs are inadequate; not to say that I am in fact arguing either. I recently received a note of grateful thanks from someone (not affiliated in any way with moodling) who had posted to a forum that they could not implement a custom php.ini and offering cash for anyone who could help them, when, within moments of reading my instructions, they had their custom php.ini in place and their php issues resolved (and no, I did not accept the cash ;=} ) The point here being that just because someone alleges A,B,C doesn't mean that A,B,C is true. Indeed, having examined the two discussions you reference, in neither case would I agree that the discussion supports your argument or conclusion.

Why would the docs contain something that was arguably never necessary.... well, here you are misstating my position but to address the underlying concern, I am happy to allow that at some point and at some time someone claimed that they could not edit their .htaccess file. I, of course, don't know if that person really could not edit the file. Let's assume s/he could not; does that mean that this is still a problem or provide any information on the extent of the problem? Let's go one step further. Even if the problem is experienced in only 1 of 5 million installations, wouldn't it be worthwhile to document a solution?

One of the issues that I think Moodlers have to come to grips with is that many folks are jumping in to creating moodles who have no clue what any of this (AJAX, PEAR, PHP, mySQL, etc). They are looking for tools to support instruction and may be wholly unprepared to discuss with a potential web host the potential future migration issues with respect to mySQL and PHP.
Should we implement a license that requires completion of a Moodle Administrator's class before you can create a Moodle? Though some I think may argue against it, there are also quite a few web hosters who are offering automated installation and upgrade which get Moodlers up and running with a minimum of angst. People who start in this fashion may suddenly find they come up against some limitation that suddenly and to their horror (yes I am being a bit dramatic) find they have been sucked in systems administration ("Nooooooooooooooo!", you hear them scream, though the palpable terror dissipates as they disappear down Alice's rabbit hole......)

I am looking for a friendlier Moodler, believe it or not.............