php_extension intl & php_setting opcache.enable

php_extension intl & php_setting opcache.enable

by derek reddy -
Number of replies: 15

I have tried  (in an attempt to upgrade my moodle site) to now download with MS web platform installer and get the above messages.

I have follwed the help links 

https://docs.moodle.org/27/en/admin/environment/php_extension/intl

I can find folder admin but can't find any folder enviroment, I do however, find  files enviroment.php & .xml also phpinfo.php.

I find no php extension: What must I do?



Part 2

help ink : https://docs.moodle.org/27/en/OPcache

as above but I don'find any file that says settings , I do find a folder with the title settings but nothing relating to php in that file.

Can someone help I have aged at least 5 weeks in the last fornight.

Average of ratings: -
In reply to derek reddy

Re: php_extension intl & php_setting opcache.enable

by Kathir Rajaraman -

Hi reddy

Dont go to admin folder. Just upgrade is very simple. First thing you go to php.ini file then you following the settings

1) MS Windows

To enable this extension add the following line to your php.ini file usually found in /php:

extension=php_intl.dll

And then set the intl.default_locale and intl.error_level directives in your php.ini file.

[intl]

intl.default_locale = en_utf8

2) You see  https://docs.moodle.org/27/en/OPcache
Thanks
Kathir Rajaraman R
In reply to Kathir Rajaraman

Re: php_extension intl & php_setting opcache.enable

by derek reddy -

Thanks for that Kathir, but I also can not find a php.ini file anywhere....where should it be?

In reply to derek reddy

Re: php_extension intl & php_setting opcache.enable

by Bret Miller -
Picture of Particularly helpful Moodlers

For me, it's generally in the PHP program directory on Windows, so wherever you put that.

In reply to Bret Miller

Re: php_extension intl & php_setting opcache.enable

by derek reddy -

Well, to my knowledge Brett, I haven't put it anywhere, but if you could tell me where to look I'd be grateful.

The only php thing I find in windows is a file called php run, no ini file innit.

Do I look in web installer, in some other file?????

In reply to derek reddy

Re: php_extension intl & php_setting opcache.enable

by Usman Asar -
Picture of Plugin developers Picture of Testers

Derek,

Have you used Web PI for all your installs?

if yes, then to find PHP folder, you have to go to C:/Program Files (x86)/PHP/PHP v x.x (assuming you are on a 64-bit operating system)

If you installed PHP 5.5.x, then 5.3 must have installed as well using WebPI, and the highest version will be in use.

php.ini file will not be automatically available for you, get inside that php folder (the path I mentioned above), and in that php v5.5 (as example) you'll find 2 files

php-development.ini

php.production.ini

open php-production.ini and copy whole of its contents, then on root directory of that folder, create a file called php.ini, and paste whatever you've copied from php-production.ini to that,

if you are doing so for intl extension only, then I will suggest to skip that, as intl and opcache are optional (not recommended by Moodle), but opcache does improves very much on speed and memory utilization so at least I will recommend that, just keep in mind one more thing, you MAY have installed Windows Cache extension from Web PI as well, for that either you have to disable it and use zend opcache as using both will create slight of a mess, though Win Cache does improves over using PHP without any accelerator, but zend's opcache is must faster.

All extensions (intl, opcache, mysqli etc etc ) are available inside EXT folder (found inside PHP folder), so if you are using some extension that does not comes as a part of default install, then you have to download the dll files and place them in php/ext folder.

whatever changes you make with PHP, dont forget to restart IIS.

if you are having any trouble setting up, give a shout once again.

In reply to Usman Asar

Re: php_extension intl & php_setting opcache.enable

by derek reddy -

So Usman, I have just tried what you suggested and I get a warning that php.ini file already exists.

BTW I found the php files in IIS Express v5.4

I have

php.ini developement

php.ini production

and I also have a php file whose description is configuration settings. 

Am I attempting to overwrite one of these?? 

If so which one

and 

do I need to?


Also, do I use the encoding UTF-8 ?


Thanks so far


In reply to derek reddy

Re: php_extension intl & php_setting opcache.enable

by Usman Asar -
Picture of Plugin developers Picture of Testers

