Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » rewritetest error

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

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

Page: 1 2
Go to End
Author Topic: 3394 Views
  • raamklaza
    Avatar
    Community Member
    182 Posts

    rewritetest error Link to this post

    Hello,

    i installed silverstripe again but i get a rewritetest error all the time.

    I deleted all the files and the db and did a fresh install but still the error.

    Can someone help me out?

    Warning: file_get_contents(http://localhost/1-Ontwikkeling/silverstripe-v2.2.2/InstallerTest/testrewrite) [function.file-get-contents]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\wampserver\www\1-Ontwikkeling\silverstripe-v2.2.2\rewritetest.php on line 47

    Fatal error: Maximum execution time of 30 seconds exceeded in C:\wampserver\www\1-Ontwikkeling\silverstripe-v2.2.2\rewritetest.php on line 47

  • grilldan
    Avatar
    Community Member
    135 Posts

    Re: rewritetest error Link to this post

    You need to increase the max execution time. I'm assuming you are running this on localhost with wampserver.

    Click the wampserver icon in your tray, go to the PHP folder, and click php.ini. Search that file for "Resource Limits" bellow there, you will have a few things you can change. Increase the max_execution_time from 30 to 300 (That should be good enough). Then restart wampserver.

  • raamklaza
    Avatar
    Community Member
    182 Posts

    Re: rewritetest error Link to this post

    Oke thnx, that worked somehow. now i get the following error:

    Warning: file_get_contents(http://localhost/1-Ontwikkeling/silverstripe-v2.2.2/InstallerTest/testrewrite) [function.file-get-contents]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\wampserver\www\1-Ontwikkeling\silverstripe-v2.2.2\rewritetest.php on line 47

    Warning: file_get_contents(http://localhost/1-Ontwikkeling/silverstripe-v2.2.2/InstallerTest/testrewrite) [function.file-get-contents]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\wampserver\www\1-Ontwikkeling\silverstripe-v2.2.2\rewritetest.php on line 47
    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.

  • grilldan
    Avatar
    Community Member
    135 Posts

    Re: rewritetest error Link to this post

    Did you allow mod_rewrite in your httpd.conf?

    wampserver icon > appache > httpd.conf

    search for "mod_rewrite" and make sure there isn't a "#" at the start of the line.

  • raamklaza
    Avatar
    Community Member
    182 Posts

    Re: rewritetest error Link to this post

    nope, no # infront of it

    LoadModule rewrite_module modules/mod_rewrite.so

  • grilldan
    Avatar
    Community Member
    135 Posts

    Re: rewritetest error Link to this post

    Whats your .htaccess file look like?

    C:\wampserver\www\1-Ontwikkeling\silverstripe-v2.2.2\.htaccess

  • raamklaza
    Avatar
    Community Member
    182 Posts

    Re: rewritetest error Link to this post

    The following:

    ### SILVERSTRIPE START ###
    RewriteEngine On
    RewriteBase /1-Ontwikkeling/silverstripe-v2.2.2

    RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$

    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* C:/wampserver/www//sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    ### SILVERSTRIPE END ###

  • grilldan
    Avatar
    Community Member
    135 Posts

    Re: rewritetest error Link to this post

    Try this...

    ### SILVERSTRIPE START ###
    <IfModule mod_dir.c>
    DirectorySlash Off
    </IfModule>
    RewriteEngine On
    RewriteBase /1-Ontwikkeling/silverstripe-v2.2.2
    RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    ### SILVERSTRIPE END ###

    **also**
    go back to your httpd.conf file and search for "Options FileInfo AuthConfig Limit"
    make sure it looks like:

    AllowOverride all <-- correct

    not

    AllowOverride none <-- wrong

    3394 Views
Page: 1 2
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.