ProjectNami / projectnami

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

PHP fatal error #426

Closed layne74 closed 3 years ago

layne74 commented 3 years ago

Hey, I'm still very new to this. I am trying to use WordPress locally without Azure. I have put the folder in C:\Program Files\projectnami-2.7.0. I am using PHP Version 8.0.3. I then cmd: ' php -S localhost:8080 ' in the projectnami folder and try to access localhost:8080 from my browser. The browser says "There has been a critical error on this website." and the cmd window gives this error:

PHP Fatal error:  Uncaught TypeError: sqlsrv_query(): Argument #1 ($conn) must be of type resource, null given in C:\Program Files\projectnami-2.7.0\wp-includes\wp-db.php:2004
Stack trace:
#0 C:\Program Files\projectnami-2.7.0\wp-includes\wp-db.php(2004): sqlsrv_query(NULL, 'SELECT option_v...')
#1 C:\Program Files\projectnami-2.7.0\wp-includes\wp-db.php(2560): wpdb->_do_query('SELECT option_v...')
#2 C:\Program Files\projectnami-2.7.0\wp-includes\functions.php(1740): wpdb->get_var('SELECT option_v...')
#3 C:\Program Files\projectnami-2.7.0\wp-includes\load.php(727): is_blog_installed()
#4 C:\Program Files\projectnami-2.7.0\wp-settings.php(159): wp_not_installed()
#5 C:\Program Files\projectnami-2.7.0\wp-admin\setup-config.php(33): require('C:\\Program File...')
#6 {main}
  thrown in C:\Program Files\projectnami-2.7.0\wp-includes\wp-db.php on line 2004

Once again, I am new to this so if you need any other information please ask Thank you very much.

layne74 commented 3 years ago

Fixed, rolled back to 7.4 that was installed by WPI. Moved C:/Program Files/PHP/v7.4 and renamed to C:/Program Files/php Installed SQL driver altered the ini file, added the dll extension and changed the ext directory (because of the path rename)