• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Plesk installation on windows is corruped - how to fix?

evrinhost

New Pleskian
I get error "The file index.php is part of Plesk distribution. It cannot be run outside of Plesk environment." on plesk onyx 17.5 after I reinstalled php on IIS.

pleskcontrolpanel iis website is the only php website on iis, and all document I found (mostly old docs) suppose control panel is online and working, which in my case IT IS NOT. but I have access to Plesk installer.

so how can I get it back running? does removing and adding "base package of plesk" and "plesk" from plesk installer deletes current domains and their configs? does this type of action fixes the problem?

also, what php version should be set on IIS site for pleskcontrolpanel?

I appreciate a prompt response with a working solution.

regards
 
I Spent 2 days on this checking any possible solution. this is for future reference and for those it may concerns:

All versions of PHP uninstalled from server and IIS, plesk doesnt use standard php so you dont need them. we dont use php, we dont support, we dont give a s**t.

On IIS for PleskControlPanel and any custom IIS website that you use to access the panel, goto Handler Mapping > Add Module Mapping with these props:
Request Path: *.php
Module: FastCgiModule
Executable: "C:\Program Files (x86)\Plesk\admin\engine\php-cgi.exe"|-dauto_prepend_file=auth.php
Name: PleskEngine-FastCGI-php1

in Request Restriction > Invoke handler > File or Folder
this will create specific php settings for plesk.

if you are configuring custom website dont use PleskEngine-FastCGI-php for name, it conflicts with plesk main site, so suffix it.
keep the rest intact

Application Pool of website : PleskControlPanel , this is default app pool for pleskcontrolpanel

if you have problem with default plesk panel website, delete both websites and PleskControlPanel app pool from IIS and run these commands from admin\bin64 (plesk onyx):
websrvmng.exe --configure-anonymous-access
websrvmng.exe --remove-sites-cache
websrvmng.exe --configure-plesk-website

in my case the very message "The file index.php is part of Plesk distribution. It cannot be run outside of Plesk environment" was because of accidental change in php version on pleskcontrolpanel. so files got corrupted. plesk does not allow you to reinstall and replace files from installation package automatically, nor Reconfigurator solves these types of problems, so you have to extract files manullay. this is from a plesk kb:

msiexec /a C:\ParallelsInstaller\parallels\PANEL-WIN_17.5.3\dist-msi-Microsoft-2003-i386\plesk.msi TARGETDIR=M:\tmp\ /qn
msiexec /a C:\ParallelsInstaller\parallels\PANEL-WIN_17.5.3\dist-msi-Microsoft-2003-i386\plesk-service-node-utilities_mu011.msi TARGETDIR=M:\tmp\ /qn
msiexec /a C:\ParallelsInstaller\parallels\PANEL-WIN_17.5.3\dist-msi-Microsoft-2003-i386\plesk-engine_mu011.msi TARGETDIR=M:\tmp\ /qn

run each line one by one. if msi packages not available run ai.exe --console and get them.

open M:\tmp\ or whatever destination is, goto admin folder, you may copy htdocs, bin, bin64, engine, lib, plib, any folder you may need, to plesk installation folder > admin. this may solve problems.
for bin and engine folders you have to stop all plesk services, end task any process related to plesk and php, then copy files. restart OS and enjoy.

this roadmap is AS IS and in case of unwanted consequences you are on your own and you hold the whole responsibility. hence in lack of relible and up-to-date docs on plesk kb and poor support, this may help or at least provide some clue. this worked on win 2012 r2 IIS 8 Plesk Onyx 17.
 
Back
Top