IIS 7 Install fails

Asked by mfpacheco on 2011-04-29

Just like Question 150068, I can't get TSEP install past the initial config start stage. Whether I use One Click or Manual install, I get a 404 after the initial language selection screen.

I'm using Win 2008, IIS7 with PHP 5.3.6 installed - and yes it does work, I have another PHP based site on this server working fine as well as phpinfo pulls correctly.

I noticed the bug report said that this was an issue with mod_rewrite ... unfortunately thats an apache module .. so I'm not sure if this will work for IIS7.

I've has tsep.0942 working in the past on an IIS6 box after a few tweaks, but have yet to get it to work on IIS 7 - tried tsep.0943_R2 - and it just tells be "Bad PHP version" and won't go any further.

I've tried 0942, 0943_R2 and 096

The zip archive works fine - I can see Update.zip pulled down and unarchived etc .. just start the "install" URL phase - I get a 404

Would love to get tsep working again .. but I need to stay on IIS 7 for other reasons.

Regards,

Mike

Question information

Language:
English Edit question
Status:
Answered
For:
The Search Engine Project Edit question
Assignee:
xaav Edit question
Last query:
2011-05-10
Last reply:
2011-05-10
xaav (xaav) said : #1

Are you able to edit PHP files? If so, please try the solution below:

download oneclick, run the file, wait until it redirects, then the 404 error, then

in app/config/core.php uncomment line 93:

 //Configure::write('App.baseUrl', env('SCRIPT_NAME'));

then, delete the file called settings.php

Then reload the 404 page, and post what happens back.

Sorry about the compatibility issues, they should be fixed in 2.0.

mfpacheco (pachecom) said : #2

Geoff,

Thanks for the reply.

Followed your direction and got nothing sorry.

Cleaned off the install folder, ran oneClick, saw Update.zip come down and expand - I have folder for app,cake,plugins and vendors.

Got the 404, edited core.php, saved edit, relaoded browser and still got another 404 - its settling on a "setup" folder in the url - I don't see that folder on the server, if your rewriting that would be OK - just wanted to meantion it. You said to delete the settings.php file - I can not see a settings.php file anywhere .. did a recursive folder search and got nothing with that name. I reloaded the 404 page and got another 404 ..

As far as the server goes - I have full access, I'm the server admin, and the folder in webroot that tsep is being asked to install to has permissions set to the equivilant of 777 - "Everyone = Full Control"

Hope that helps .. Mike

xaav (xaav) said : #3

Great! Sorry, forgot to add one extra detail:

Instead of visiting http://yourserver.com/tsep/setup, visit http://yourserver.com/tsep/index.php/setup.

Also, you will want to disallow access to the /app and /cake directories.

The following is irrelevant, but can be interesting if you are a curious sysadmin:

The way it normally works is that this is done behind the scenes in the .htaccess file. (This explains why the folder does not exist in the directory structure)

Anotherwards, if you were on apache:

http://yourserver.com/tsep/?q=hello+2 --> http://yourserver.com/tsep/index.php/?q=hello+2

The settings.php file should be created when you install the application, it contains the local settings for your specific installation.

mfpacheco (pachecom) said : #4

Geoff,

Thanks for the reply,

Well at least its getting a little farther now - I get all the way through to the "Performing Installation" screen and it just sits there ..

The MySQL DB is local - I connected to it, dropped the tsep DB, created a blank one and reran the install, got all the way up to the Performing install again, but I don't see tables being populated in the DB - the credentials I'm giving have full rights except drop .. so I know the user is OK - tested the user myself and was able to create a table.

Are there any log files for this install at all?

Thanks,

Mike

xaav (xaav) said : #5

Logs are located in app/tmp/logs/. There may be several different files, error.log is the one you want.

mfpacheco (pachecom) said : #6

OK - This is where it gets interesting ..

