Hi all!
I got really annoying thing while moving my Drupal site from one Windows server to another and fighting it several days already.
I wanted just to clone the site (Drupal 5.18, MySql 5.1, PHP 5.2.6 all versions remain the same)
Servers config:
OLD: Windows Server 2003, IIS 6 with PHP ISAPI filter, standard auth model
NEW: Windows Server 2008 SP2, IIS 7 with PHP FastCGI module, Classic .NET application pool (operate under Network service), permissions to read on PHP and website folder are gratned for IUSR and NEWSERVER_IUSR.
Both servers are in domain.
I installed PHP and MySQL on new server, configured them, created new website, granted permissions as I always did for my IIS sites, copied Drupal files from old server.. and got this:
Warning: require_once(./includes/bootstrap.inc) [function.require-once]: failed to open stream: No such file or directory in C:\WEBSITES\site1\index.php on line 15
Fatal error: require_once() [function.require]: Failed opening required './includes/bootstrap.inc' (include_path='.;C:\php5\pear') in C:\WEBSITES\site1\index.php on line 15After two days of googling and checking everything in PHP settings I can tell for sure it's NOT a PHP issue (btw, "include_path" line was commented in php.ini on old server).
I found something that pointed me to the authentication area: If I disable Anonymous auth in IIS 7 and enable Windows auth and go to my site, of course I was asked to login. Then I type my domain account (I'm Active Directory admin) and magic happen! My Drupal site is working nice!
I have no ideas how to solve this...
How to trace or watch process of authentication under IIS identities on server?
Thanks for any help.
Comments
Use IIS Web Deploy to Migrate sites
I believe the key difference here is the built-in user account which got changed significantly between IIS6 and IIS7. Details at http://learn.iis.net/page.aspx/140/understanding-built-in-user-and-group.... You should also check if fastcgi.impersonate is set to 1 or not in the php.ini file. If you are getting access denied you can use process monitor tool to see which user got access denied. That will help narrowing down the problem.
The error does indicate that it is not because of open base directory restrictions. One more thing when you are copying things like this, I assume you are copying the MySQL database too. That is an equally important step.
Most important is that Microsoft has a tool which makes migrating websites from one version of IIS to another VERY easy. You can learn more about this tool and download it from here, http://www.iis.net/download/WebDeploy specifically this article should help, http://learn.iis.net/page.aspx/427/migrate-a-web-site-from-iis-60-to-iis-7/
hope this is helpful.
Mark Brown
Drupal 7 Error on Windows 2008 iis7
I am having problems installing Drupal 7 www.microsoft.com/web/drupal on windows 2008 iis7 - SQLExpress 2008 R2.
The two most common errors I encounter are listed below:
The problem is that these errors never happen at the same point of of the installation, sometimes I will get most of the way through the installation, I can see all the db tables been created then the error will appear. It is completely random. It is almost as though it is a timeout issue.
http://www.hof.co.nz/Downloads/Ajax-Http-Error.jpg
http://www.hof.co.nz/Downloads/FastCGI-Process-Error.jpg
Thanks for your help in advance
Drupal 7 Error on Windows 2008 iis7
Looks like this issue is not isolated and currently has not been resolved
http://forums.iis.net/p/1181446/1998127.aspx
The previous post shows the webpage error, below is the event view error:
Faulting application php-cgi.exe, version 5.3.8.0, time stamp 0x4e537f4b, faulting module MSVCR90.dll, version 9.0.21022.8, time stamp 0x47313dce, exception code 0xc0000005, fault offset 0x0003ab9e, process id 0x14e4, application start time 0x01cc83cfec5ae2f0.
Will try it
Thank you for your answer!
fastcgi.impersonate is set to 1, as for any of my PHP application under IIS. And of course I created and restored drupal mySql database first, but you know, even without database Drupal must work. Then DB is detached it should show a "Site maintenance" message with standard blue Garland theme.
I will try process monitor (nice tool btw)
Unfortunately, I can't use WebDeploy on old server, because I'm not doing migration, but recovery after RAID failure, I have files backup only.
But anyway, thanks for useful links!
Will report here the results.
It works... somehow
Guys, it works... (( unfortunately I didn't catch the moment when it started.
My steps were:
* process monitor did not show any ACCESS DENIED events in PHP or site's dir.
<section name="anonymousAuthentication" overrideModeDefault="Allow" />to "Allow"guided from here: http://technet.microsoft.com/en-us/library/cc627314.aspx
I'm sure my site wasn't working after this step!!
and somehow my Drupal start to work.
Working setting:
* AppPool in classic pipeline mode
* ASP.NET impersonalisation in Enabled (web.config also contains the line
<identity impersonate="true" />)* Anonymous Auth is Enabled (npthing for this in web.config)
* Read permissions to Site's dir granted for IUSR and IIS_IUSRS
* Read permissions to PHP dir granted for IUSR and IIS_IUSRS
* Drupal cache tables (incl. watchdog) were cleared several day ago
Magic...? Damn Windows? :)
Maybe all that would save week of someone's time in the future.
I've had the same problem for a different reason
Hey there,
Had exactly the same issue when trying to upgrade manually some drupal modules. Somehow the permissions got messed on the patched files when I executed patch.exe, and of course it only showed on a few files.
The error message was exactly the one you describe, and the solution in my case was to reset permissions for the whole directory tree (doing this only on the affected files solved the issue, but I had no way to figure out which files were updated by the patch).
Pierre Couzy
Fixed - Warning: require_once(./includes/bootstrap.inc)...
I had the same problem as mentioned above using IIS 7 with FastCGI. I "fixed" this by moving my Drupal site to the wwwroot folder (C:\inetpub\wwwroot\Drupal01). Not sure what the real fix is but putting the site anywhere else made the ./ includes fail. Apparently its something with IIS 7 and PHP and not Drupal.
Error message before moving the site:
Warning: require_once(./includes/bootstrap.inc) [function.require-once]: failed to open stream: No such file or directory in C:\Users...\Documents\PHP Sites\Drupal01\index.php on line 15
Fatal error: require_once() [function.require]: Failed opening required './includes/bootstrap.inc' (include_path='.;C:\php5\pear') in C:\Users...\Documents\PHP Sites\Drupal01\index.php on line 15
IIS Virtual Directories
IIS has this concept called virtual directores where you can have a site look like you've moved it under the wwwroot folder but its still in your file system away from wwwroot. This is a way to create simple internal web sites and refer to them using for example myserver.local/drupal-site-1 and myserver.local/drupal-site-2 without have them physicaly reside under the wwwroot directory; drupal-site-1 and drupal-site-2 could for example be on separate drives. The advantage is you don't have to fiddle with dns but you can still have separately located entities for ease of maintenance etc. Hope this helps.