FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

Clean installation, links don't seem to work

Feed 16 posts, 5 voices

Avatar
4 posts

Windows XP SP3
Apache 2.2.11
PHP 5.2.8 (PDO enabled)
MySQL 5.1.31
FrogCMS 0.95 rc1

A clean install. All tables created. Able to login as admin. All looks good. However, clicking on the “About Us” tab just redisplays the front page. Same with the “Articles” tab. I know that this is just a default example install… but it still seems vaguely non-responsive. For instance, clicking on “My first article” or “My second article” seems like it should display just that article and possibly an option to display a comment.

When I set USE_MOD_REWRITE to “true” I get

Not Found The requested URL /frog/articles/2009/03/03/my_second_article.html was not found on this server.

I have played with the .htaccess file and the config.php file and read the Apache documentation on mod_rewrite and am (relatively) confident that I have set this up correctly. I then deleted the entire frog installation, dropped and recreated the database, and reinstalled. Same problems.

I have browsed the forums looking for clues but, while I have found interesting reading and some seemingly related issues, I have not found a satisfying answer.

I would love to know what I am doing wrong… or if I have just totally misunderestimated what should be happening. Any comments or direction gratefully received.

 
Avatar
486 posts

make sure you set a proper rewrite base in the .htaccess fiel

 
Avatar
4 posts

Thanks for that Rick. I believe I have done this.

Both

RewriteBase /frog/

and

RewriteBase /

produce the same results.

I have frog set up in Apache as

Alias /frog "C:/www/frog"
<Directory "C:/www/frog">
   Options Indexes
   AllowOverride None
   Order allow,deny
   Allow from all
</Directory> 

This is almost two problems:
1. The links don’t do what I think they should, regardless of USE_MOD_REWRITE
2. USE_MOD_REWRITE doesn’t seem to work for me

 
Avatar
1493 posts

Is this on a live server where we can see it? or is it on localhost? I know that one or two people have had issues with WAMP or XAMPP

Update – ah, Win XP/SP3, so localhost, then. Which “AMP”-stack tool are you using?

 
Avatar
8 posts

same problem:
http://trzy-siodemki.pl/?about_us.html

 
Avatar
8 posts

same problem in other server (other hosting firm): http://new.barg.pl/?about_us.html

 
Avatar
8 posts

it work’s with: http://new.barg.pl/?QS=about_us.html why?

 
Avatar
1493 posts

@webp_jakub – why is phpinfo() coming up all the time?

Meanwhile, you could try using an old form of .htaccess and see what difference it makes:

Options +FollowSymLinks
AddDefaultCharset UTF-8

<IfModule mod_rewrite.c>
  RewriteEngine On
# set directory in next line to your Frog root - if not in subdir, just /
  RewriteBase /yourbasefrogdir/

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  # Administration URL rewriting.
  RewriteRule ^admin(.*)$ admin/index.php?$1 [L,QSA]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  # Main URL rewriting.
  RewriteRule ^(.*)$ index.php?$1 [L,QSA]

</IfModule>

and let us know what happens.

 
Avatar
8 posts

phpinfo is in main page. and if you click on enu you are not redirectet to another page. it’s same – main page. i’m testing htaccess now

 
Avatar
8 posts

now it work;s – without changing htaccess – just my hosting admin makes something. now i’m waiting for info what was that. i’ll post it here.

 
Avatar
8 posts

in 9.5RC1 in htaacces:

is in default: RewriteBase /frog/

just change it to RewriteBase /

 
Avatar
651 posts

in 9.5RC1 in htaacces:

is in default: RewriteBase /frog/

just change it to RewriteBase /

The RewriteBase wasn’t changed in Frog 0.9.5 RC1. It has always been /frog/ by default.

 
Avatar
4 posts

Hi David,

> Which “AMP”-stack tool are you using?

All separates. Pretty much a default install of each. Developing several simple web apps and everything seems to work just fine. Threw PixieCMS on and it just worked sweet. Am I maybe missing some Apache module?

webp_jakub is right. With USE_MOD_REWRITE=false

http://localhost/frog/?articles.html

does not work.
If I manually add a “QS=” to the URL string then it works as expected.

http://localhost/frog/?QS=articles.html

Still two questions:
1. Why isn’t the “QS=” being added by frog?
2. Why does USE_MOD_REWRITE not work

If I get a chance later I will have another look at the code. It is early morning in NZ and I have a small daughter to attend to…

 
Avatar
651 posts

If it worked when you added QS= to the string, that means you have used an outdated SVN version. Grab the latest from SVN or this snapshot

As for the rest:

If you set USE_MOD_REWRITE to true: in .htaccess you should set RewriteEngine to On and set RewriteBase to the appropriate value.

If you set USE_MOD_REWRITE to false: in .htaccess you should set RewriteEngine to Off or rename .htaccess to _.htaccess (or at least something else than .htaccess)

It sounds like you have activated the .htaccess (with the default “RewriteEngine On”) but set USE_MOD_REWRITE to false or something similar. That is an invalid configuration.

Please verify the settings for USE_MOD_REWRITE and .htaccess.

 
Avatar
4 posts

Thanks Martijn, I downloaded the r367 snapshot and (for Q1) it worked perfectly…. but still can’t get (Q2) USE_MOD_REWRITE to work.

I understand exactly what you are saying about invalid configuration and have checked and rechecked. It is very easy for me to change.

1. Config.php: change ‘USE_MOD_REWRITE’, false to ‘USE_MOD_REWRITE’, true
2. Rename _.htaccess to .htaccess

http://localhost/frog/about_us.html
Not Found
The requested URL /frog/about_us.html was not found on this server.

1. Rename .htaccess to _.htaccess
2. Config.php: change ‘USE_MOD_REWRITE’, true to ‘USE_MOD_REWRITE’, false

http://localhost/frog/?about_us.html

Works perfectly.

I have tried several values for RewriteBase, including:

  • /frog/
  • /

and several I’d rather not mention… (getting desperate)…. but nothing works. I’d just like to stress again that this is a clean installation with no fiddling.

If I look in phpinfo(), under apache2handler I see

Loaded Modules core mod_win32 mpm_winnt http_core mod_so mod_actions mod_alias mod_asis mod_auth_basic mod_authn_default mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_include mod_isapi mod_log_config mod_mime mod_negotiation mod_rewrite mod_setenvif mod_php5

Any other ideas?

 
Avatar
651 posts

Hmmm… its a bit late at night here so I’m probably not thinking straight anymore. The only other thing I can think of is that your HTTP server’s configuration does not have:

AllowOverride Options FileInfo

in it… that would effectively prevent mod_rewrite usage.

For reference sake, my configuration:

config.php

define('USE_MOD_REWRITE', true);

.htaccess

  RewriteEngine On
  RewriteBase /frog/

apache config file (usually within a VirtualHost)

AllowOverride Options FileInfo

That should be about it.

 
Avatar
4 posts

Thank-you Martijn. That is EXACTLY what the problem was. Changed this (within the virtual host configuration), restarted, and everything is now 100%.

Hopefully this thread will be of help to others that follow, especially to those like me who lack guru skills.

I really appreciate the effort that is being put into Frog. The vitality and responsiveness of this forum is a credit to you all.

Alias /frog "C:/www/frog_r367"
<Directory "C:/www/frog_r367">
    Options Indexes
    AllowOverride Options FileInfo
    Order allow,deny
    Allow from all
</Directory>