Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2008
    Posts
    2
    Plugin Contributions
    0

    Default Same server, different directory

    Hi Zenners,

    I have searched the forums and found problems and solutions to transfering files from servers to servers or changing domains or taking out of one directory to another, which did not serve my purpose.

    I have an installation of Zen Cart 3.8a in a domain. Both admin (www.mysite.com/store/admin) and store (www.mysite.com/store) is working good. This installation is working perfect.

    Now in the same server, I copied all the folders from store folder under public_html to remove the store from URL part which would result into www.mysite.com/admin. (since I do not need the store front-end, i kept the includes and other necessary files under public_html)

    I changed and did necessary to my configure.php files. The site (www.mysite.com/admin) works good except below issues:

    1. in the orders page, the timestamp value shows 12-31-1969 07:00:00am no matter what the date is from the database. To be more precise, I have a CURRENT_TIMESTAMP field in orders table which stores the order date and time on TIMESTAMP format. When I try to read it through SQL as
    Code:
    $result=mysql_query("SELECT UNIX_TIMESTAMP(t_stamp) AS FORMATED_TIME FROM orders WHERE orders_id=".$orders->fields['orders_id']);
    $FORMATED_TIME=mysql_result($result,0,"FORMATED_TIME");
    $date=date("m-d-Y h:i:sa",$FORMATED_TIME);
    I tried with echoing the $FORMATED_TIME variable, but blank output.

    It works perfectly in the installation which is under store folder, but outside it,

    2. ACL, ACO and related stuffs are not working which is perfectly working on the copy inside store folder.

    Please note: both are working in the same database.

    Any help is highly appreciable.

    Regards
    Aftab

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Same server, different directory

    If both stores are using the same database, you should be getting the same results.
    Zen Cart doesn't care what folder your store is in, as long as you properly specify its location in your configure.php files.
    The only exception to this is if you're storing session data in files, you'll need to update your Admin->Configuration->Sessions->Session Directory setting to point to the correct new path. The classic symptom of this being incorrectly set is that items no longer get added to the cart and logins don't work, after moving to another folder/server.

    As for your date issues, it sounds like you've got some logic wrong somewhere in your custom code.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Oct 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: Same server, different directory

    Quote Originally Posted by DrByte View Post
    If both stores are using the same database, you should be getting the same results.
    Zen Cart doesn't care what folder your store is in, as long as you properly specify its location in your configure.php files.
    The only exception to this is if you're storing session data in files, you'll need to update your Admin->Configuration->Sessions->Session Directory setting to point to the correct new path. The classic symptom of this being incorrectly set is that items no longer get added to the cart and logins don't work, after moving to another folder/server.

    As for your date issues, it sounds like you've got some logic wrong somewhere in your custom code.
    Thanks a lot DrByte.

    I had changed the session value to target the new folder public_html/cache. Session is defined to use the DB, not files. I hope this can help you suggest.

    I figured out the date issue.

    Thanks again for the reply.

 

 

Similar Threads

  1. v139h 2 different sites on same server but want to use same product images
    By ultravires in forum General Questions
    Replies: 10
    Last Post: 4 Apr 2013, 08:16 PM
  2. Change the download directory to a different Server
    By p-plater in forum Setting Up Categories, Products, Attributes
    Replies: 11
    Last Post: 7 Jan 2013, 05:25 AM
  3. moving site to different URL on same server
    By JohnBoyCR in forum General Questions
    Replies: 2
    Last Post: 12 Mar 2009, 08:08 PM
  4. Replies: 10
    Last Post: 10 Oct 2008, 03:02 AM
  5. Same server etc but different domain name
    By mediathing in forum Basic Configuration
    Replies: 2
    Last Post: 5 Jul 2008, 08:53 PM

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