Install generates empty index.php

Trying to install CS Cart but when I click “next” button after entering database, etc information browser (Fx) asks if I want to open or save “index.php”. It is an empty file (0 bytes).



I searched the forums and verified permissions on folders and files but it still doesn’t work.



Has anyone experienced this? Any ideas?

Thanks

Screencap 2011-02-01 09.36 N-006.jpg

is PHP running on your localhost? looks like PHP isnt working.

Thanks for the reply.



I couldn’t get to this form/page if PHP wasn’t running. Also, the system is not being installed on localhost. My sys admins set up the site on a server running PHP 5.1.6. I can do phpinfo() without any issue from the site so something else is wrong.



I reset permissions on config.local.php and got an error, just to be sure it was trying (then I set permissions back according to the directions). I saw the timestamp change so it is able to update the file.

Does sound like you have a permissions problem. Pay special attention to files in the skins directory. Your hosting provider should be able to tell you what ownerships and permissions to use for directories and files. Basically (most environments) ownership is whatever user PHP runs as and modes are 755 for directories and 644 for files. Your FTP user may not be the same as PHP runs as. That is normally the root cause of most permissions problems.

We are the hosting provider. The network admins sit just down the hall from me, and I have full access to the site. :slight_smile:



I will check the permissions again. I got the following list from another forum post and set permissions that way after the install didn’t work the first time.



777 permissions for the “catalog” directory (and its subdirectories and files).

777 permissions for the “images” directory (and its subdirectories and files).

777 permissions for the “skins” directory (and its subdirectories and files).

777 permissions for the “var” directory (and its subdirectories and files).

755 permissions for other directories and 644 permissions for its files

644 permissions for the files located in the root directory of your CS-Cart installation



Thanks for your reply. I’ll check again.

I set the permissions to 755 for directories and 644 for files as recommended with no joy.



I also set permissions on all files and directories to 777 and still get the same error. This site is still only available internally (no external DNS yet) so that’s not a risk at this time.

What is the ownership. Giving read permission to a different owner than what PHP is running as will do little good. Permissions are a union of ownership and rights.



The theory is that your FTP and/or Cpanel environemnt runs as the same user that PHP runs as. That way, when a file/directory is created it is owned by the appropriate user,.



If you use ‘root’ to do stuff, then execute this command with being the user that PHP runs as and being the group it runs as. From the root of your store:

chown -R : .

Yeah, we checked that too. No luck. Why is it generating an empty index.php file? I mean, I get a zero byte file back when I click the next button.