Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Must Create PHP.ini file to use Friendly URLs Add-on

edited July 2006 in Vanilla 1.0 Help
When I loaded my Vanilla forum afer attempting to use the FriendlyUrls addon, the following appeared at the top of my site:

$Configuration['URL_BUILDING_METHOD'] = 'mod_rewrite';

I figured mod_rewrite was not enabled. Then I went to my hosting provider and made sure my Linux server had mod_rewrite capabilities. Of course it does, and they said I needed to create a php.ini file that would enable mod_rewrite. They said they couldn't give me any further assistance with the modification of the mod_rewrite.

Now I am stuck not knowing exactly what to code. I've tried a few websites, but it seems like a big task.

For those familiar with this sort of thing, could someone create a php.ini file for me? Or tell me where to download one to get mod_rewrite functioning properly?

Thanks in advance.


  • Options
    MarkMark Vanilla Staff
    You didn't add the code to the right place. It has to be between the <?php at the beginning of the file and the ?> at the end of the file. Otherwise it just gets rendered as plain text.
  • Options
    Thanks Mark, I just made that modification by including it between <?php and ?> and now it appears with a:

    Notice: Undefined index: REWRITE_extension.php in /home/content/j/p/m/jpmitchell7/html/library/Framework/Framework.Functions.php on line 453

    What does that mean? I'm starting to see all these error codes while playing with the software.
  • Options
    MarkMark Vanilla Staff
    That error has something to do with an extension you have installed (obviously).

    You can fix it by adding this to line 150 of your appg/settings.php file:

    $Configuration['REWRITE_extension.php'] = 'extension/';

    Normally I always tell people not to edit the appg/settings.php file, but that line is going to be added in the next release of Vanilla, anyway.
  • Options
    Your hosting company told you to create a php.ini file? Thats scary.
  • Options

    Well, at first they said they couldn't help me. But I realized I needed to enable it some way. I thought I would use a .htaccess file or something like that to do so. I'm all new to this, so I asked them about enabling mod_rewrite that way, and they said I need to use a php.ini file. I told them I didn't have one, and they said I had to create one if I wanted to modify stuff.

    That's why I decided to ask here and see what advise I got. I'm sure many of you are more knowledgeable than them.
  • Options
    The php.ini file is part of a PHP installation on the server. So if PHP is installed you (they) should most likely have a php.ini file. Its not something that hosted users would ever see/need (afaik). You should have been able to make the changes to enable mod_rewrite with an .htaccess file, or maybe your http.conf file if you have access to one. The fact that your hosting company told you to make one should make you question things. I have never heard of that anyways.
  • Options

    Good news! It worked beautifully. As a soon-to-be administrator of a forum, it kind makes me feel good to make these technical implications and see them working properly. Once again, I commend you on your fine work of the Vanilla software.

    All, I need to do next is make a thumbs up or thumbs down extension where users can vote their favorite postings to the top page.
  • Options
    No joy for me :( says: Notice: Undefined index: REWRITE_../multitrackers/ in /home/love2esc/public_html/chat/library/Framework/Framework.Functions.php on line 440 NB - I tried Mark's fix above, but it made things worse by pushing all the threads way down th I went back to the original settings in the appg/settings.php file
  • Options
    Did you put the .htaccess file in the Vanilla root directory?
  • Options
    Try changing the value for AllowOverride in your apache-config.

    AllowOverride All

    Might help!
This discussion has been closed.