ProjectNami / projectnami

WordPress powered by Microsoft SQL Server
http://projectnami.org
Other
270 stars 137 forks source link

Installing current PHP without Web Platform Installer #510

Open PHuhn opened 1 year ago

PHuhn commented 1 year ago

Hey Patrick:

Web Platform Installer has not been updated since 2020, and the latest PHP seem to be 7.2. I'm trying to figure out how to install later versions of PHP. I'm currently getting the following message:

Your PHP installation appears to be missing the SQLSrv extension which is required by Project Nami. I've copy the development INI file into PHP.INI. I've added the following:

extension=php_pdo_sqlsrv_74_nts_x64.dll
extension=php_pdo_sqlsrv_74_ts_x64.dll
extension=php_sqlsrv_74_nts_x64.dll
extension=php_sqlsrv_74_ts_x64.dll

I've added the above files to the EXT folder.

Any more suggestions?

patrickebates commented 1 year ago

Here's the custom build we created for newer PHP on Azure Web Apps. Should be able to use it on local IIS by updating the path for the PHP handler. Might require some other paths in the INI be updated as well. https://github.com/ProjectNami/php-azure-windows-web-app

PHuhn commented 1 year ago

Cool. I changed the following:

error_log=C:\WINDOWS\temp\PHP_errors_81.log
extension_dir="C:\Program Files\PHP\V8.1\ext"
PHuhn commented 1 year ago

Oops, got the following err:

HTTP Error 500.21 - Internal Server Error
Handler "PHP_via_FastCGI_81" has a bad module "AnonymousAuthenticationModule" in its module list
patrickebates commented 1 year ago

As I can't find that text in any of the files, I wonder if it was compiled with that dependency.

Do you have Anon enabled on the site? May even have to look at this for some tips to enable? https://stackoverflow.com/questions/4762538/iis-express-windows-authentication/4813716#4813716

PHuhn commented 1 year ago

Hey Patrick: I have Anonymous Authentication enabled for all of my local WordPress sites in IIS Manager.

PHuhn commented 1 year ago

Hey Patrick: I got AnonymousAuthenticationModule because I screwed up the Handler Mapping. Once corrected I'm getting the following:

PHP Deprecated:  version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated in C:\inetpub\WP5_GC_2021_01\wp-includes\class-wpdb.php on line 4054
PHP Deprecated:  version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated in C:\inetpub\WP5_GC_2021_01\wp-includes\class-wpdb.php on line 4058
PHP Deprecated:  version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated in C:\inetpub\WP5_GC_2021_01\wp-includes\class-wpdb.php on line 4050
patrickebates commented 1 year ago

Looks like it's reporting a null for db_version? This is an existing installation or is this happening during an install attempt?

marypeng1020 commented 1 year ago

Add this script: if ( $db_version != null) { ... }