If this is your first visit, check our documentation. To post, register or login.
Forums / Installing Zen Cart / Installing on a Linux/Unix Server / localhost everything not writeable

localhost everything not writeable

Started by liderbug on 9 Sep 2020, 4:39 PM · Views: 3,608

Results 1 to 13 of 13
9 Sep 2020, 4:39 PM
#1
liderbug avatar

liderbug

Zen Follower

Join Date:
Jul 2009
Posts:
104
Plugin Contributions:
0

Post #1 by liderbug

Fedora FC32, ZC 157zip. I need/want to install on localhost so I can get my DB and items correct before I deploy to my life site.

So I downloaded 157.zip. As root cd'ed to /var/www/html and ran unzip 157, renamed to zencart, chown -R apache.apache. When I then browse to http://localhost/zencart I get: ... CLICK HERE to begin installation. which gives me:

Catalog /includes/configure.php file either does not exist, is not readable or is not writeable
Admin /admin/includes/configure.php file either does not exist, is not readable or is not writeable
/var/www/html/zencart/logs folder is not writeable
...
Possible problems with database connection

I can create a writeable configure.php file - no change and Google hasn't been any help.
Thanks in advance.

9 Sep 2020, 4:51 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

Sounds like a linux permissions issue.
You'll need to sort out why PHP is being told by the filesystem that the files aren't writable.
Probably the PHP process is running as a user that doesn't have access to the files because the files are owned by a user with different privileges.

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

10 Sep 2020, 3:02 PM
#3
liderbug avatar

liderbug

Zen Follower

Join Date:
Jul 2009
Posts:
104
Plugin Contributions:
0

Post #3 by liderbug

Found 2 things (so far)

  1. Remove "'/../" from all
    define('DIR_FS_ROOT', realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/../') . '/');
    making them
    define('DIR_FS_ROOT', realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/');
    above is example as there is realpath(DIR ) also.

  2. I needed to "setenforce Permissive" to get Is_writable() to work. Otherwise it returned NULL.

Then it dies ... more to come

10 Sep 2020, 3:14 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #4 by drbyte

liderbug:

  1. Remove "'/../" from all
    define('DIR_FS_ROOT', realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/../') . '/');
    making them
    define('DIR_FS_ROOT', realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/');
    above is example as there is realpath(DIR ) also.
    Shouldn't have to change any Zen Cart code.

These are server operating system, user permission, and php/apache configuration issues.

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

10 Sep 2020, 6:05 PM
#5
liderbug avatar

liderbug

Zen Follower

Join Date:
Jul 2009
Posts:
104
Plugin Contributions:
0

Post #5 by liderbug

Next problem: Seems all of the configure pages have <form action= ... data-abide="ajax"> and "data-abide" causes the [Continue] buttons to fail. It seems to be in the js scripts but not working.

To ans on your previous post - "These are server operating system,..." I can tar off my production system on the remote server, download and untar as /var/www/html/production.com and run things just fine. 1st problem is the current production.com is old version. I've tried to upgrade production, however my hosting company has decided to go 100% WordPress. Good thing I had a good backup - code & DB - it did not go well. So I've DL'ed 1.5.7 zip, unzip to /var/www/html then mv ...1.5.7 to zencart. Then in my browser "localhost/zencart" is how I'm trying to get thing working. If you have any pointers, suggestions, please.

10 Sep 2020, 8:28 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #6 by drbyte

liderbug:

I can tar off my production system on the remote server, download and untar as /var/www/html/production.com and run things just fine.
tar usually retains filesystem permissions, so given that's working fine it seems to confirm that whatever you're doing the other way still needs to change file/dir permissions/ownership to suit your server's configuration

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

5 Aug 2022, 3:04 PM
#7
the_real_michael avatar

the_real_michael

New Zenner

Join Date:
Aug 2022
Location:
USA
Posts:
1
Plugin Contributions:
0

Post #7 by the_real_michael

I know this is an old thread but since I was having this issue and only found this thread that didn't answer the question, I thought I would post the solution that I found.

The OP forgot to copy the distro_configure.php files to configure.php

cd includes
cp distro_configure.php configure.php
cd ../admin/includes
cp distro_configure.php configure.php

Make sure that the configure files are writeable and all should be good.

liderbug:

Fedora FC32, ZC 157zip. I need/want to install on localhost so I can get my DB and items correct before I deploy to my life site.

So I downloaded 157.zip. As root cd'ed to /var/www/html and ran unzip 157, renamed to zencart, chown -R apache.apache. When I then browse to http://localhost/zencart I get: ... CLICK HERE to begin installation. which gives me:

Catalog /includes/configure.php file either does not exist, is not readable or is not writeable
Admin /admin/includes/configure.php file either does not exist, is not readable or is not writeable
/var/www/html/zencart/logs folder is not writeable
...
Possible problems with database connection

I can create a writeable configure.php file - no change and Google hasn't been any help.
Thanks in advance.

6 Aug 2022, 7:46 PM
#8
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,908
Plugin Contributions:
23

Post #8 by dbltoe

With the growth of Zen Cart's zc_install abilities, copying distro_configure.php files is seldom a needed option.

Check out the upgrade options in the Docs. If you need to see it in a different language than English, click on the Accessibility Icon in the lower, right-hand corner.

https://docs.zen-cart.com/user/upgrading/

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

10 Aug 2022, 12:48 AM
#9
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Post #9 by ckosloff

I have similar problems in /usr/var/html which is where the ZenCart files have to go but I cannot copy, move or anything else in that directory.
Same thing happens in /usr/share/docs, I am not allowed to extract compressed files.
This is a Linux permissions issue, how fix?

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

10 Aug 2022, 4:51 PM
#11
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Post #11 by ckosloff

Sorry posted in wrong thread, the issue persists.
Let me rephrase: to what should I change permissions in /var/www/html to make it writable without compromising security?

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

11 Aug 2022, 8:30 PM
#13
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Post #13 by ckosloff

And here is the link to perms on localhost.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)