Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Still unable to install

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 3316 Views
  • wifiman
    Avatar
    Community Member
    20 Posts

    Still unable to install Link to this post

    With great thanks to Hamish, I've been able to get past a class name conflict that occurs in my hosting provider's PHP distribution (I use Omnis.com). But I am still unable to get SilverStripe installed.

    I've been able to verify with Omnis.com that there should be *nothing* that I need to do to enable mod_rewrite or AllowOverride. I apologize for asking again, but could someone suggest what I need to do to get past this latest challenge regarding the install? Here's what I see during the install now:

    [Disclaimer: I have substituted "mysitepath" and "mysiteurl" in place of the actual values. Omnis.com virtualizes all of its accounts onto a single filesystem (hence the reason for "mysitepath"); as far as I am concerned, though, everything in www is my website's "root" directory (which would appear at the root of "mysiteurl.com"). Perhaps the Silverstripe rewrite rules are making some assumption about the path structure that breaks with Omnis' configuration?]

    # Creating '.htaccess' file...
    # Creating /mysitepath/www/silverstripe/.htaccess
    # Building database schema...
    # Checking mod_rewrite works
    # http://mysite.com/silverstripe/InstallerTest/testrewrite Rewrite is DirectorySlash Off RewriteEngine On RewriteBase /silverstripe RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ RewriteCond %{REQUEST_URI} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* /mysitepath/www/sapphire/main.php?url=%1&%{QUERY_STRING} [L] Creating /mysitepath/www/silverstripe/.htaccess http://mysiteurl.com/silverstripe/InstallerTest/testrewrite
    # ERROR: mod_rewrite not working, redirecting to mod_rewrite test page
    # Creating /mysitepath/www/silverstripe/.htaccess I will now try and direct you to rewritetest to troubleshoot mod_rewrite

    Then the page reloads and I see:

    mod_rewrite doesn't appear to be working. Make sure:

    * mod_rewrite is enabled in your httpd.conf
    * AllowOverride is enabled for the current path.

    Please check these options, then refresh this page.If you believe that your configuration is correct, click here to proceed anyway.

    If I go ahead and proceed anyway, I get the new error:

    Fatal error: Call to undefined method HttpResponse::isFinished() in /mysitepath/www/silverstripe/sapphire/core/control/Controller.php on line 130

    Would really appreciate any other suggestions -- it seems like this has happened to others but I am really unclear on how to fix it since the postings talk about .htaccess settings. I am pretty certain that my .htaccess is being created properly and it's being used. I'd love to get past this issue before the weekend is out so I can start building my site (finally). Let me know if I can provide more info.

  • Circlefusion
    Avatar
    Community Member
    3 Posts

    Re: Still unable to install Link to this post

    I believe that's a common error (the modrewrite testpage error). I had to clear my browser cache (Firefox) at that step and it worked after that.

  • wifiman
    Avatar
    Community Member
    20 Posts

    Re: Still unable to install Link to this post

    Thanks for the suggestion, but I've tried clearing the cache in two different browsers on two different machines with no luck whatsoever. I've got to believe that there's something different with how Omnis.com has set up the directory structures for its customers such that the installer for SilverStripe has a pretty basic error.

    Other ideas?

  • ajshort
    Avatar
    Community Member
    244 Posts

    Re: Still unable to install Link to this post

    Hi WifiMan,

    From your error message, Im guessing that your host has a PHP extension installed that provides its own HTTPResponse class - which is conflicting with the inbuild SilverStripe one. Searching the PHP docs, it seems that the HTTP extension has such a class - http://au.php.net/manual/en/class.httpresponse.php

    Could you ask your host if they have this extension installed?

  • wifiman
    Avatar
    Community Member
    20 Posts

    Re: Still unable to install Link to this post

    OK, looks like you are right, I took a look at phpinfo() and it shows that there is a registered class of HttpResponse as part of Http 1.5.2 in my distribution. I can't have Omnis.com turn that off; it's a global for all of their customers.

    Hamish helped me fix a similar problem with the Query class. This time (on my own), I did a search within the SilverStripe directory on my local machine and found four files that appear to have HTTPResponse references of any kind. These files (and the affected lines) are:

    ./sapphire/core/control/ContentNegotiator.php:

    L32    static function process(HTTPResponse $response) {

    L75      function xhtml(HTTPResponse $response) {

    L93      function html(HTTPResponse $response) {

    ./sapphire/core/control/Controller.php:

    L113      $this->response = new HTTPResponse();

    ./sapphire/core/control/Director.php:

    L97:      $response = new HTTPResponse();

    ./sapphire/core/control/HTTPResponse.php:

    L14:      class HTTPResponse extends Object {

    So I've gone ahead and prepended "SS_" in front of each instance that I see HTTPResponse. I had hoped that this would avoid the conflict. I am not particularly skilled at OO coding, though... I must still be making a mistake. Apparently my redefinition of this class is not within scope of the Director.php file. Here's the error that I see now:

    Fatal error: Class 'SS_HTTPResponse' not found in /mysitepath/www/silverstripe/sapphire/core/control/Controller.php on line 113

    As you can see above, that's the line that I modifed to say:

    $this->response = new SS_HTTPResponse();

    What else I must do to make this redefined class name work?

  • ajshort
    Avatar
    Community Member
    244 Posts

    Re: Still unable to install Link to this post

    Hi WifiMan,

    the problem now is that the autoloader is looking for your class in a file called SS.php. To fix, you need to rename your class to SSHTTPResponse (no underscore), and then rename the file it was in from HTTPResponse.php to SSHTTPResponse.php

  • wifiman
    Avatar
    Community Member
    20 Posts

    Re: Still unable to install Link to this post

    Thanks very much -- that solved it for me! I am finally getting to play with SS on Omnis.com! I will file a bug on this one so that others won't have to figure this out on their own.

    3316 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.