Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

5.2.9 broke store with index failure

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 11-05-2015, 02:05 PM
 
cleverwise cleverwise is offline
 

Advanced Member
  
Join Date: Jun 2014
Posts: 74
 

Default 5.2.9 broke store with index failure

Hello Community,

I just performed an upgrade on a store about to go live from 5.2.6 to 5.2.9. Everything was working fine with 5.2.6 but after the upgrade to 5.2.9 the index.php just errors out.

I can go to cart.php and that works. I can go to clean urls like /shop/shipping.html and that works but index.php gives a 404. It is very odd. I even tried copying cart.php to index.php. Nope it is broken.

No errors were provided during the upgrade process.

Anyone else see this?

Thanks.

Jeremy
__________________
Respectfully,

Jeremy

X-Cart 5.3 running on:
* Web server: Nginx with PHP-FPM via FastCGI (Opcache enabled)
* Database: Percona Server
* OS: CentOS
Reply With Quote
  #2  
Old 11-06-2015, 07:13 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: 5.2.9 broke store with index failure

Quote:
Originally Posted by cleverwise
Hello Community,

I just performed an upgrade on a store about to go live from 5.2.6 to 5.2.9. Everything was working fine with 5.2.6 but after the upgrade to 5.2.9 the index.php just errors out.

I can go to cart.php and that works. I can go to clean urls like /shop/shipping.html and that works but index.php gives a 404. It is very odd. I even tried copying cart.php to index.php. Nope it is broken.

No errors were provided during the upgrade process.

Anyone else see this?

Thanks.

Jeremy
Hi.
You should add the DirectoryIndex directive to your .htaccess, it should point at cart.php.
cart.php is the customer entry point by default.
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
  #3  
Old 11-06-2015, 08:37 AM
 
cleverwise cleverwise is offline
 

Advanced Member
  
Join Date: Jun 2014
Posts: 74
 

Default Re: 5.2.9 broke store with index failure

Quote:
Originally Posted by razortw
Hi.
You should add the DirectoryIndex directive to your .htaccess, it should point at cart.php.
cart.php is the customer entry point by default.

Thanks for taking the time to respond.

Unfortunately as my signature line says I am using Nginx, therefore .htaccess isn't possible.

I have spent a lot of time converting all the Apache rules to Nginx rules. On 5.2.6 everything was working fine, however obviously something changed in 5.2.9 that is causing Nginx to handle the URI differently.

In a development copy I think I found the answer which did require a rule change in Nginx although not the index one. I do want to share my Nginx rules with the community as I think XCart performs far better on Nginx over Apache.

Why fork a 40MB+ instance to serve a jpg, png, css, etc? That is nuts. Nginx is so much nicer but it has been a journey getting all these rules rewritten.

Thanks again though for your suggestion I do appreciate you trying to help!

* I'll post back when all is confirmed and open another thread with Nginx rules.
__________________
Respectfully,

Jeremy

X-Cart 5.3 running on:
* Web server: Nginx with PHP-FPM via FastCGI (Opcache enabled)
* Database: Percona Server
* OS: CentOS
Reply With Quote
  #4  
Old 11-06-2015, 08:52 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: 5.2.9 broke store with index failure

Quote:
Originally Posted by cleverwise
Thanks for taking the time to respond.

Unfortunately as my signature line says I am using Nginx, therefore .htaccess isn't possible.

I have spent a lot of time converting all the Apache rules to Nginx rules. On 5.2.6 everything was working fine, however obviously something changed in 5.2.9 that is causing Nginx to handle the URI differently.

In a development copy I think I found the answer which did require a rule change in Nginx although not the index one. I do want to share my Nginx rules with the community as I think XCart performs far better on Nginx over Apache.

Why fork a 40MB+ instance to serve a jpg, png, css, etc? That is nuts. Nginx is so much nicer but it has been a journey getting all these rules rewritten.

Thanks again though for your suggestion I do appreciate you trying to help!

* I'll post back when all is confirmed and open another thread with Nginx rules.
As far as I know, you can set up similar rule in the nginx config as well.
We've faced similar issue on nginx servers couple times, and it was successfully sorted out by the hosting team.

