New to CS Cart and having major issues with .HTACCESS

Hey everyone,

I’ve recently installed CS Cart for the 1st time, but it doesn’t seem to be working properly.





I really have no idea what is going on but from reading on the web I presume it’s the .HTACCESS file?. I haven’t changed the default .HTACCESS file.



I contacted my host and they said they only support mod rewrite on .HTACCESS. They also wasn’t willing to give me any advice so i’m really stuck :frowning:



Can anyone lead me in the right direction?. I would really love to get my CS Cart up and running so I can see what it’s all about.



Many thanks.

Your .htaccess file should look like this. Note the part in red.



DirectoryIndex index.html index.php





RewriteEngine on

Some hostings require RewriteBase to be uncommented

Example:

Your store url is [url]http://www.yourcompany.com/store/cart[/url]

So “RewriteBase” should be:

RewriteBase /store/cart

RewriteBase /[COLOR=“Red”]CS[/COLOR]

RewriteCond %{REQUEST_FILENAME} !.(png|gif|ico|swf|jpe?g|js|css)$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php?sef_rewrite=1 [L,QSA]



RewriteCond %{REQUEST_FILENAME} ./catalog/.

RewriteCond %{REQUEST_FILENAME} -d

RewriteCond %{REQUEST_FILENAME}/index.html !-f

RewriteRule . index.php?sef_rewrite=1 [L,QSA]







Also make sure that your config.local.php file reflects the ‘CS’ directory as in :



$config[‘http_host’] = ‘www.jlbdesigns.co.uk’;

$config[‘http_path’] = ‘CS’;



// Host and directory where software is installed on secure server

$config[‘https_host’] = ‘www.jlbdesigns.co.uk’;

$config[‘https_path’] = ‘CS’;

Hi,

Thanks for the quick reply.



The trouble is. I’ve already tried that and it then displays a 500 Internal server error page. I uploaded the .HTACCESS you just pasted to here



As you can see. It’s broken :frowning:

Oh I didn’t see that extra bit in your post.



Do you mean the following code in the config.local.php file


```php /*

The code below is what i’ve come up with for the HTACCESS and the config.local.php file. But it still doesn’t seem to work :frowning: I’m really confused.





and thanks for taking the time to reply to me.



HTACCESS FILE

```php DirectoryIndex index.html index.php





RewriteEngine on

Some hostings require RewriteBase to be uncommented

Example:

Your store url is http://www.yourcompany.com/store/cart

So “RewriteBase” should be:

RewriteBase /store/cart

RewriteBase /CS

RewriteCond %{REQUEST_FILENAME} !.(png|gif|ico|swf|jpe?g|js|css)$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php?sef_rewrite=1 [L,QSA]



RewriteCond %{REQUEST_FILENAME} ./catalog/.

RewriteCond %{REQUEST_FILENAME} -d

RewriteCond %{REQUEST_FILENAME}/index.html !-f

RewriteRule . index.php?sef_rewrite=1 [L,QSA]



