Forums / Installing on a Windows Server / config.php/dist-configure.php

config.php/dist-configure.php

Locked

Views: 9,534

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
19 Jan 2010, 5:56 PM
#1
evenstar avatar

evenstar

New Zenner

Join Date:
Jan 2010
Posts:
15
Plugin Contributions:
0

config.php/dist-configure.php

Hi everyone, really hope someone can help me here. I've uploaded zen cart to my site, all files seem to have uploaded ok, set up complete, and database name etc ok. However, now both admin and my site are blank pages. I have noticed that there are no 'config.php' files in the relevant folers, but there are 'dist-configure.php' files, is this correct? (previously I have used OSCommerce, where the files are named 'config.php'.

Many Thanks.

19 Jan 2010, 6:01 PM
#2
evenstar avatar

evenstar

New Zenner

Join Date:
Jan 2010
Posts:
15
Plugin Contributions:
0

Re: config.php/dist-configure.php

UPDATE Now I have the 'system setup required' screen back up, it does say the following:

Your /includes/configure.php and/or /admin/includes/configure.php file contains invalid path information and/or invalid database-connection information.

Can someone clarify for me, should the files be named configure.php? have just checked the downloaded pack again, and not included in the download?

19 Jan 2010, 6:23 PM
#3
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: config.php/dist-configure.php

Yes. When I install Zencart, I change the names of the two dist-configure.php files to configure.php and change their permissions to 777 before starting the installation.

19 Jan 2010, 6:24 PM
#4
evenstar avatar

evenstar

New Zenner

Join Date:
Jan 2010
Posts:
15
Plugin Contributions:
0

Re: config.php/dist-configure.php

Thanks for your quick reply..I've changed the names, and set permissions, still having problems, but may need another thread. Thanks again.

20 Jan 2010, 1:40 AM
#5
dcscrapping avatar

dcscrapping

New Zenner

Join Date:
Jan 2010
Posts:
11
Plugin Contributions:
0

Re: config.php/dist-configure.php

Maybe this will help??

Two files need to be created on the server. These are the configure.php files that identify the settings of your particular server and the location of the files that you just loaded. After they have been created, you will then need to change the permissions on these files.

NOTE: Changing permissions can be done via your FTP program with the chmod feature. Usually clicking right on a directory or filename will open a menu with this option (perhaps under "Properties")

On the server locate the file: /catalog/includes/dist-configure.php
Rename this file to configure.php and change the permissions to 777 (read-write-execute for all)

Next, on the server locate the file: /catalog/admin/includes/dist-configure.php
Rename this file to configure.php and change the permissions to 777 (read-write-execute for all)

NOTE FOR IIS USERS: If using IIS for Windows hosting, the "chmod 777" idea for permissions settings is likely foreign to you. In IIS, under Windows, you need to right-click on the file (or folders in the next section below), and choose Properties. Then under the Security tab, ensure that the"Internet Guest Account", identified usually as: MACHINE_NAME\IUSR_MACHINE_NAME ... has at least "read" and "write" privileges... likely best to give "modify" as well. This should be done on each file/folder indicated. (If the IUSR_MACHINE_NAME account isn't listed, click "Add" and add that account from the list, and then set the required permissions.) (Note: "_MACHINE_NAME" above refers to the "machine name" or "computer name" configured by the server administrator to "name" the server.)

Now, change the permissions on the following directories to 777 (read/write/execute).

/catalog/cache
/catalog/images
/catalog/includes/languages/english/html_includes
/catalog/media
/catalog/pub
/catalog/admin/backups
/catalog/admin/images/graphs

Note: open the catalog/images directory and change all of the subdirectories and their subdirectories to 777 as well. For example (this is a partial list):
/catalog/images/attributes
/catalog/images/dvd
/catalog/images/large
/catalog/images/large/dvd
/catalog/images/medium
/catalog/images/upload

NOTE: If you miss any of the images directories and subdirectories inside /images and try to use them later, you will get an error message that you cannot write to these directories.

Other folders/files

As for other folders and files, depending on your webserver configuration, they can be set to:

  • folders: CHMOD 755 ("CHMOD" is a linux/unix term for setting/changing permission levels)
  • files: CHMOD 644
    These are typically the defaults that your FTP program will use when uploading, so usually do not need to be set manually.
20 Jan 2010, 3:37 PM
#6
evenstar avatar

evenstar

New Zenner

Join Date:
Jan 2010
Posts:
15
Plugin Contributions:
0

Re: config.php/dist-configure.php

Hello, thanks for the information, I'm in the process of uploading the installation files again, as I'm guessing there were a few problems with the original upload.

One question before I 'delve in' again...! Is it essential that the files listed above (and on the installation notes) are set to 777? I am having real problems setting at this level, I cannot do so via my FTP (Firezilla), or via my hosting company support. I've tried several times to upload a chmod file and run on server, but despite the msg after running 'permissions changed successfully..etc..), the folders still remain at 755. Thanks again!

20 Jan 2010, 3:56 PM
#7
evenstar avatar

evenstar

New Zenner

Join Date:
Jan 2010
Posts:
15
Plugin Contributions:
0

Re: config.php/dist-configure.php

Here is the script my hosting company gave me to run:

<?php chmod("/cache", 0777); echo "chmod for the file was changed"; ?>

