Forums / Basic Configuration / Admin Returns 505 After Install: .htaccess: Regex could not be compiled

Admin Returns 505 After Install: .htaccess: Regex could not be compiled

Views: 1,698

Results 1 to 8 of 8
15 Mar 2015, 6:48 AM
#1
wwwd avatar

wwwd

Inactive

Join Date:
Nov 2012
Posts:
100
Plugin Contributions:
0

Admin Returns 505 After Install: .htaccess: Regex could not be compiled

I have been running ZC for a long time and this install/upgrade has me stumped.

The catalog opens after install just fine. The Admin returned initiall "cannot connect to DB" I edited the config.php file and it now returns a 505

I am seeing an error of:

[Sun Mar 15 02:13:53 2015] [alert] [client 67.41.123.118]
/big/dom/xwhatwouldwaltdo/www/Secure_Server/WWWDTester/[My site's admin]/.htaccess:
Regex could not be compiled

Is this sufficient to produce the 505? or do I have multiple gremlins?

So far, I have downloaded four different copies of the install packet (I've gotten bad ones before that produced a similar experience). I have deleted and installed almost a dozen times, still no joy.

15 Mar 2015, 10:04 AM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Admin Returns 505 After Install: .htaccess: Regex could not be compiled

WWWD:

I have been running ZC for a long time and this install/upgrade has me stumped.

The catalog opens after install just fine. The Admin returned initiall "cannot connect to DB" I edited the config.php file and it now returns a 505

I am seeing an error of:

Is this sufficient to produce the 505? or do I have multiple gremlins?

You have multiple problems.

  1. The 'Cannot connect to DB' generally means that you have invalid DB credentials in one (or both) of the configure.php files.
    Since you aren't getting this problem with the catalog you can safely assume that the the error only exists in the /admin/includes/configure.php file.

  2. The 505 error means that you've introduced a different problem as a result of your edit.

  3. The *[My site's admin]/.htaccess: *Regex could not be compiled error means that you (or someone) has edited this .htaccess file and introduced yet another error.
    This particular .htaccess file should rarely ever have a reason to be modified.

Error#3 could easily be the cause of error#1, so the 1st thing I suggest is that you restore this file with a ZenCart original.

The next step would be to undo the changes you made to the admin/configure.php file that is causing the 505 error.

If you are lucky, that should get things working again, but if you still end up with error#1 you should compare the DB settings in this file with the DB settings in the /includes/configure.php file.

I'm assuming that when you stated the 'config.php' file, you actually meant the 'configure.php' file.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

15 Mar 2015, 6:10 PM
#3
wwwd avatar

wwwd

Inactive

Join Date:
Nov 2012
Posts:
100
Plugin Contributions:
0

Re: Admin Returns 505 After Install: .htaccess: Regex could not be compiled

Rodg,

Thank you for answering back. Your points in turn:

  1. Granted, if the catalog works, I'm halfway home. Fortunately, this time while I'm upgrading my current cart is still running, so I have an unusual luxury.

  2. These last couple of times, I have not had to edit the configuration files at all. So, it is, again stock.

  3. I have not edited the .htaccess file at all, it's stock.

At this point, I am downloading another clean install packet and transferring it through a different FTP program in case something is getting corrupted in transmission.

I am running out of ideas and appreciate a fresh mind, thank you so very much.

Tom

15 Mar 2015, 9:50 PM
#4
wwwd avatar

wwwd

Inactive

Join Date:
Nov 2012
Posts:
100
Plugin Contributions:
0

Re: Admin Returns 505 After Install: .htaccess: Regex could not be compiled

Okay, I have done another clean install, fresh directory, fresh database.

Still getting the same error. I'm not seeing any differences between the catalog and the admin files but catalog works and admin doesn't.

Tom

15 Mar 2015, 11:22 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Admin Returns 505 After Install: .htaccess: Regex could not be compiled

WWWD:

Okay, I have done another clean install, fresh directory, fresh database.

Still getting the same error. I'm not seeing any differences between the catalog and the admin files but catalog works and admin doesn't.

Tom

Really need much more info. Please answer the questions that are listed above the text area when making a post.

What php version are you using? (Check using the site that is functional through the admin panel and selecting version in the upper right hand corner.)

When you said earlier that basically everything is/was the same, .htaccess, etc... There is no .htaccess needed at the root of the store for ZC to work ootb, so which .htaccess are you referring, and what are potentially the contents? (Don't post admin directory or login credentials).

To help we need details, doesn't work, doesn't look right, etc... Do not give any identifying information... Please help us help you.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

16 Mar 2015, 2:46 AM
#6
wwwd avatar

wwwd

Inactive

Join Date:
Nov 2012
Posts:
100
Plugin Contributions:
0

Re: Admin Returns 505 After Install: .htaccess: Regex could not be compiled

Okay, through process of elimination, it is the .htacess file that was causing everything to bomb. When I renamed the files in the /includes directory, the clouds parted and the birds sang.

I am concerned that this will create a security "issue." Am I being over cautious?

Tom

16 Mar 2015, 3:57 AM
#7
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Admin Returns 505 After Install: .htaccess: Regex could not be compiled

What is your hosting environment (HTTPd server, PHP version, etc)? Is this site hosted on a third party server? Are you trying to test with a self installed / configured server? Is this a local development environment?

Is your HTTPd server configured to allow the problematic directive in a .htaccess file? I'd need to see the contents of the .htaccess file causing issues to give an exact answer... But if the directive causing the issue is "Files" or "FilesMatch", you will need probably want to configure the server (or VirtualHost) to "AllowOverride All".

Was Apache compiled with PCRE support (--with-pcre)? Are you using a different HTTPd server? The error message you posted is common when PCRE support is missing.

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

16 Mar 2015, 5:10 PM
#8
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Admin Returns 505 After Install: .htaccess: Regex could not be compiled

WWWD:

Okay, through process of elimination, it is the .htacess file that was causing everything to bomb.

I would like to say "I told you so". but I can't.

WWWD:

When I renamed the files in the /includes directory, the clouds parted and the birds sang.

... and the reason why I can't say "I told you so" is because this particular .htaccess isn't the same .htaccess file shown in the log file in your original post/description of the problem.

In fact if there is a problem with the /includes/.htacess file you would be getting completely different errors than those you 1st reported.

This change of symptoms/problems is could easily be explained away as a result of your re-install though.

WWWD:

I am concerned that this will create a security "issue." Am I being over cautious?

Yes, it will cause a weakening of the zencart security. I don't think it will be a serious risk, but I do think it is worth further investigation as to why it is causing a problem, because chances are that some of the other .htaccess files will have similar 'rules' as this one, so unless you figure out the cause of the problem there may yet be other problems that you've yet to discover.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.