2011-05-04 14:48:06 Warning: Warning (512): D:\wwwroot\docsite\search\app\tmp\cache\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:06 Warning: Warning (512): \persistent\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:06 Warning: Warning (512): \models\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:14 Warning: Warning (512): D:\wwwroot\docsite\search\app\tmp\cache\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:14 Warning: Warning (512): \persistent\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:14 Warning: Warning (512): \models\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:14 Warning: Warning (512): D:\wwwroot\docsite\search\app\tmp\cache\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:14 Warning: Warning (512): \persistent\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:14 Warning: Warning (512): \models\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:45 Warning: Warning (512): D:\wwwroot\docsite\search\app\tmp\cache\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:45 Warning: Warning (512): \persistent\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:45 Warning: Warning (512): \models\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:46 Warning: Warning (512): D:\wwwroot\docsite\search\app\tmp\cache\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:46 Warning: Warning (512): \persistent\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:46 Warning: Warning (512): \models\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:57 Warning: Warning (512): D:\wwwroot\docsite\search\app\tmp\cache\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:57 Warning: Warning (512): \persistent\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:57 Warning: Warning (512): \models\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:57 Warning: Warning (512): D:\wwwroot\docsite\search\app\tmp\cache\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:57 Warning: Warning (512): \persistent\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]
2011-05-04 14:48:57 Warning: Warning (512): \models\ is not writable in [D:\wwwroot\docsite\search\cake\libs\cache\file.php, line 267]

Yet the file based permissions are wide open from the \search folder up .....

I can see a session file being created in Windows\temp .. so I know it is following the environment variables for location as well as the file permissions...

And no table entries in the DB yet - so I'm guessing after reading the code the install process has not even gotten that far yet ..

I'll play with permissions for a little while more - but "everyone = Full Control is as open as you can get ...

Let me nkow what you think.

BTW - Thanks for the support as well :)

Mike

xaav (xaav) said : #7

Hmm...

Ironically, this is the problem that happened to the other person. Seems PHP has problems detecting if something is_writable() on windows... Oh well.

Open cake/libs/cache/file.php

Find the function __active() :

 function __active() {
  if ($this->_init && !is_writable($this->settings['path'])) {

   mkdir($this->settings['path']);

   if(!is_writable($this->settings['path'])) {

    $this->_init = false;
    trigger_error(sprintf(__('%s is not writable', true), $this->settings['path']), E_USER_WARNING);
    return false;
   }
  }
  return true;
 }

Replace the entire thing with

 function __active() {
  return true;
 }

What this is doing is fooling CakePHP into thinking that those directories are writable, even if PHP says that are not.

mfpacheco (pachecom) said : #8

Geoff,

Again, thanks for the reply and help but I'm still getting no where ..

Was just about ready to give up on this and wait for release 2 when I did notice this one entry in the site log files .. not sure if it will help or not - I've run out of ideas.

2011-05-09 20:07:11 10.112.6.40 GET /search/app/webroot/install/css/install.css - 80 SOUTHCOAST\pachecom 10.113.1.5 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+2.0.50727;+InfoPath.1;+.NET+CLR+1.1.4322;+.NET+CLR+3.0.04506.30;+MS-RTC+EA+2;+.NET+CLR+3.0.04506.648;+MS-RTC+LM+8) 404 0 64 2
2011-05-09 20:07:11 10.112.6.40 GET /search/app/webroot/img/ajax-loader.gif - 80 - 10.113.1.5 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+2.0.50727;+InfoPath.1;+.NET+CLR+1.1.4322;+.NET+CLR+3.0.04506.30;+MS-RTC+EA+2;+.NET+CLR+3.0.04506.648;+MS-RTC+LM+8) 401 2 5 2
2011-05-09 20:07:11 10.112.6.40 GET /search/app/webroot/install/js/install.js - 80 - 10.113.1.5 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+2.0.50727;+InfoPath.1;+.NET+CLR+1.1.4322;+.NET+CLR+3.0.04506.30;+MS-RTC+EA+2;+.NET+CLR+3.0.04506.648;+MS-RTC+LM+8) 401 2 5 1
2011-05-09 20:07:11 10.112.6.40 GET /search/app/webroot/install/js/install.js - 80 SOUTHCOAST\pachecom 10.113.1.5 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+2.0.50727;+InfoPath.1;+.NET+CLR+1.1.4322;+.NET+CLR+3.0.04506.30;+MS-RTC+EA+2;+.NET+CLR+3.0.04506.648;+MS-RTC+LM+8) 404 0 64 6
2011-05-09 20:07:11 10.112.6.40 GET /search/app/webroot/img/ajax-loader.gif - 80 SOUTHCOAST\pachecom 10.113.1.5 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+2.0.50727;+InfoPath.1;+.NET+CLR+1.1.4322;+.NET+CLR+3.0.04506.30;+MS-RTC+EA+2;+.NET+CLR+3.0.04506.648;+MS-RTC+LM+8) 304 0 0 172

Notice the 404 in the logs for install.js --- I see no install.js in the absolute folder path listed ...

Nor do I see an install.css in that path as well (the other 404 seen) .. not sure if these are dynamically generated files or not ...

Thanks.

Mike

xaav (xaav) said : #9

Thanks for this very helpful information.

I'm looking into this right now.

xaav (xaav) said : #10

Okay, try this:

Use Microsoft's Web Platform Installer to install the URL Rewrite Module 2.0. Then, download this file: http://launchpad.net/tsep/1.x/1.1/+download/install.php to your search directory and try again.

By the way, that information above was helpful. What was happening is that the 'install.js' file was not being loaded, therefore causing the installation not to take place.

mfpacheco (pachecom) said : #11

A little frustrated here .. not you - you've been great as far as helping, it just does not seem as if tsep is going to run on IIS 7 - at least in this rev ...

OK - I can see the rewrite in action as the web.config file is created ... - btw - all I was missing was msxml6.0 - already had the URL rewite engine installed.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
   <rule name="Redirect static resources" stopProcessing="true">
   <match url="^(ico|img|css|files|js)(.*)$" />
   <action type="Rewrite" url="app/webroot/{R:1}{R:2}" appendQueryString="false" />
            </rule>
            <rule name="Imported Rule 1" stopProcessing="true">
            <match url="^(.*)$" ignoreCase="false" />
            <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 2" stopProcessing="true">
              <match url="^$" ignoreCase="false" />
              <action type="Rewrite" url="/" />
            </rule>
            <rule name="Imported Rule 3" stopProcessing="true">
              <match url="(.*)" ignoreCase="false" />
              <action type="Rewrite" url="/{R:1}" />
            </rule>
            <rule name="Imported Rule 4" stopProcessing="true">
              <match url="^(.*)$" ignoreCase="false" />
              <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
              </conditions>
              <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
            </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

But now I get a 404 on anything in that folder - if I go to the root of the folder I get redirected to the root of the site.

Deleted the web.config file to see what would happen, got the 1.1 populated config page - only with the "search" link enabled - but that just produces a "no idices" error - and I can see that no tables have been created in the db yet ...

I'll keep pouinding on this if need be, just not sure if we are fighting something that can't be fixed in this revision.

Thanks for the help.

Mike

xaav (xaav) said : #12

I'm really sorry about all this trouble, and I can't think of much else to try. The 1.x series was made with CakePHP (http://cakephp.org/), which appears to be taylored toward LAMP environments. As I'm not part of this project, there is really not much I can do here.

The 2.x release series will not have this problem, because it will be made with Symfony2. However it is going to be quite some time before 2.x is out; as I will be looking at phpBB4 as a model for the basic application structure.

Again, I'm really sorry about this, and I wish there was some way to make this work.

Can you help with this problem?

Provide an answer of your own, or ask mfpacheco for more information if necessary.

To post a message you must log in.