OK here is the thing, when you install PHP manually, you get two files intact, production and development, if you are just using the PHP for developing site, you can safely rename the php-development.ini to php.ini and make changes to it as, same if for production.

when you install through WebPI, windows installer will automatically create php.ini file and then ADDS to its base, recommended settings. like for example, you'll find max_upload_limit= 4M in the php file, while when doing manually, you are commenting OUT those settings and extensions that you need, what windows installer do is, rather than commenting out the required extensions, it just adds to the base, so if you have configuration file already, then you'll find them typed in the base of that file and above that, will be exactly same as you'll find in either php-development/php-production file.

In that configuration file, at the bottom, you'll find information written like

 

[WebPIChanges]

error_log=C:\Windows\temp\PHP54_errors.log

upload_tmp_dir=C:\Windows\temp

etc etc

This above is the information added by WebPI to that configuration file, with its own configurations. all above that text will be as same as found in php-production.ini file.

for intl extension, all you have to do is, download intl extension.dll file, and then mention in your configuration file, restart IIS and you are good to go.

 

and yes UTF8 encoding is required.

Although WebPI does the jobs automatically, but I have always preferred doing it manually even in presence of wonderful WebPI option, if you want to take manual path, that can be assisted as well. As there is 64-bit PHP available for Windows Platform as well, whilst WebPI wont give option of that.

In reply to derek reddy

Re: php_extension intl & php_setting opcache.enable

by Usman Asar -
Picture of Plugin developers Picture of Testers

Intl extensions comes a a part of PHP package since PHP 5.3, just in case if you dont have (which I doubt) to add intl extension, just download the extesnion from

https://pecl.php.net/package/intl

and unzip it in your ext folder within the PHP folder

and add this to lines (below WebPIChanges) as mentioned above

extension=php_intl.dll

***** - but before downloading and unzipping, do look out for this file (php_intl.dll) in your EXT folder, if its already there, just add the above line.

restart IIS and you should be good to go.

again as a reminder, you dont NEED intl to run moodle, it was only if you are using languages other than English, else why to put load on PHP processor with extensions that you really dont need.

If, you want to enable zend.opcache  or have installed WinCache, let me know, there are few settings required for them, other  than just enabling them in configuration file.

In reply to Usman Asar

Re: php_extension intl & php_setting opcache.enable

by derek reddy -

the problem is that WPI will not complete the installation without these things, or rather, the moodle installation wont complete.


So I have found the file with the windows script in it, it is in the php (file icon with a small cog on it) described as configuration settings. The added script did not appear in the development or production php files.

So now I have more questions:

Could I use  the production or the development files as the main ini file, and how do I do this?

When trying to save the php (wpi script) it will not save automatically, I have to choose a file name, 

so if i just save with the original file name (overwriting) the original is that OK?



***** I have just tried to overwrite the php file and access id denied sad

In reply to derek reddy

Re: php_extension intl & php_setting opcache.enable

by Usman Asar -
Picture of Plugin developers Picture of Testers

Derek, the file with the cog is the correct file (also called php.ini) but it should be the name of the file as well.

You are absolutely correct saying, that added script does not appear in either development-ini or production-ini files, because these files are there for reference, so in case if you are installing php on a production server, you can safely either rename the production-ini file to php.ini or copy contents from production file and paste them to a new file, later to rename it as php.ini.

php.ini file is the file that php script engine looks into, to see the settings.

Regarding using either the development or production files, as I mentioned above, yes you can. BUT, remember there are settings already in configuration file, whilst both development and production are raw files with no settings enabled in them, so just copying over the content of either to php.ini will shut down your php script engine as your php will not be able to find the configuration settings its looking for in those files due to the fact everything is commented out (though present), and anything commented  in configuration files simple tells the php engine, to ignore that line.

make sure you are signed in as administrator to copy/remove/rename files. but before that, do 2 things.

1: send me the screen shot of the file(s) in PHP folder (showing me configuration)

2: attach your php.ini (so called configuration) file here, for me to have a look so that in case if changes are required, I will simply overwrite them, and you can copy/paste that file back into PHP.

 

