Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2015
    Location
    New Jersey USA
    Posts
    64
    Plugin Contributions
    0

    Default ZC copy instaledl on VPS but can't access Admin

    My live 1.54 ZC site uses PHP 5.6. For practice I copied it to home server running Ubuntu 16.04 and PHP 7. I use Webmin/Virtualmin panel. After some problems and additional configuration got everything working. I can view my store, log onto admin, use PHPMyAdmin, etc. by changing my Windows Host file (on a desktop PC connected to same router as home server) to open up MY_STORE.com by adding a line in Hosts something like: "192.168.999.xxx MY_STORE.com www.MY_STORE.com". No apparent issues and the site on my home server seems to work exactly the same as my live site

    I also have an OpenVZ VPS with Ubuntu 16.04 and PHP 7, Webmin/Virtualmin. I tried the same migration to find if it works when on the actual internet. Am not using a real domain name for my test copy store just use MY_STORE.com and change Host Files on my Windows desktop PC to point to the VPS's IPv4 address similar to way I did on home server

    On the VPS the front end of copy of my ZC site works exactly like my live store. But when I try to log onto Admin get 500 error. Tried a bunch of possible solutions found via Google but no luck. Hoping someone can give me likely explanation and maybe solution. Think it might be solved if downgrade PHP to 5.6 but not sure since it's working on home server with PHP 7.

    Or am I overlooking something obvious?

    Site Apache Error Log:

    [Sat Nov 04 16:01:16.724367 2017] [fcgid:warn] [pid 9728:tid 139645776013056] [client 173.xxx.xxx.xxx:65154] mod_fcgid: read data timeout in 41 seconds

    [Sat Nov 04 16:01:16.724444 2017] [core:error] [pid 9728:tid 139645776013056] [client 173.xxx.xxx.xxx:65154] End of script output before headers: login.php

    Site Access log:

    173.xxx.xx.xxx - - [04/Nov/2017:15:57:03 -0400] "GET /MY_STORE/MY_ADMIN/ HTTP/1.1" 302 472 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"

    173.xxx.xx.xxx - - [04/Nov/2017:15:57:03 -0400] "GET /MY_STORE/MY_ADMIN/login.php?camefrom=index.php HTTP/1.1" 500 707 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: ZC copy instaledl on VPS but can't access Admin

    Most obvious thing overlooked: ZC 1.5.4 -> PHP 7.x
    See the system requirements for ZC: https://www.zen-cart.com/content.php...o-run-zen-cart
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Nov 2015
    Location
    New Jersey USA
    Posts
    64
    Plugin Contributions
    0

    Default Re: ZC copy instaledl on VPS but can't access Admin

    Yes I did see where it's written "Zen Cart v1.5.4 is designed for PHP 5.5 and PHP 5.6". My 1.54 setup appears to be working fine on my home server with PHP 7 so didn't think this would be the cause of this particular admin access issue.

    I will try installing PHP 5.6 on the VPS

    Thanks

  4. #4
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,682
    Plugin Contributions
    9

    Default Re: ZC copy instaledl on VPS but can't access Admin

    Quote Originally Posted by Ted Grapler View Post
    Yes I did see where it's written "Zen Cart v1.5.4 is designed for PHP 5.5 and PHP 5.6". My 1.54 setup appears to be working fine on my home server with PHP 7 so didn't think this would be the cause of this particular admin access issue.

    I will try installing PHP 5.6 on the VPS

    Thanks
    i think this is a red herring. if your modified version of ZC 1.5.4 works on 1 server config and does not work on another server config, then i think you have a server config issue. in addition, the logs will tell you EXACTLY what the problem is.

    while i do not think it is difficult to install 5.6, i'm doubtful that will resolve the problem.... it might... but until you know what the problem is, i'm not a fan of throwing darts at what it might be....

    that said, on a VPS where you have complete control, there are plenty of things one can do.... after installed php5.6, you can create a shell script to switch between php5.6 and 7.1 (or whatever version)..... i used something like this (i'm assuming you are operating on the command line):

    Code:
    sudo a2dismod php7.1;
    sudo a2enmod php5;
    sudo service apache2 restart;
    pretty easy once you have everything installed.... some of the packages might be different. but once you get this shell script working (and the reverse), it becomes VERY easy to see what problems you might have related to your version of php.

    with regards to your original problem, can you implement a php info page? one would normally get that through the admin, but seeing that you can not get to the admin, you would need to create one of the customer facing side. not too hard, as it is on a development server....

    when i look at my info pages, i do have fastcgi implemented but not as a mod, ie searching for mod_fcgid returns nothing.

    that said, it looks like you need to increase a timeout for this mod. in:

    /etc/apache2/mods-available/fcgid.conf

    you can increase the timeout to:

    FcgidIOTimeout 600

    but there is a lot of chatter on this problem out there, and configuration of your server can be a bit of trial and error. you can look:

    https://goo.gl/tAkFCj
    https://goo.gl/Jyxf8C

    i just find it curious that the customer side works fine, and the admin does not. you could also turn on debugging in:

    YOUR_ADMIN/includes/application_top.php

    to see if anything is getting loaded and where the problem might be.

    hope that helps.

    good luck!
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  5. #5
    Join Date
    Nov 2015
    Location
    New Jersey USA
    Posts
    64
    Plugin Contributions
    0

    Default Re: ZC copy instaledl on VPS but can't access Admin

    Thanks carlwhat.

    Going to try these suggestions and will post results here.

    After some more thought I realize there is a potentially significant difference between home test server where the 1.5.4 site appears to work fine with PHP 7 versus the same site on the VPS. It's that the VPS's Linux kernel is an older version modified for use with OpenVZ. Home server has the latest stable unmodified kernel. Both are running Ubuntu Server 16 64 bit.

  6. #6
    Join Date
    Nov 2015
    Location
    New Jersey USA
    Posts
    64
    Plugin Contributions
    0

    Default Re: ZC copy instaledl on VPS but can't access Admin

    Within Virtualmin control panel is option to change Maximum PHP script run time to unlimited. I did so temporarily and can log onto Admin now but takes 60-120 seconds. Clicking on anything within Admin causes another 60-120 second delay before it loads, even clicking Logoff.

    Open to suggestions. Still intend on trying downgrade to 5.6 and see if any difference.

    Also- if any Moderator could fix the typo in title of this post I'd be grateful

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: ZC copy instaledl on VPS but can't access Admin

    Could it be a difference in your mail protocol? I've seen at least one hosting where the "SPAM assassin" was taking an extraordinary amount of time ...

  8. #8
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,682
    Plugin Contributions
    9

    Default Re: ZC copy instaledl on VPS but can't access Admin

    Quote Originally Posted by Ted Grapler View Post
    Within Virtualmin control panel is option to change Maximum PHP script run time to unlimited. I did so temporarily and can log onto Admin now but takes 60-120 seconds. Clicking on anything within Admin causes another 60-120 second delay before it loads, even clicking Logoff.

    Open to suggestions. Still intend on trying downgrade to 5.6 and see if any difference.

    Also- if any Moderator could fix the typo in title of this post I'd be grateful
    i think this is all very problematic. the inexpensive nature of VPSs now allow almost anyone to spin one up. if you pay attention to what is going on in your system logs, you will see that almost as soon as you spin up a server on the internet, someone will attempt to break in and make use of it.

    so unless one is focused on security, including the monitoring of logs, you will not see who is really pounding on your machine.

    i am NOT saying that is what is going on here, i just needed to rant a bit on system administration, of which i am not an expert, but which interests me a bit....

    any public facing VPS needs to be hardened. and while i am not per se knowledgeable of this Virtualmin control panel, i am a fan of running debian linux, with only key access to a non-secured user who can then elevate his security privileges to enact system changes. and only doing this via the command line....

    back to the problem at hand, if you were to downgrade to 5.6, and it were to work, you would have no idea why. the php.ini file, which contains most of your configuration data, is different between versions, and the default values are no doubt different.

    i would like to re-iterate. changing the line in YOUR_ADMIN/includes/application_top.php to:

    Code:
    if (!defined('DEBUG_AUTOLOAD')) define('DEBUG_AUTOLOAD', true);
    will provide a wealth of information as to what your problem might be.

    good luck.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 

Similar Threads

  1. v151 CAN access Admin, but not online catalog
    By mjbwebdesigns in forum General Questions
    Replies: 2
    Last Post: 26 Apr 2014, 02:04 PM
  2. New Install But Can't Access Admin
    By BradN in forum Installing on a Windows Server
    Replies: 5
    Last Post: 18 Jan 2011, 12:12 PM
  3. Replies: 3
    Last Post: 4 Jun 2009, 06:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR