Problems when upgrading from CSWeb 7.3 to 7.5

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
Post Reply
Anne
Posts: 104
Joined: January 11th, 2012, 12:55 am

Problems when upgrading from CSWeb 7.3 to 7.5

Post by Anne »

Hi,
we tried today to upgrade to CSWeb 7.5, but did run into a few problems on the way.. Here's what we did:

First following the instructions in the documentation on upgrading from previous versions, and it seemed almost OK: We only had an installation of PHP which was too old..

So: we tried using Microsoft web platform installer 5.1 to install PHP 7.4, but got the error messages that "PHP manager for IIS" as well as "Windows Cache extension 2.0(x64) for PHP 7.4" failed, and I think here is where we started to mess really up: We installed the PHP Manager 2 for IIS manually, but the Windows cache extension seems only to be available for up to PHP 7.1. (At least it looks like that's what claimed here: https://www.iis.net/downloads/microsoft ... -extension). So I don't know what to do with this.

Anyway: As it still didn't work, I tried to follow the whole installation guide (btw: It is not quite updated everywhere: In the chapter on IIS server setup it tells you to install PHP 5.5.9+), but I'm still stuck (500 - internal server error. Now I don't even get the upgrade check page)

Any suggestions on what to do next?

Anne

PS: Good luck with the election today. I think the whole world is holding its breath
savy
Posts: 159
Joined: December 27th, 2012, 1:36 pm

Re: Problems when upgrading from CSWeb 7.3 to 7.5

Post by savy »

IIS Web Platform has not upgraded the PHP version that is bundled with it. You will have to install the PHP 7.3 or above from here https://windows.php.net/download/
Please make sure to download the non-thread safe version as you will be configuring PHP via fast CGI (see instruction on this page about Which version do I choose?)
After installing PHP, follow the instructions from the CSWeb help documentation starting from "Handle Additional Verbs"
https://www.csprousers.org/help/CSWeb/i ... setup.html
I attached a screenshot of how fastcgi is configure on my machine with the path pointing to the correct php version on my drive.

If you have multiple fastcgi configurations make sure that the fastcgi configuration you added comes on the top by moving it up in the ordered list view of the Handler Mappings or deleting the other fastcgi configurations

P.S: Thanks! Fingers crossed :)
Attachments
11-3-2020 3-04-09 PM.png
11-3-2020 3-04-09 PM.png (268.47 KiB) Viewed 9347 times
Last edited by savy on November 5th, 2020, 10:49 am, edited 1 time in total.
Anne
Posts: 104
Joined: January 11th, 2012, 12:55 am

Re: Problems when upgrading from CSWeb 7.3 to 7.5

Post by Anne »

Thank you very much. Tried to do as you said, but I still have problems (see word document attachment for screenshots with error messages etc)

So here is step by step (if I remember correctly)
1) Got rid of the stuff we did yesterday
2) Downloaded PHP v7.4, unzipped it to the PHP folder
3) Made sure the PHP_via_FastCGI pointed to the right folder/file and that the verb stuff was OK (see attachment)
4) Renamed the php.ini.production in the v7.4 folder to php.ini as there were no php.ini there
5) Compared the v7.4/php.ini with the v5.3/php.ini and made the settings as same as possible (where they existed)
6) the extension syntax in the php.ini file has changed, so I used the new syntax (ie. "extension=curl" rather than "extension=php_curl.dll")
7) verified that all of the php.ini settings on page 4 in the CSWeb user's guide was correct
8) restarted the server

So, my questions:
1) any idea of what I do wrong? and
2) Is it easier to just start from scratch following the user guide step by step? (I'm worried about this: as you pointed out, some of the steps described are outdated, and I'm probably gonna get stuck again at the same place.. ;) :roll: )

Attachments:
word file containing screen shots
php.ini
Attachments
screenshots from upgrading csweb.docx
(104.19 KiB) Downloaded 171 times
php.ini
(72.84 KiB) Downloaded 168 times
savy
Posts: 159
Joined: December 27th, 2012, 1:36 pm

Re: Problems when upgrading from CSWeb 7.3 to 7.5

Post by savy »

1. instead of changing the settings to match the v5.3, just copy php.ini.production in the v7.4 folder to php.ini and uncomment the appropriate lines that have "extension=" like you did in the attached php.ini
2. your fasctcgi configuration looks fine
3.Make sure to set the folder permissions correctly as mentioned here https://www.csprousers.org/help/CSWeb/i ... setup.html
4. run csweb setup following instructions from here https://www.csprousers.org/help/CSWeb/a ... setup.html
5. restart server

Hope this helps.
Anne
Posts: 104
Joined: January 11th, 2012, 12:55 am

Re: Problems when upgrading from CSWeb 7.3 to 7.5

Post by Anne »

Seems I'm getting closer, so here's what I done - just in case anybody else still struggle despite Savy's excelent help:

For some reason it was lots of fastCgiModules on the server with different names, and apparently, the one in use did not default to the one I expected.. I removed all of the others, and after that I was able to run the csweb setup script. And I discovered that some of the php settings were wrong.. After a little back and forth, I discovered that the php.ini file was not in use at all..

After googling what to do about that, I made a script called phpinfo.php and put it directly under the wwwroot folder. It contained one line:

<?php phpinfo(); ?>


when browsing to http://localhost/phpinfo.php i found out that my php.ini path was empty, and right now there's where I'm at now when internet access to the server died (I work very remotely.. :shock: ).


Before the server access died, I also typed "php --ini" in a command prompt and got the error

"PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0"

but I think I've got the solution to that too: stackoverflow is you friend: https://stackoverflow.com/questions/594 ... -php-build

Hopefully, the server will be available tomorrow and I will fix the rest!
Anne
Posts: 104
Joined: January 11th, 2012, 12:55 am

Re: Problems when upgrading from CSWeb 7.3 to 7.5

Post by Anne »

Seems I was too optimistic yesterday when I said I was nearly there.. Now I'm about to give up.

I simply can't get PHP to read the right php.ini file: The "CSWeb server requirements" page is now displayed, but it claims that for instance that the file info extension is missing, and I've quadruple checked that the line with the extension is OK.

But there are some funny things going on still - for instance when I was playing around testing Php v 7.3 instead of 7.4, my cute phpinfo script worked fine. It doesn't anymore now that I've upgraded to phpv7.4. Also the command php --ini in a cmd window gave me a php path that was totally different..
Also, the handler mappings/fastCGI can be set at both default web site and server level. Which one is the correct one_ (Currently I set it both)

Any new suggestions?
savy
Posts: 159
Joined: December 27th, 2012, 1:36 pm

Re: Problems when upgrading from CSWeb 7.3 to 7.5

Post by savy »

It seems like you have multiple versions of php installed on your machine and this is fine. When you run php --ini from command line, the version that is picked is the one that is first listed in the PATH environment variable. You do not have to worry about it as you set IIS to process files with .php extension using fastcgi and pointed the path to the correct version of php. I would suggest that you create a phpinfo.php in the csweb folder with the following lines and open this page in your browser. At the top of the page you will see the list of loaded extensions along with the version of php and other information.

Code: Select all

<?php
echo '<pre>';
echo 'LOADED EXTENSIONS:<br/>';
print_r(get_loaded_extensions());
echo '</pre>';
echo phpinfo();
?>
Make sure that IIS is picking the correct php version.
If you do not see the fileinfo extension loaded, check the php.ini file extension_dir for loadable extensions path and also verify php_fileinfo.dll exists in this directory.
Post Reply