[Solved] Sub directory install - need help editing .htaccess

Hi there, I just installed and getting the following error:

A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: /home/sndesign/public_html/invoice/third_party/MX/Loader.php
Line Number: 99

I figured it’s due to sub-directly install. I’m trying to configure the .htaccess file and found some good threads on here that gave me the answers however it doesn’t seem to work. Here’s what I have on my .htaccess file that is located within the sub directory:

# Remove index.php
RewriteEngine on
RewriteBase /invoice
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

Appreciate any help on this :smile:

No. It’s a database connection error. If it would be a due to the subdirectory, you would get a 500 or 404 error. (your htaccess is correct).

Were the tables created in the database?
Is there a folder in /application/config/ named development (or similar)?

Hi there, Thanks for the prompt response. To answer your question I did not create any database as I hadn’t seen any instructions to do so (although I was ready with my cPanel open to do so :smile:

And under my application/config/… I only see files no folder at all.

Should I be changing permissions for any folders? Is it a writing permission issue or is it due to database setup that I may have missed.

No problem :wink:

It’s the database setup - IP needs a database to store things :slight_smile: so set one up and you should be good to go, just re-run the setup.

The setup tells you where writing permission are needed.

Sorry I should have mentioned I couldn’t even go through setup yet. I got this error when I tried. I have created the DB now but not sure where to input :slight_smile: *hopeless case I am lol

Ok nevermind! Now I have access to setup… weird :smile: will follow through and see how it goes. Thanks again for all your help!

Worked beautifully! I still do not know why I couldn’t see the setup pages earlier but glad it’s sorted :smile:

Strange, but cool that it works now :slight_smile: