• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

PHP pathing issues / include errors

OurAce.com

New Pleskian
The Below 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

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)



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"


Retrieved from: http://ourace.com/blog/95-plesk-php-include-paths-break
 
Back
Top