By the way, X-Cart 5 indeed performs better on nginx.
From my experience, I would say the best configuration to run X-Cart 5 would be nginx + PHP 5.5 + opcache.
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
  #5  
Old 11-06-2015, 03:09 PM
 
cleverwise cleverwise is offline
 

Advanced Member
  
Join Date: Jun 2014
Posts: 74
 

Default Re: 5.2.9 broke store with index failure

Quote:
Originally Posted by razortw
As far as I know, you can set up similar rule in the nginx config as well.
We've faced similar issue on nginx servers couple times, and it was successfully sorted out by the hosting team.

By the way, X-Cart 5 indeed performs better on nginx.
From my experience, I would say the best configuration to run X-Cart 5 would be nginx + PHP 5.5 + opcache.

Yes it does but in my case that doesn't seem to be the issue.

I agree on the setup and am running that configuration only I have PHP 5.6 and am looking forward to PHP 7 which is said to be a lot faster!
__________________
Respectfully,

Jeremy

X-Cart 5.3 running on:
* Web server: Nginx with PHP-FPM via FastCGI (Opcache enabled)
* Database: Percona Server
* OS: CentOS
Reply With Quote
  #6  
Old 11-12-2015, 10:57 AM
 
cleverwise cleverwise is offline
 

Advanced Member
  
Join Date: Jun 2014
Posts: 74
 

Default Re: 5.2.9 broke store with index failure

I wanted to follow up on this post.

I have totally resolved this issue by writing new Nginx rules. I did have some issues with the built in not found message but I simply created a not found page in the "Content" area and redirect to that page.

I will be sharing my Nginx code shortly which has additional security and performance enhancements over the Apache rules.

I wanted to report back in case anyone is following this thread with interest.
__________________
Respectfully,

Jeremy

X-Cart 5.3 running on:
* Web server: Nginx with PHP-FPM via FastCGI (Opcache enabled)
* Database: Percona Server
* OS: CentOS
Reply With Quote
  #7  
Old 11-12-2015, 11:53 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: 5.2.9 broke store with index failure

Please do when ready. It will be interesting to see some apache vs nginx performance numbers too. Thanks.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #8  
Old 11-13-2015, 12:44 PM
 
cleverwise cleverwise is offline
 

Advanced Member
  
Join Date: Jun 2014
Posts: 74
 

Default Re: 5.2.9 broke store with index failure

I am doing a little bit of last minute tweaking and actually got the built in page not found message to display properly.

I'll open a new thread about Nginx and the tweaks I have done. I don't have any stats to compare against Apache as my company has dropped all use of Apache for websites. Nginx is just more secure, faster, and offers more configuration freedom.

After all Nginx can serve around 10,000 static requests using about 10MB of RAM (excluding the content itself). Apache needs 30MB to 70MB on average just for ONE request. Plus Nginx has a lot of extra built in features like caching and load balancing that make it slaughter Apache in performance. I appreciate Apache and have deployed it for years (over 15 actually) but Nginx is just the next generation of web serving.

I'll get back next week with my directives and things I am doing. I also have X-Cart running happily on a site with other systems like Wordpress, custom PHP systems, etc. You can easily control what pool X-Cart is running in for even tighter security and performance. Ah... the power of Nginx.
__________________
Respectfully,

Jeremy

X-Cart 5.3 running on:
* Web server: Nginx with PHP-FPM via FastCGI (Opcache enabled)
* Database: Percona Server
* OS: CentOS
Reply With Quote
  #9  
Old 11-20-2015, 08:33 AM
 
cleverwise cleverwise is offline
 

Advanced Member
  
Join Date: Jun 2014
Posts: 74
 

Default Re: 5.2.9 broke store with index failure

If you are following this thread for Nginx rules I have uploaded them here:

https://forum.x-cart.com/showthread.php?t=73118
__________________
Respectfully,

Jeremy

X-Cart 5.3 running on:
* Web server: Nginx with PHP-FPM via FastCGI (Opcache enabled)
* Database: Percona Server
* OS: CentOS
Reply With Quote

The following user thanks cleverwise for this useful post:
razortw (11-22-2015)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:18 AM.

   

 
X-Cart forums © 2001-2020