Unable to provision site under Windows

Good day, I am having a serious issue that I cannot seem to fix. I cannot create any new site on local see the attached photo

I don’t know how to fix this as my work is hanging now and I am frustrated by this. I work on windows 8.1 64bit.

Your help would be appreciated.

Hey @Philippus!

Thanks for sending that screenshot. To get a better idea of what Local’s encountering, can you please provide your Local Log? See this Community Forum post for instructions on how to do so:

Hi Ben Turner

Here is the log file as requested.
Kind regards

local-lightning.log (65.4 KB)

I’m seeing a few errors in the log that look like this:

{"thread":"main","class":"Process","process":"nginx","level":"warn","message":"nginx: [alert] could not open error log file: CreateFile() \"%%userDataPath%%\\run\\BVvPH4pnw\\nginx/logs/error.log\" failed (3: The system cannot find the path specified)","timestamp":"2021-08-20T09:20:21.771Z"}
{"thread":"main","class":"Process","process":"nginx","level":"warn","message":"2021/08/20 11:20:21 [emerg] 544#3200: CreateFile() \"%%userDataPath%%\\run\\BVvPH4pnw\\conf\\nginx\\nginx.conf\" failed (2: The system cannot find the file specified)","timestamp":"2021-08-20T09:20:21.808Z"}

Note that this part of the error essentially means that Local can’t find that file/folder for some reason:

The system cannot find the path specified

You mention not being able to create any new site – do you have existing sites that still work?

I think that maybe Local’s configuration has become corrupted, and you might want to:

  1. Backup any sites that you currently have and stop Local.

  2. Delete Local’s configuration folder which should clear up anything that’s wrong with those “run” folders. Here’s a help doc that goes over the details of removing (uninstalling) Local’s configuration folder:

  3. Delete any of the Site files that exist in the “Local Sites” folder.

  4. Restart Local and try creating a new site.

Can you give that a try and let us know if that allows you to create new sites?

Hi Ben Turner I am having the same problem, Cannot create a new site on Local, please see the log file, please advise:

Kind Regards

local-lightning.log (186 KB)

It looks like it’s a slightly different problem. I’m seeing a few lines like this:

{"thread":"main","class":"WordPressInstaller","stack":"Error: Command failed: \"%%resourcesPath%%\\lightning-services\\php-7.3.5+11\\bin\\win64\\php.exe\" \"%%resourcesPath%%\\bin\\wp-cli\\wp-cli.phar\" --path=\"C:\\Users\\Gerhard\\Local Sites\\helpmekaar\\app\\public\" --require=\"%%resourcesPath%%\\bin\\wp-cli\\local-wpcli-error-reporting.php\" --skip-plugins --skip-themes \"core\" \"install\" --url=http://helpmekaar.local --title=\"helpmekaar\" --admin_user=gadmin --admin_password=[REDACTED] --admin_email=dev-email@flywheel.local\nFatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\\Users\\Gerhard\\Local Sites\\helpmekaar\\app\\public\\wp-includes\\wp-db.php:1688\nStack trace:\n#0 C:\\Users\\Gerhard\\Local Sites\\helpmekaar\\app\\public\\wp-includes\\wp-db.php(632): wpdb->db_connect()\n#1 C:\\Users\\Gerhard\\Local Sites\\helpmekaar\\app\\public\\wp-includes\\load.php(558): wpdb->__construct('root', 'root', 'local', 'localhost')\n#2 C:\\Users\\Gerhard\\Local Sites\\helpmekaar\\app\\public\\wp-settings.php(124): require_wp_db()\n#3 phar://C:/Users/Gerhard/AppData/Local/Programs/Local/resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1271): require('C:\\\\Users\\\\Gerhar...')\n#4 phar://C:/Users/Gerhard/AppData/Local/Programs/Local/resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1192): WP_CLI\\Runner->load_wordpress()\n#5 phar://C:/Users/Gerhard/AppData/Local/Programs/Local/resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): W in C:\\Users\\Gerhard\\Local Sites\\helpmekaar\\app\\public\\wp-includes\\wp-db.php on line 1688\nError: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.\n\n    at ChildProcess.exithandler (child_process.js:317:12)\n    at ChildProcess.emit (events.js:315:20)\n    at ChildProcess.EventEmitter.emit (domain.js:467:12)\n    at maybeClose (internal/child_process.js:1048:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)","level":"error","message":"Error installing WordPress","timestamp":"2021-10-06T12:04:31.714Z"}

Note the parts about:

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in 

and

Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.

That seems to indicate that for some reason, PHP isn’t able to use a vital function needed to interact with the database.

After my last reply in this topic, what sorts of things have changed? Did you re-install Local? Has there been an upgrade to Windows? Is there any antivirus installed that might be locking down the database?

No didn’t do anything weird like that.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.