Home
Useful Plesk Commands for Windows
- Details
"%plesk_bin%" is the path below in-case you don't have it registered in system paths
C:\Program Files (x86)\Parallels\Plesk\admin\bin
websrvmng.exe reconfigure domain
cmd:
"%plesk_bin%"\websrvmng.exe --remove-vhost --vhost-name=testdomain.com
"%plesk_bin%"\websrvmng.exe --reconfigure-vhost --vhost-name=testdomain.com
"%plesk_bin%"\websrvmng.exe --reconfigure-vhost --reconfigure-all
Re-configure the FTP configuration using the Plesk command line tool ftpmng.exe as follows:
"%plesk_bin%"\ftpmng.exe --remove-vhost --vhost-name=yourdomain.com
"%plesk_bin%"\ftpmng.exe --reconfigure-vhost --vhost-name=yourdomain.com
c. If this issue happens to every domain, you can repair the FTP configuration for all domains using the following commands:
"%plesk_bin%"\ftpmng.exe --remove-all
"%plesk_bin%"\ftpmng.exe --reconfigure-all
Plesk, PHP include paths break
- Details
Warning: require(./wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in D:\InetPub\vhosts\win.weeatupthecompetition.com\subdomains\wordpress\index.php on line 17
Fatal error: require() [function.require]: Failed opening required './wp-blog-header.php' (include_path='/') in D:\InetPub\vhosts\win.weeatupthecompetition.com\subdomains\wordpress\index.php on line 17
(could be Joomla, Drupal, any PHP site that use includes. So basically all of them)
The above is from a generic install from the Application installer. Had I put this under httpdocs\subdomains there would be no issue. Notice the path is out side the httpdocs folder
You shouldn't need to modify any include paths for PHP, I have done this my self, always thinking it was a php.ini issue. This is not the case.
You only need to make 1 permissions change: Add server\IUSR_someaccount with : "List folder contents" to the directory that is outside of httpdocs. in this case subdomains
I went into Plesk afterwards and went to the domain and added then removed "Additional write/modify permission" to see if it would remove my IUSR that I added. It will not be removed via the web interface through editing the domain.
Technical Notes: Why does this happen; when the windows php-cgi.exe can not getcwd it reverts the current directory to where ever the cgi-php.exe is running in, because it has access to this path it will set the plesk\addtional directory as the current working directory (php-cgi.exe runs under the perms of the iusr). A simple way to test is to create a php file in the directory your having issues with: then hit that page with a browser
PHP Page:
<?php
echo getcwd();
?>
This should show the full path to the directory you ran the script in. If it shows: C:\Program Files (x86)\Parallels\Plesk\Additional\[plesk version folder]
Then this is your issue and you can add the IUSR to the root folder with "list folder content"
Medium Trust
- Details
Developing ASP.NET applications for shared commercial web hosting space can give rise to a security issue that will restrict your options as a developer. If you developing an ASP.NET application that works fine in your development environment any attempt to run it in the live environment may well give rise to the following error:
System.Security.SecurityException: That assembly does not allow partially trusted callers.
This is being caused by the security level that your application is being forced to run under.
This security level is known as the trust level in .NET and it can be set to one of the following values:
Full trust – your code can do anything that the account running it can do.
High trust – same as above except your code cannot call into unmanaged code. i.e. Win32 APIs, COM interop.
Medium trust – same as above except your code cannot see any part of the file system except its application directory. This is the most common trust level that is used in shared hosting environments.
Low trust – same as above except your code cannot make any out-of-process calls. i.e. calls to a database, network, etc.
Minimal trust - code is restricted from anything but the most trival processing (calculating algorithms).
Medium trust is the level most commonly used by shared hosting environments and it places severe restrictions on what your code can do – i.e. you cannot call unmanaged code, such as Win32 APIs and COM components and you cannot do anything with the file system or system registry.
Medium trust also prevents your assemblies from running unless they are marked with a strong name and installed into the server’s Global Assembly Cache (GAC). However, this becomes a problem in a hosted environment where you have no direct access to the GAC.
Solution
Allow Partially Trusted Callers
To ensure that your assemblies will work in a medium trusted environment, you need to give them a strong name and mark them with an attribute that tells the .NET security runtime to allow the code.
To allow partially trusted callers from your code, add the following attribute to the assembly’s AssemblyInfo.cs file:
[assembly: AllowPartiallyTrustedCallers]
You will also need to ensure that the file references the System.Security namespace.
In addition, you will also need to give your assembly a strong name by signing the assembly though the project properties dialog. An explanation of how to do this can be found here: http://msdn.microsoft.com/en-us/library/ms247123(VS.80).aspx.
WordPress SMTP in a shared Plesk Environment
- Details
You will wnt to install the wordpress plugin for SMTP:
http://wordpress.org/extend/plugins/wp-mail-smtp/
Then use the settings in the image below replacing with your information.
Page 18 of 40