Zen Cart Logo
Forums / Basic Configuration / Fatel Error Help Please

Fatel Error Help Please

Locked

Views: 1,478

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
25 Aug 2007, 7:16 PM
#1
sweetshi avatar

sweetshi

New Zenner

Join Date:
Aug 2007
Posts:
19
Plugin Contributions:
0

Fatel Error Help Please

Help I received this error, could someone lookup in their public_html under the template_select.php and tell me how this line should read?

I would greatly appreciate this. Thank YOU.

***Parse error: syntax error, unexpected '}' in /home/sweetshi/public_html/admin/template_select.php on line 30

Here is the web page

***/home/sweetshi/public_html/admin/template_select.php

Here is the error location. it is on the second line beginning with $
************```

    require(DIR_FS_CATALOG_TEMPLATES . $file . '/template_info.php';

$template_info[$file] = 'array'('name' => $template_name,

'version' => $template_version,
'author' => $template_author,
'description' => $template_description,
'screenshot' => $template_screenshot);
}
}
}

25 Aug 2007, 7:57 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Fatel Error Help Please

That section should look like```php
while ($file = $dir->read()) {
if (is_dir(DIR_FS_CATALOG_TEMPLATES . $file) && strtoupper($file) != 'CVS' && $file != 'template_default') {
if (file_exists(DIR_FS_CATALOG_TEMPLATES . $file . '/template_info.php')) {
require(DIR_FS_CATALOG_TEMPLATES . $file . '/template_info.php');
$template_info[$file] = array('name' => $template_name,
'version' => $template_version,
'author' => $template_author,
'description' => $template_description,
'screenshot' => $template_screenshot);
}
}
}

25 Aug 2007, 8:02 PM
#3
sweetshi avatar

sweetshi

New Zenner

Join Date:
Aug 2007
Posts:
19
Plugin Contributions:
0

Re: Fatel Error Help Please

Salutations Glen

Thank you for responding, I realize I had two posts, but i am new first try and when i did not see the question in new posts i tried again.

Here is what I have above that line.```


// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers |
// | |
// | [url]http://www.zen-cart.com/index.php[/url] |
// | |
// | Portions Copyright (c) 2003 osCommerce |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | [url]http://www.zen-cart.com/license/2_0.txt[/url]. |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | [email protected] so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// $Id: template_select.php 3297 2006-03-28 08:35:01Z drbyte $
//
require('includes/application_top.php');
// get an array of template info
$dir = @dir(DIR_FS_CATALOG_TEMPLATES);
if (!$dir) die('DIR_FS_CATALOG_TEMPLATES NOT SET');
while ($file = $dir->read()) {
if (is_dir(DIR_FS_CATALOG_TEMPLATES . $file) && strtoupper($file) != 'CVS' && $file != 'template_default')
if (file_exists(DIR_FS_CATALOG_TEMPLATES . $file . '/template_info.php')

    require(DIR_FS_CATALOG_TEMPLATES . $file . '/template_info.php';
    $template_info[$file] = 'array'('name' => $template_name,
                                  'version' => $template_version,
                                  'author' => $template_author,
                                  'description' => $template_description,
                                  'screenshot' => $template_screenshot);
  }
}

}

25 Aug 2007, 8:09 PM
#4
sweetshi avatar

sweetshi

New Zenner

Join Date:
Aug 2007
Posts:
19
Plugin Contributions:
0

Re: Fatel Error Help Please

Salutations Glen

I repaired the thread then i received this reply when i tried to get into Zen Cart tool Template Selection

Warning: require(/home/sweetshi/public_html/includes/templates/apple/template_info.php) [function.require]: failed to open stream: Success in /home/sweetshi/public_html/admin/template_select.php on line 29

Fatal error: require() [function.require]: Failed opening required '/home/sweetshi/public_html/includes/templates/apple/template_info.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sweetshi/public_html/admin/template_select.php on line 29

25 Aug 2007, 8:11 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Fatel Error Help Please

That is decidedly strange. Somehow the opening { was deleted from both of the if statements - compare them, they should be like

if (... ) {

25 Aug 2007, 8:16 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Fatel Error Help Please

Your copy of the file may have been corrupted - if you didn't edit it to remove the {s, I doubt anyone else did.

How did you install Zen Cart? Do you have an FTP program to transfer files to your pc for editing? What did you use to edit files?

25 Aug 2007, 8:26 PM
#7
sweetshi avatar

sweetshi

New Zenner

Join Date:
Aug 2007
Posts:
19
Plugin Contributions:
0

Re: Fatel Error Help Please

No I receive this error message

Parse error: syntax error, unexpected '{' in /home/sweetshi/public_html/admin/template_select.php on line 28

Here is what it looks like now. I have tried 5 different ideas and still I am not getting through. Thank you for your efforts. I appreciate your help.

**************Here is what it looks like now

require('includes/application_top.php');
// get an array of template info
$dir = @dir(DIR_FS_CATALOG_TEMPLATES);
if (!$dir) die('DIR_FS_CATALOG_TEMPLATES NOT SET');
while ($file = $dir->read()) {
if (is_dir(DIR_FS_CATALOG_TEMPLATES . $file) && strtoupper($file) != 'CVS' && $file != 'template_default') {
if (file_exists(DIR_FS_CATALOG_TEMPLATES . $file . '/template_info.php') {
(require(DIR_FS_CATALOG_TEMPLATES . $file . '/template_info.php');
$template_info[$file] = array('name' => $template_name,
'version' => $template_version,
'author' => $template_author,
'description' => $template_description,
'screenshot' => $template_screenshot);
}
}
}

25 Aug 2007, 8:31 PM
#8
sweetshi avatar

sweetshi

New Zenner

Join Date:
Aug 2007
Posts:
19
Plugin Contributions:
0

Re: Fatel Error Help Please

gjh42:

Your copy of the file may have been corrupted - if you didn't edit it to remove the {s, I doubt anyone else did.

How did you install Zen Cart? Do you have an FTP program to transfer files to your pc for editing? What did you use to edit files?
I am using cPanel File manager provided by Hostmonster

Oh i am sure it was my doing. I was trying to set up a custom template.

27 Aug 2007, 2:14 AM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Fatel Error Help Please

The file manager is fine for looking at your files, creating new folders and moving files, but you should not use it for editing files.

What you need is an FTP program (Filezilla is a good one) and a file editing program (Notepad++ is good, and CrimsonEditor is supposed to be good) installed on your pc. All these can be downloaded free from Sourceforge.net and are easy to install and use. You need to find out from your host the FTP port, username and password for FTP access to your site.

You will FTP a file to your pc, edit it and FTP it back to the server.

And I still don't get what happened to that file - there is no reason you should ever have needed to touch it.