Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Same server, different directory

Same server, different directory

Locked

Views: 1,261

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
24 Oct 2008, 11:11 PM
#1
aftab avatar

aftab

New Zenner

Join Date:
Oct 2008
Posts:
2
Plugin Contributions:
0

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 (https://www.mysite.com/store/admin) and store (https://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 https://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 (https://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
$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, :blink:

  1. 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

25 Oct 2008, 2:10 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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.

25 Oct 2008, 2:30 AM
#3
aftab avatar

aftab

New Zenner

Join Date:
Oct 2008
Posts:
2
Plugin Contributions:
0

Re: Same server, different directory

DrByte:

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.