Also, one reason could be, that you wont be able to overwrite even with administrator previledges is, that with IIS running, that file is in use, so it wont allow you to over write.

In reply to Usman Asar

Re: php_extension intl & php_setting opcache.enable

by derek reddy -

Hi Usman

a really big thanks for all your help, I appreciate your time and effort, plus your instructions are always clear and understandable.


So i closed everything down and re installed, still got the problems of the php things showing up with a 'check' box, I decided to ignore this and pressed continue and now everything seems to be ok.

My next barrel of fun is trying to upload the site to a production site, but hey, it's all plug and play isn't it? lol

In reply to derek reddy

Re: php_extension intl & php_setting opcache.enable

by Usman Asar -
Picture of Plugin developers Picture of Testers

Derek,

In moodle server test environment, if you see ORANGE colored warnings, they are just optional, without them Moodle will work absolutely fine. that is why I mentioned that to install "intl" only when and if you need it. The second orange for opcache, that is as well recommended, but I will recommend it for it really pulls out the performance out of Moodle site.

Its only if you see RED colored warnings, that are for REQUIRED things, without them you will not be able to press that continue button.

What I assumed (forgive my lack on understanding from the very start), that you already have Installed  Moodle, but want to install the optional extensions (Intl and opcache).

also, just to get rid of your other confusion regarding php.ini file. that file will only be listed as PHP (with cog symbol), what you actually have to do is, go to folder options (in control panel > appearence), click second tab (VIEW) and then find en entry there called "Hide Extensions for Known file types" and uncheck it, and then if you go into PHP, you'll clearly see php and ini written front of it. as ini is extension of php file, and windows by default hides all these extensions.

Indeed everything is plug and play, I have few videos created to assist forum members, where I have shown Moodle installation using script installer and using CPanel (manually), as well have covered how to move Moodle from one server to other plus upgrading Moodle etc - They are though based on Shared Hosting and on Linux/Apache, but as I am returning back to The Legendary IIS and Windows Platform, so soon will be creating videos based on Setting up IIS and Moodle. meanwhile should you need videos for CPanel based installations, just give a shout.

In reply to Usman Asar

Re: php_extension intl & php_setting opcache.enable

by derek reddy -

Again thanks for the info, I did find the ext files as you explained (dll) 


I think the confusing arises from a couple of weeks ago when I was trying to upgrade my existing site and you were helping me with those problems, unfortunately, I think I have killed that site as my scrom packages (new or old) no longer work on that site due to some content pool problem that no one seems to be able to answer. I think the problem arises from 2.8 using a different mysql version to my hosting site, I assume I have now corrupted something.

I now intend to see what the MS Azure thing is all about & intend to upload this new site (moodle 2.7) on there and see where that takes me.

Thanks again, I am sure we will meet again on the help forum until I admit to myself that I am beyond help.

In reply to derek reddy

Re: php_extension intl & php_setting opcache.enable

by Usman Asar -
Picture of Plugin developers Picture of Testers

As long as its MySQL, no matter what versions you are, it will work straight away (very old versions using MyISAM may have issues).

SCORM does shows up loads of issues, as there is no one applications creating SCORM package, Adobe has different code running in background, Camtasia has different, iSpring has different, so SCORM is something that people tend to stay away from smile

If its Azure you are considering, then let me tell/warn you straight away with one thing, Azure is Microsoft's version of Amazon Web Services or Google Cloud, where Amazon and Google run MySQL as database in back-end, Azure is running its platform on..........Yeap you must have given a thought. its Microsoft SQL Server, so there could be potential issue when MOVING site from your WIMP (based on MySQL) to WIMP (based on SQL Server).

One thing that you really have to take into consideration.

either start the site from scratch on Azure platform, or convert your database from MySQL to MS-SQL before moving site.

Sure you can get benefit of forums learning Moodle as there are users using Moodle for long time, as I still remember first day here with absolutely no clue, and there was one person who helped me loads for setting up my Moodle, and he was from Germany as well.

In reply to derek reddy

Re: php_extension intl & php_setting opcache.enable

by derek reddy -

I am losing the will to live now, maybe I should look at a paid for option