PHP questions

PHP questions

by Sean Ashe -
Number of replies: 2

I'm having trouble finding the required PHP extensions like:

simplexml

xml

pcre

gd

ctype

tokenizer


Any idea where I can locate those?

Average of ratings: -
In reply to Sean Ashe

Re: PHP questions

by Usman Asar -
Picture of Plugin developers Picture of Testers

Sean, Just as Bret said, Everything you need to run moodle, whether required or even recommended is already in PHP 5.5.x onwards, previous versions may still lack some recommended extensions (Like OpCache).

All you have to do is, remove the semi-colon before extension o enable it in php.ini file (also referred to as PHP config file)

One thing that MAY be problematic is version of PHP you've chosen as there are two versions, NTS and TS and they depend upon the WEB SERVER and not the operating system, so I am assuming that you MAY have downloaded the NTS (non-Thread Safe) version is for IIS where it runs on Windows platform only, where some people may assume that because it's for windows, so running Apache requires NTS as well, whilst in actual all depends on Web Server you're using, so in your case as it's Apache, so you would be downloading the TS (Thread Safe) version of PHP.

Once you've done that, your Moodle should open fine even on default settings for PHP.INI, should there be required extension then you'll get message in Environment section, usually it's INTL extension that is not enabled by default in PHP, else most required are already enabled.

If you're still in doubt, I have a full tutorial for setting up PHP manually, but that tutorial shows setting on Windows Server and IIS (so slight difference there) else method of setting up PHP remains similar, you can watch video in the link provided

http://blog.academictools.org/2015/12/installing-moodle-on-microsoft-windows.html

Just the applicable part is where I have shown how to enable extensions in PHP (simply finding them using find command in notepad and removing the semi-colon to enable them - dont forget to restart Apache web server)