```





CONFIG.LOCAL.PHP

```php
/***************************************************************************

  •                                                                      *
  • Copyright (c) 2009 Simbirsk Technologies Ltd. All rights reserved. *
  •                                                                      *
  • This is commercial software, only users who have purchased a valid *
  • license and accept to the terms of the License Agreement can install *
  • and use this program. *
  •                                                                      *

****************************************************************************

  • PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
  • “copyright.txt” FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *

    ***************************************************************************/





    //

    // $Id: config.local.php 7636 2009-06-30 07:03:06Z zeke $

    //



    if ( !defined(‘AREA’) ) { die(‘Access denied’); }



    /

  • PHP options

    /



    // Disable notices displaying

    error_reporting(E_ALL ^ E_NOTICE);



    // Set maximum memory limit

    @ini_set(‘memory_limit’, ‘48M’);



    // Set maximum time limit for script execution

    @set_time_limit(3600);



    /

  • Database connection options

    /

    $config[‘db_host’] = ‘%DB_HOST%’;

    $config[‘db_name’] = ‘%DB_NAME%’;

    $config[‘db_user’] = ‘%DB_USER%’;

    $config[‘db_password’] = ‘%DB_PASSWORD%’;

    $config[‘db_type’] = ‘mysql’;



    /

  • Script location options

    *
  • Example:
  • Your url is [url]http://www.yourcompany.com/store/cart[/url]
  • $config[‘http_host’] = ‘www.yourcompany.com’;
  • $config[‘http_path’] = ‘CS’;

  • Your secure url is [url]https://secure.yourcompany.com/secure_dir/cart[/url]
  • $config[‘https_host’] = ‘www.jlbdesigns.co.uk’;
  • $config[‘https_path’] = ‘CS’;

    *

    /



    $config[‘http_host’] = ‘www.jlbdesigns.co.uk’;

    $config[‘http_path’] = ‘CS’;



    // Host and directory where software is installed on secure server

    $config[‘https_host’] = ‘www.jlbdesigns.co.uk’;

    $config[‘https_path’] = ‘CS’;





    // Host and directory where software is installed on no-secure server

    $config[‘http_host’] = ‘%HTTP_HOST%’;

    $config[‘http_path’] = ‘%HOST_DIR%’;



    // Host and directory where software is installed on secure server

    $config[‘https_host’] = ‘%HTTPS_HOST%’;

    $config[‘https_path’] = ‘%HOST_DIR%’;



    /

  • Misc options

    */

    // Names of index files for administrative and customer areas

    $config[‘admin_index’] = ‘admin.php’;

    $config[‘customer_index’] = ‘index.php’;



    // DEMO mode

    $config[‘demo_mode’] = false;



    // Tweaks

    $config[‘tweaks’] = array (

    ‘js_compression’ => false, // enables compession to reduce size of javascript files

    ‘check_templates’ => true, // disables templates checking to improve template engine speed

    ‘inline_compilation’ => true, // compiles nested templates in one file

    );



    // Key for sensitive data encryption

    $config[‘crypt_key’] = ‘YOURVERYSECRETKEY’;



    // Developer configuration file

    if (file_exists(DIR_ROOT . ‘/local_conf.php’)) {

    include(DIR_ROOT . ‘/local_conf.php’);

    }



    define(‘AUTH_CODE’, ‘’);



    ?> ```

In your config.local.php this bit should have your directory information



// Host and directory where software is installed on no-secure server

$config[‘http_host’] = ‘%HTTP_HOST%’;

$config[‘http_path’] = ‘%HOST_DIR%’;



// Host and directory where software is installed on secure server

$config[‘https_host’] = ‘%HTTPS_HOST%’;

$config[‘https_path’] = ‘%HOST_DIR%’;



To make it easier I have included your file, just copy/paste it. You’ll have to add the database info yourself. PM me with that info if you can’t figure it out and I’ll send you the complete file.


/***************************************************************************
* *
* Copyright (c) 2009 Simbirsk Technologies Ltd. All rights reserved. *
* *
* This is commercial software, only users who have purchased a valid *
* license and accept to the terms of the License Agreement can install *
* and use this program. *
* *
****************************************************************************
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
****************************************************************************/


//
// $Id: config.local.php 7636 2009-06-30 07:03:06Z zeke $
//

if ( !defined('AREA') ) { die('Access denied'); }

/*
* PHP options
*/

// Disable notices displaying
error_reporting(E_ALL ^ E_NOTICE);

// Set maximum memory limit
@ini_set('memory_limit', '48M');

// Set maximum time limit for script execution
@set_time_limit(3600);

/*
* Database connection options
*/
[COLOR="Red"]$config['db_host'] = '%DB_HOST%';
$config['db_name'] = '%DB_NAME%';
$config['db_user'] = '%DB_USER%';
$config['db_password'] = '%DB_PASSWORD%';
$config['db_type'] = 'mysql';[/COLOR]

/*
* Script location options
*
* Example:
* Your url is [url]http://www.yourcompany.com/store/cart[/url]
* $config['http_host'] = 'www.yourcompany.com';
* $config['http_path'] = '/store/cart';
*
* Your secure url is [url]https://secure.yourcompany.com/secure_dir/cart[/url]
* $config['https_host'] = 'secure.yourcompany.com';
* $config['https_path'] = '/secure_dir/cart';
*
*/

// Host and directory where software is installed on no-secure server
[COLOR="Red"]$config['http_host'] = 'www.jlbdesigns.co.uk';
$config['http_path'] = '/CS';

// Host and directory where software is installed on secure server
$config['https_host'] = 'www.jlbdesigns.co.uk';
$config['https_path'] = '/CS';[/COLOR]

/*
* Misc options
*/
// Names of index files for administrative and customer areas
$config['admin_index'] = 'admin.php';
$config['customer_index'] = 'index.php';

// DEMO mode
$config['demo_mode'] = false;

// Tweaks
$config['tweaks'] = array (
'js_compression' => false, // enables compession to reduce size of javascript files
'check_templates' => true, // disables templates checking to improve template engine speed
'inline_compilation' => true, // compiles nested templates in one file
);

// Key for sensitive data encryption
$config['crypt_key'] = 'YOURVERYSECRETKEY';

// Developer configuration file
if (file_exists(DIR_ROOT . '/local_conf.php')) {
include(DIR_ROOT . '/local_conf.php');
}

define('AUTH_CODE', '');

?>

Hey,



I pasted that code and uploaded via FTP but I still seem to get the 500 error. [url]



I’m really confused :frowning:

Did you put your database info in? Comment out the rewritebase part in htaccess until you enable it in the admin back end.

Hey,

I commented out the rewritebase bit and uploaded again but still no luck.



I haven’t put the database info in as i’m not sure how. I can PM you the info?.



thanks

Hi everyone,

I’m still stuck with CS Cart :frowning:



I’ve just finished copying all the files again to my server in a new folder.



I’ve performed the following steps after copying the files



CHMOD permissions on config.local.php to 666

CHMOD permissions on catalog, images, skins & var to 777



But if I go to the install page I get a “500 Internal server error”.



Does anyone know what I might be doing wrong?. I’m very confused.



Many thanks

If you haven’t installed the software yet and all the files are in your CSC directory you would not add the ‘install’ to the url. Just www.jbdesigns.co.uk/CSC and the install should be available. But if I go to that url I get a 404 error. In other words, the files or directory are not there. It appears that the CSC directory is not where you want to install the cart but in the root directory. This CSC thing may be your problem.

Hey,

You spelt the URL wrong.



I’m still stuck though. This annoying 500 error is driving me insane.



The thing is. If I rename the .HTACCESS file to .HTACCESS_OLD then the install page shows, albeit without all the images and proper formatting.



cheers

If you want to give me ftp and server access I can sort this out for you.

Thanks mate

I didn’t receive anything

hmm. Do you have an email address I can send the details to?



cheers



EDIT: I sent the details to your optonline e-mail account

I sent you the details via e-mail and via PM again.



Thanks very much :slight_smile:

Is the IP address ftp.jlbdesigns.co.uk?



Never mind I am logged on.

It can be a file permission problem. After installation your files and folder permissions should look like this:



1.



all files in all folders and subfolders: 644

catalog, images, skins: 777

var and [COLOR=Red]all subfolders[/COLOR]: 777



if not, then try this:



2.



all files in all folders and subfolders: 644

all folders incl. subfolders: 755

I had a look on your installation and it seems to be a generally problem with the server settings, because the installation screen is different as usually. It doesn’t accept any formating.



[COLOR=Red]Your install screen:[/COLOR]







[COLOR=Red]Right install screen:[/COLOR]