Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Problem When Changing Admin.php Name 4.1.2 Rate Topic   - - - - -

 
  • Ian
  • Junior Member
  • Members
  • Join Date: 22-Apr 06
  • 29 posts

Posted 04 February 2014 - 12:21 AM #1

For all the versions of CS-Cart I have used I have changed the admin.php file name for security and all worked fine. I am looking to change a couple of my sites to 4.1.2 and on each one when I change the admin.php name and the config.local.php file entry I get this error for the front and admin side address.

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/thebagsh/public_html/config.local.php on line 76

Line 76 is: - $config['admin_index'] = ‘admin.php';

If I change everything back to "admin.php" again it still gives me the same error message. I have cleaned out the cache each time but no change. The only way I can solve it is to install over the top again and all works again. I don't want to get stuck into migrating things over until I can be sure I can make this change successfully.

Has anyone else had this problem?

Ian
CS-Cart 2.2.1
PHP 5.2.11
MySQL 5.0.91
VPS

 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3967 posts

Posted 04 February 2014 - 02:36 AM #2

I don't know if this is your problem or not but I just had a look at the default file and it appears that it is using too many spaces (4) between ] and =.?

$config['admin_index']	= 'admin.php';

try this...
$config['admin_index'] = 'admin.php';


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12044 posts

Posted 04 February 2014 - 02:53 AM #3

Whitespace should not matter. This is completely acceptable:
$config['admin_index']
=

'admin.php'
;

The character you have before admin.php is not a single quote character (at least if I search for one it doesn't find it. So in fact you do have unquoted string.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3967 posts

Posted 04 February 2014 - 03:02 AM #4

Good catch. I didn't/couldn't see that with my old eyes. Since I didn't, I was guessing.

‘


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12044 posts

Posted 04 February 2014 - 03:31 AM #5

My eyes don't work for that either. But "search on page" is your friend!

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Ian
  • Junior Member
  • Members
  • Join Date: 22-Apr 06
  • 29 posts

Posted 04 February 2014 - 03:52 AM #6

Thank you :)

I didn't spot that at all. Very strange as I didn't touch that each time I changed the admin.php name so, maybe it was a quirk of my editor changing it. Thanks again I can get back to setting this up now.
CS-Cart 2.2.1
PHP 5.2.11
MySQL 5.0.91
VPS