Have noticed that I don't have a main 'catalog' folder, all files are in my root could this be a problem? (installed directly the contents from download folder - zen-cart-v1.3.8a-full-fileset-12112007).

I've also tried variations on the script i.e. /cache/

20 Jan 2010, 4:08 PM
#8
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: config.php/dist-configure.php

I am assuming you did the following:

  1. You downloaded the Zencart software (zipped file) to your local machine, and unzipped it.

  2. Then you FTP'd ALL the files and folders to your server.

  3. Then (reading the install instructions) you changed permissions for various folders (best done via c-panel)

  4. You set up a MySQL database on your server (through the C-Panel) and applied a username and password - with that user having full database permissions.

  5. You then went to http://www.yourwebsite.com/zc_install

  6. You were then presented with the installation welcome screen.

  7. You progressed through the installation screens, providing information as requested in each screen.

  8. If you did all the above correctly, zencart would have installed, and you will be shown a "success" page where there are links to the catalog (shop) area, and the admin area.

If you use the install process above, there is no need to re-name dist_configure.php, as zencart will create the correct files during installation.

After installation it is recommended you remove (from the installation's root folder):

docs folder
zc_install folder
licence.txt

and both dist_configure.php files from

/includes/
/admin/includes/

20 years a Zencart User

20 Jan 2010, 4:16 PM
#9
evenstar avatar

evenstar

New Zenner

Join Date:
Jan 2010
Posts:
15
Plugin Contributions:
0

Re: config.php/dist-configure.php

UPDATE! after browsing on forum, it appears that the chmod script was entirely incorrect, I've used the correct directory structure and appears to be working. :oops:

20 Jan 2010, 5:47 PM
#10
evenstar avatar

evenstar

New Zenner

Join Date:
Jan 2010
Posts:
15
Plugin Contributions:
0

Re: config.php/dist-configure.php

Ok, so finally have all of the permissions set to 777 (including folders within folders for images), configure.php available in both /admin/includes and /includes, and both set to 777. index.php, and all files as far as I can see ok and available on my server.

I have run the installer per above comment, entered DB name/passwords etc, and all seemed ok, got the message:
: Zen Cart™ Setup - Finished
Congratulations!
You have successfully installed Zen Cart™ on your system!

Then...on clicking on either the admin or store front link on this screen (or accessing directly on browser) I am still getting a blank screen. I've looked on the forum, but not sure how to troubleshoot this, as I'm not getting any errors during installation.

Can anyone help? Been at this for 2 days now, and afraid my laptop will shortly be landing in the garden!!!

20 Jan 2010, 5:58 PM
#11
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: config.php/dist-configure.php

While the install has gon through, there is a faulty PHP file somewhere. This is not unusual when you FTP the program files to the server - and often happens if you send the whole bang shoot up in one go.

What happens is that during the ftp process, a file gets corrupted and with PHP being quite fussy, a faulty file usually renders a blank - or partially blank - screen

You need to use this tool:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=860

(read the simple instructions embedded in the file)

Then, go collect the error message in the cache folder and post it up here for us to see...

20 years a Zencart User

20 Jan 2010, 6:56 PM
#12
evenstar avatar

evenstar

New Zenner

Join Date:
Jan 2010
Posts:
15
Plugin Contributions:
0

Re: config.php/dist-configure.php

Thanks to you all for your help, it turns out that the problem was caused by an upgrade on my hosting site to a new PHP version.

If anyone else has this problem (I am with one.com hosting), the solution is below:

Blank screen when installing ZenCart on PHP 5.3.0:

Main changes to make are listed below (not comprehensive, but worked with me)

= = = = =

  • Prefix 'set_magic_quotes_runtime' with '@' in application_top.php
    (there are two files with this name, one in includes and one in
    /admin/includes). There are other uses of set_magic_quotes_runtime in
    the code, but I'll deal with them as I come to them.

  • Replace "ereg('thing', $other)" with "preg_match('/thing/', $other)",
    .....
    one file that has a problem is
    includes/classes/db/mysql/query_factory.php
    Calls such as "ereg('^[0-9]', $key)" need to be replaced by
    "preg_match('/^[0-9]/', $key)" in several places,
    note the / / surrounding the string."

  • 'date_diff' is now a keyword in PHP 5.3.0
    (http://th2.php.net/manual/en/function.date-diff.php) so change the
    function to something like zen_date_diff in:
    admin/orders.php
    admin/includes/header.php
    admin/includes/modules/orders_download.php
    admin/includes/functions/general.php
    includes/modules/payment/paypal/paypal_functions.php
    includes/functions/functions_general.php

..Hopefully this will help someone out, and prevent the hurling of laptops out of windows while trying to resolve!...

20 Jan 2010, 6:59 PM
#13
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: config.php/dist-configure.php

I trust you are aware that there is a PATCH for sites running under 5.3. Did you use the patch?

20 years a Zencart User

20 Jan 2010, 7:02 PM
#14
evenstar avatar

evenstar

New Zenner

Join Date:
Jan 2010
Posts:
15
Plugin Contributions:
0

Re: config.php/dist-configure.php

schoolboy:

I trust you are aware that there is a PATCH for sites running under 5.3. Did you use the patch?
I didn't, no, this information was passed to me by my hosting provider following a previous query, may have been slightly easier rather than fiddling around with php coding (I am not technical in the slightest)..