Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

PHP FAQ: Difference between revisions

From MoodleDocs
No edit summary
(Note about intent to not migrate this page to moodledev.io)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:WillNotMigrate}}
== What is PHP? ==
== What is PHP? ==


Line 17: Line 18:
== How is PHP used by Moodle? ==
== How is PHP used by Moodle? ==


* [[Installing Moodle/Creating custom php.ini files]]
* [[:en:Installing Moodle/Creating custom php.ini files|Installing Moodle/Creating custom php.ini files]]
* [[PHP settings by Moodle version]]
* [[:en:PHP settings by Moodle version|PHP settings by Moodle version]]
* [[PHP error logs]]
* [[PHP error logs]]
* [http://moodle.org/mod/forum/search.php?notwords=Re:&id=5&subject=php.ini php.ini related discussions] in the Moodle forums
* [http://moodle.org/mod/forum/search.php?notwords=Re:&id=5&subject=php.ini php.ini related discussions] in the Moodle forums
Line 24: Line 25:
== Which version of PHP is required by Moodle? ==
== Which version of PHP is required by Moodle? ==


* See [[Installing_Moodle#Requirements]].  
* See [[:en:Installing_Moodle#Requirements|Installation requirements]].  
* You can tell which version you are using by looking at [[PHP info]].
* You can tell which version you are using by looking at [[:en:PHP info|PHP info]].


==How do I install PHP?==
==How do I install PHP?==


Usually you don't have to install PHP at all, as normally it is installed alongside [[Apache]] and [[MySQL]] in a combination known as AMP (see [[Installing AMP]] for details). If you run Moodle on hosted web space PHP is also usually installed already.
Usually you don't have to install PHP at all, as normally it is installed alongside [[:en:Apache|Apache]] and [[:en:MySQL|MySQL]] in a combination known as AMP (see [[:en:Installing AMP|Installing AMP]] for details). If you run Moodle on hosted web space PHP is also usually installed already.


It is possible to build PHP from source - you might have to if you need a very new version for developing Moodle - however, it is quite challenging. PHP itself has many dependencies that you will need to obtain and build, some of which are also tricky to build from source (e.g. GD).
It is possible to build PHP from source - you might have to if you need a very new version for developing Moodle - however, it is quite challenging. PHP itself has many dependencies that you will need to obtain and build, some of which are also tricky to build from source (e.g. GD).
Line 43: Line 44:
If you have a problem with your Moodle site and ask for help in a Moodle.org forum, you may be asked to provide some information from this page.
If you have a problem with your Moodle site and ask for help in a Moodle.org forum, you may be asked to provide some information from this page.


See also [[phpinfo]] and [http://www.php.net/manual/en/function.phpinfo.php PHP manual: phpinfo].
See also [[:en:phpinfo|phpinfo]] and [http://www.php.net/manual/en/function.phpinfo.php PHP manual: phpinfo].


== See also: ==
== See also: ==

Latest revision as of 04:56, 1 May 2024


Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable.


What is PHP?

PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.

Where can I learn more about PHP?

Online resources:

Books:

How is PHP used by Moodle?

Which version of PHP is required by Moodle?

How do I install PHP?

Usually you don't have to install PHP at all, as normally it is installed alongside Apache and MySQL in a combination known as AMP (see Installing AMP for details). If you run Moodle on hosted web space PHP is also usually installed already.

It is possible to build PHP from source - you might have to if you need a very new version for developing Moodle - however, it is quite challenging. PHP itself has many dependencies that you will need to obtain and build, some of which are also tricky to build from source (e.g. GD).

How do I check the PHP configuration on my server?

Run the phpinfo() command. It will display a whole lot of information about the current PHP configuration on your server.

You can also run this command from within Moodle. This option is available under Administration > Server > PHP info.

The PHP info page provides information on the version of PHP your server is running, including PHP compilation options and extensions, server information, the PHP environment and OS version information.

If you have a problem with your Moodle site and ask for help in a Moodle.org forum, you may be asked to provide some information from this page.

See also phpinfo and PHP manual: phpinfo.

See also: