Jump to content

.htaccess issue


Achrist
 Share

Recommended Posts

I am trying to install PW on squashtest.dk but get this error: "Unable to determine if Apache mod_rewrite (required by ProcessWire) is installed. On some servers, we may not be able to detect it until your .htaccess file is place. Please click the 'check again' button at the bottom of this screen, if you haven't already."

'Check again' then produces an error 500 without further details.

I tried the different hints that have been suggested in this forum for this situation, including uncommenting RewriteBase / - no difference.

I also tried deleting everything from .htaccess except RewriteEngine On, which allows me to proceed to the next step in the installation, but with another red error stating that .htaccess does not have what pw requires.

phpinfo output is available here: squashtest.dk/php-infoXZ.php

Link to comment
Share on other sites

Have you tried leaving everything intact, and rather than clicking `check again' simply click 'continue to next step'? I get this same error on every install but just proceed anyway. The reason I think I get this error is because my server uses litespeed rather than apache and as it states:

On some servers, we may not be able to detect it until your .htaccess file is place.
  • Like 1
Link to comment
Share on other sites

Hi antknight

That wouldn't work - like I wrote that would produce an error 500.

However, I found the cause of the problem in the .htaccess file:

#Options +FollowSymLinks

Once I commented out this directive, the problem disappeared.

I found the solution here: http://www.wallpaper...pache-t718.html

And a general explanation of the directive here:

http://www.webmaster...orum11/1962.htm

I hope this helps others with the same problem.

/Allan

  • Like 8
Link to comment
Share on other sites

I have set up a Webmin/Virtualmin box and having exactly the same issue.

Just as a note for anyone else in the future.

Having said that, although it solves the problem, it still says that it cannot detect the server (or something like that).

I did read somewhere that perhaps it should be SymLinksIfOwnerMatch - anyone have any thoughts? This is an area I know nuffin about!

I found my life was a lot happier if I commented out the line while it was still htaccess.txt, by the way - sort of felt smoother ... :)

Link to comment
Share on other sites

  • 1 month later...

Hi, I had a similar issue with one.com. Support suggested to comment out the following within the .htaccess file:

#Options -Indexes

#Options +FollowSymLinks
 
Also:
 
#<IfModule mod_php5.c>
  #php_flag magic_quotes_gpc        off
  #php_flag magic_quotes_sybase        off
  #php_flag register_globals        off
#</IfModule>
 

That worked for me but I am concerned it may cause issues down the road!

Big thanks for all the hard work you guys have put into processwire. I've spent a day running through the tuts and It already feels like a great piece of kit, plus real friendly community.

  • Like 3
Link to comment
Share on other sites

That should be fine Mark as you can set the PHP ones in your PHP.ini, but -indexes is there for security really so it doesn't list files in folders ny default if you type in a directory name so I'd question the security of a host that doesn't let you do that to be honest... assuming I got all that right ;)

The main thing is you're up and running and the fun starts NOW!

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Hi, I had a similar issue with one.com. Support suggested to comment out the following within the .htaccess file:

#Options -Indexes

#Options +FollowSymLinks

I got Internal Server Error when i tried to install PW. That trick worked, thanks! I have Ubuntu server with Virtualmin.

  • Like 1
Link to comment
Share on other sites

  • 3 months later...
Hello,

I'm still a beginner when it comes to ProcessWire. At the beginning I also had this problem. Yesterday I installed on a server PW (checkdomain.de) (PHP 5.4.16). I had to install only the small problem with "Options + FollowSymLinks" I had to comment out in the htaccess. The PHP version I have on 5.4. updated.

If I logging me in the admin area and would like to edit a page, I get the store a "Internal Server Error"

Does anyone have an idea what it could be?

Link to comment
Share on other sites

What version of ProcessWire? Check your /site/assets/logs/errors.txt and/or edit your /site/config.php and enable debug mode by setting the $config->debug=false; line to true. One of these should reveal the error, unless the internal server error is coming from Apache rather than PW. 

Link to comment
Share on other sites

Hi there,

I got the same error, ProcessWire 2.3, there is no logs folder in my assets folder.. i also changed the debug mode to true, but no results.. 

Also tried the commenting as mentioned above in my .htaccess but still no luck :(

Any ideas?

Thanks in advance.

Link to comment
Share on other sites

Did you get any errors during installation? The 500 error you are getting there indicates Apache is most likely upset with something in the .htaccess file.  But to double check, rename your .htaccess file to htaccess.txt (temporarily) to see if the 500 error goes away (I'm guessing it will).

If it does, rename it back to .htaccess and then start commenting stuff out in the .htaccess file till you can determine what it is, starting at the top and working your way down. Focus on the parts that aren't surrounded by <SomeBlock>...</SomeBlock> sections first. Please let us know what you find. Chances are your web host has disabled some feature typically allowed in an .htaccess, and we just have to determine what it is and find an alternate. 

If it does not, please PM me a link to a PHP file on your server with <?php phpinfo(); in it. 

Link to comment
Share on other sites

  • 3 weeks later...

Sounds like your webhost is preventing you from using htaccess Options. The most important one from a security aspect is the "-Indexes" option. You really don't want to allow indexes, as that means anyone can browse a directory on your server just by typing in the URL. Hopefully they've got this disabled already, but I would be a little uncomfortable with the webhost not letting me specify these options. 

Link to comment
Share on other sites

  • 5 months later...

Here are two more for the record. I Installed pw on a free hoster and suffered from 500 Internal Server Error.

After going through the .htaccess of pw I found that after commenting the following two lines everything works fine.

  # DirectoryIndex index.php index.html index.htm
  # SetEnv HTTP_MOD_REWRITE On
 

I guess every hoster has it settings that you have to adapt to in .htaccess.

Is going through the .htaccess file the only way to solve these issues or what about

some script, other than phpinfo, that can check these hosting settings/restrictions ?

Link to comment
Share on other sites

  • 2 weeks later...

That's a good question and I'm not positive about the answer yet. This is the second time I've see SetEnv not liked by a webhost, so I think we need to at least have a note about it mentioned in the .htaccess file as a possible thing to comment out when a 500 error occurs. The SetEnv here really is only to pass along a message to the installer, and not crucial at all. I've not seen an issue with DirectoryIndex before though, so will keep an eye out to see if that one shows up at any other hosts, in which case we should document that issue too. 

Link to comment
Share on other sites

  • 1 year later...

I had the same issue with a new server and I had to comment the following:

# Options -Indexes

# Options +FollowSymLinks
# Options +SymLinksifOwnerMatch
 
AND:
 
# <IfModule mod_php5.c>
#  php_flag magic_quotes_gpc   off
#  php_flag magic_quotes_sybase    off
#  php_flag register_globals   off
# </IfModule>
 
Works fine now.
  • Like 1
Link to comment
Share on other sites

  • 4 years later...
On 1/16/2015 at 11:09 AM, lenoir said:

Thanks a lot!! I uploaded my processwire to Aruba server and I had the same issue. I solved it uploading the .htaccess file  in the folder during install process file BUT comment the following:

# Options -Indexes

# Options +FollowSymLinks
# Options +SymLinksifOwnerMatch
 
AND:
 
# <IfModule mod_php5.c>
#  php_flag magic_quotes_gpc   off
#  php_flag magic_quotes_sybase    off
#  php_flag register_globals   off
# </IfModule>
 
Works fine now.
 
thanks.

 

Link to comment
Share on other sites

  • 10 months later...

I'm having same issue on Aruba servers (Italy) in the installation process,

I commented out this lines:

 

  # Note that some web hosts don't support this. If you get a (500) error, try commenting out this 
  # SetEnv line below. 

  <IfModule mod_env.c>
    SetEnv HTTP_MOD_REWRITE On
   </IfModule>

 

Now It works

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...