Topic: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

The latest release of FA says it's PHP 7.x compatible.  I'm attempting to install on my windows 10 machine.  I have PHP installed and phpMyAdmin works without issue.  I've been trying to get this configured and I find that php settings listed in the FA wiki and install directions don't exist in the php.ini file.  When I try http://localhost/frontaccounting/frontaccounting.php I get Restricted Access and that is it.

I guess what I'm looking for is a definitive guide to follow.  I'm somewhat computer literate but don't have experience with PHP so this is quite challenging.

2 (edited by poncho1234 02/24/2018 07:19:11 pm)

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

Hi, although I have no experience of IIs, it is mentioned in the installation page of the wiki found here

On IIS, use PHP Manager for IIS. It is a tool for managing one or many PHP installations on IIS 7 and IIS 7.5 servers. Will need MSVC runtimes.

Can you also change the line 

$go_debug         = 0;  
to 
$go_debug         = 1; 

in config.php in the root directory of FA and post any errors on here.

You could also try running phpinfo - and comparing results with some of the php settings mentioned on the wiki installation page; eg magic_quotes_gpc = 0 and register_globals = 0, etc. Then make the necessary changes to php.ini and restart your server. (Keep a record of what you change with line #)

Basic troubleshooting advice can be found here

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

FA now natively supports upto PHP 7.1.x only. PHP 7.2.x is not yet supported.

PHP 5.3.x is still the most widely used and texted version for FA so far for long time users though later versions happen to be discussed in the forum as newbies try to grapple with their maiden installs.

Most script based installs (Scriptaculous, cPanel, SimpleScripts, Fantastico, public OpenVZ templates, etc) rely on outdated versions of FA where the hosting providers make several versions of PHP available on a per application basis possibly in CGI mode.

PHP 7.2 Incompatibilities.

PHP 7.1 to 7.2 Migration Notes.

What's New in PHP 7.2.

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

Slowly making progress.  Switched to PHP 7.1.14, got index.php set as the default document on IIS.  Learning a bit more about PHP.  Looks like I'm missing some languages based on this error message:

::language.inc:15: include_once(./lang/installed_languages.inc): failed to open stream: No such file or directory ::language.inc:15: include_once(): Failed opening './lang/installed_languages.inc' for inclusion (include_path='.;C:\php\pear')

From what I can tell it's looking for installed_languages.inc which I can't find either.  Ideas?

Also looks like register_globals is depreciated and as of PHP 4.2 its been set to off anyways

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

When you just copy over the FA install files, you will not have any lang/installed_languages.inc file The other files that get generated during an FA install are: installed_extensions.php and company/#/installed_extensions.php.

Attached are the files that get created during a default FA install.

Post's attachments

Default_Installed_Files.zip 1.6 kb, 3 downloads since 2018-03-01 

You don't have the permssions to download the attachments of this post.

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

So I don't get it.  I thought that you download the archive from sourceforge and extract the contents to inetpub/wwwroot/frontaccounting (for example) then just point the browser to the folder you extracted it to.  That should load the index.php file from there and if FA hasn't been configured (config_db.php doesn't exist) it runs the installer in the install folder.  Digging through the code the language.inc file includes the installed_languages.inc  Since this file isn't in the archive where is it supposed to come from.  I tried unpacking the one you attached in the previous post and editing to point at the en_US language dir.  However this directory is missing the en_US.po file so that doesn't work either.  Am I missing something on how to do the initial install? 

I looked at 2.3.xx archive and it looks the same so I don't see how going back to an earlier version will make any difference. 

On a side note this is forcing me to get a collection of PHP editing and debugging tools and start learning PHP...  I'm sure this isn't supposed to be this difficult so I must be missing something basic.

From the install.html file

Step 1.  All the files inside this archive should be copied to a directory under the web server root directory.

Step 2.  Enter your_url/account (or whatever directory you entered). This will run the install wizard if this is the first time you run FrontAccounting, setup a drill company and optional populating with initial demo data. You can later on create your own real company. It is a good idea to get familiar with the system before starting your own company.

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

There is certainly something wrong with your installation. When you first browse to the frontaccounting folder (http://...../frontaccounting and not http://inetpub/wwwroot/frontaccounting), the said default installed files and config.php and config_db.php files should have been created. If not, check if the database is present but no tables in it and then try again.

Were you able to go thru the install sequence at all? The .po file is of no use during usage but it is used to compile as the .mo file which is used.

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

no it doesn't make it past line 15 in language.inc

@include_once($path_to_root . "/lang/installed_languages.inc");

From what I have just read, the @ symbol should suppress errors  "the at sign (@). When prepended to an expression in PHP, any error messages that might be generated by that expression will be ignored."

Based on this I expect that if installed_languages.inc does not exist it ignores it and somewhere else it must create it and save it to the includes/lang folder.  Hunting for the code for that but it seems that the @ is not ignoring the error.

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

Do you have the said file in place?
You can precede the said line with if(file_exists(....

10 (edited by cempamj 03/02/2018 01:01:31 pm)

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

I did not put the installed_languages.inc that you attached in the folder, the install instructions do say that it will be created.

Yes  I changed the line to test if the file exists first and it now fails to find install/lang/C files which of course are not there.  I assume that is the default language as that is what is in the installed_languages.inc file that you attached. 

4 Domain file "../lang/C/LC_MESSAGES/C.po" not found. 4 Domain file "../install/lang/C/LC_MESSAGES/C.po" not found.

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

This probably a locale issue for IIS. Apache defaults to "C". The system does not seem to have gettext and is trying to use the fallback php file with an array of translated strings.copy over the empty.po file as the C.po file with appropriate changes for language in it's header and place it in the path where it should be.

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

Well that makes more sense right now.  I'd prefer to stay with IIS if possible as that is already on window's machines.  I'll start looking into the locales issue.  In the meanwhile is it possible for you to attach all the files needed for en_US language (the .mo and .po files)  I suspect If I create a directory in the install/languages for C it might solve the issue.

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

Take all translation files for the core from my FA24extensions repo. Note that the en_US locale comes in 2 flavours - iso-8859-1 and utf-8.

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

Success!  Here is what I have had to do in order to install on Windows 10 with IIS 7, PHP 7.1.14 and FA 2.4.3

in order to handle the error message:

::language.inc:15: include_once(./lang/installed_languages.inc): failed to open stream: No such file or directory ::language.inc:15: include_once(): Failed opening './lang/installed_languages.inc' for inclusion (include_path='.;C:\php\pear') 

Apparently the @ is not suppressing the error of the missing file and not letting it continue with the initial install.  This is probably better programming practice to avoid throwing an error in the first place by checking for the existence of the file.  Maybe should be addressed by the development group.

Change line 15 in C:\inetpub\wwwroot\frontaccounting\includes\lang\language.inc
from

@include_once($path_to_root . "/lang/installed_languages.inc");

to

if (file_exists($path_to_root.'/lang/installed_languages.inc'))
    @include_once($path_to_root . "/lang/installed_languages.inc");

to handle the error message:

4 Domain file "../lang/C/LC_MESSAGES/C.po" not found. 4 Domain file "../install/lang/C/LC_MESSAGES/C.po" not found.

Add en_US language
Download the FA24Extensions in order to get the en_US language (unpack it and copy FA24extensions-master\Languages\en_US folder to C:\inetpub\wwwroot\frontaccounting\install\lang and to C:\inetpub\wwwroot\frontaccounting\lang

Create a surrogate for the missing C language extension using en_US as a basis

make a copy of  C:\inetpub\wwwroot\frontaccounting\install\lang\en_US to C:\inetpub\wwwroot\frontaccounting\install\lang\C
then rename the en_US.mo & en_US.po files in the C\LC_MESSAGES to C.mo and C.po.  Then edit  and change the name inside the files from en_US to C

now copy the new C language folder to C:\inetpub\wwwroot\frontaccounting\lang  (I think it needs to be in both places)

I would like to get an actual copy of the C language definitions but this seems to have worked so far.


Changes to the default php.ini file (copied from the php.ini-development template)

uncomment lines:
extension=php_mysqli.dll
extension=php_pdo_mysql.dll
extension=php_openssl.dll

added:
magic_quotes_gpc = 0 ;don't think this is needed in PHP.7.1.x but added it anyways based on FA install instructions


I think that is it so far.  I will try to post up a full set of instructions and links to the getting IIS installed, PHP installed and IIS configured for it, Installing MySQL and phpMyAdmin on a windows 10 machine.  I'll also try to include additional resources I used to debug with.

Thank you for all your quick responses and keen insight apmuthu

Re: Install FA 2.4.3 with PHP7.2.2 MySQL5.7 and IIS problems

@cempamj: Very nice documentation indeed. The wiki will certainly benefit from it once done.