Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help please! Can not login to admin at all


igalkina

Recommended Posts

Posted

:'(

Hello! Would be very grateful if someone can help. I made corrections in public_html/admin/includes/functions/localization.php following advice on the forum about currencies. Site looked Ok after corrections. But when i tried to go back to admin - have no such an opportunity. Instead of asking me for username and password I got white page with message:

 

Parse error: syntax error, unexpected '&' in /home/vintagg0/public_html/admin/includes/functions/localization.php on line 15

 

So i have no way to access admin to correct this mistake or do any further work on my web site. I am locked out from administrating my site. How I can solve this problem?

 

What shall i do? Please help!!! :'(

 

Irina

Posted

First off did you make a backup copy?

Post the file admin/includes/functions/localization.php maybe someone can help you out.

Remember ALLWAYS BACKUP YOUR FILES.

Posted

I did backup but did it through admin. So it is not on computer but somewhere may be on server. To be honest I do not know how to make backup on my computer. How can I do it?

 

Here is the code(below) that I took fom forum and put in /home/vintagg0/public_html/admin/includes/functions/localization.php. Guys said it worked for them. But I cannot access it now to make any corrections as am locked out from admin.

 

Line 15 - is the first line after comments.

Can this sign � cause mistake?

 

How can I solve situation? How to get back to admin? Would be greateful for any help. The site was almost ready...

 

<?php
/*
�$Id: localization.php,v 1.12 2003/06/25 20:36:48 hpdl Exp $

�osCommerce, Open Source E-Commerce Solutions
�http://www.oscommerce.com

�Copyright © 2003 osCommerce

�Released under the GNU General Public License
�
�Modyfications by Krzysztof K. Klich, ALTe.pl, 2004/10/27
*/

�function quote_oanda_currency($code, $base = DEFAULT_CURRENCY) {
// � �$page = file('http://www.oanda.com/convert/fxdaily?value=1&redirected=1&exch=' . $code . �'&format=CSV&dest=Get+Table&sel_list=' . $base);

// �ALTe START
� �$alte_url = "http://www.oanda.com/convert/fxdaily";
� �$alte_params = 'value=1&redirected=1&exch=' . $code . �'&format=CSV&dest=Get+Table&sel_list=' . $base;
� �$alte_user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";

� �$alte_ch = curl_init();
� �curl_setopt($alte_ch, CURLOPT_POST,1);
� �curl_setopt($alte_ch, CURLOPT_POSTFIELDS,$alte_params);
� �curl_setopt($alte_ch, CURLOPT_URL,$alte_url);
� �curl_setopt($alte_ch, CURLOPT_SSL_VERIFYHOST, 2);
� �curl_setopt($alte_ch, CURLOPT_USERAGENT, $alte_user_agent);
� �curl_setopt($alte_ch, CURLOPT_RETURNTRANSFER,1);
� �curl_setopt($alte_ch, CURLOPT_SSL_VERIFYPEER, FALSE);

� �$alte_page=curl_exec ($alte_ch);
� �curl_close ($alte_ch);

� �$page = explode("\n",$alte_page);
// �ALTe STOP � �

� �$match = array();

� �preg_match('/(.+),(\w{3}),([0-9.]+),([0-9.]+)/i', implode('', $page), $match);

� �if (sizeof($match) > 0) {
� � �return $match[3];
� �} else {
� � �return false;
� �}
�}

�function quote_xe_currency($to, $from = DEFAULT_CURRENCY) {
// � �$page = file('http://www.xe.net/ucc/convert.cgi?Amount=1&From=' . $from . '&To=' . $to);

// �ALTe START
� �$alte_url = "http://www.xe.net/ucc/convert.cgi";
� �$alte_params = 'Amount=1&From=' . $from . '&To=' . $to;
� �$alte_user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";

� �$alte_ch = curl_init();
� �curl_setopt($alte_ch, CURLOPT_POST,1);
� �curl_setopt($alte_ch, CURLOPT_POSTFIELDS,$alte_params);
� �curl_setopt($alte_ch, CURLOPT_URL,$alte_url);
� �curl_setopt($alte_ch, CURLOPT_SSL_VERIFYHOST, 2);
� �curl_setopt($alte_ch, CURLOPT_USERAGENT, $alte_user_agent);
� �curl_setopt($alte_ch, CURLOPT_RETURNTRANSFER,1);
� �curl_setopt($alte_ch, CURLOPT_SSL_VERIFYPEER, FALSE);

� �$alte_page=curl_exec ($alte_ch);
� �curl_close ($alte_ch);

� �$page = explode("\n",$alte_page);
// �ALTe STOP � �

� �$match = array();

� �preg_match('/[0-9.]+\s*' . $from . '\s*=\s*([0-9.]+)\s*' . $to . '/', implode('', $page), $match);

� �if (sizeof($match) > 0) {
� � �return $match[1];
� �} else {
� � �return false;
� �}
�}
?>

Posted

it looks like your using something other than a recommended text editor

 

because it's putting in some unwanted characters use notepad if you don't have anything else

 

do not upload your files with the admin file manager. use a good ftp program like fileZilla or cuteftp

 

I would upload a clean copy of the localization file and see if that clears things up..

Posted

I'd like to change or clear localization file. But a have no access to anything as I have no access to admin. The main question now is how to access files to make changes or upload something new.

Posted

Done with it :-" I called my hosting company and asked to replace localisation file with working version from previous backup. :rolleyes:

Posted
it looks like your using something other than a recommended text editor

 

because it's putting in some unwanted characters use notepad if you don't have anything else

 

do not upload your files with the admin file manager. use a good ftp program like fileZilla or cuteftp

 

I would upload a clean copy of the localization file and see if that clears things up..

Using the osc filemanager (probably).

Posted
I did backup but did it through admin. So it is not on computer but somewhere may be on server. To be honest I do not know how to make backup on my computer. How can I do it?

Download and install an FTP program like filezilla. Use it to download the fies to your pc, and use a text editor to make the changes.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...