Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Still need help on this one


ladykaren

Recommended Posts

Hi all. Posting this one again and hopeing for a reply.

 

I used this bit of code from Tips and Tricks

http://www.oscommerce.com/forums/index.php?showtopic=155079 and received

this error :

 

Parse error: syntax error, unexpected T_DNUMBER in /home/ladykd54/public_html/cart/includes/application_top.php on line 232

 

I went back into the files and put them back as they were before the change,

but I am still receiving this error. I changed nothing in the line where this

error is occuring. Here is the bit of code for line 232 :

 

***.**.***.***_address = tep_get_ip_address();

 

Help?

Link to comment
Share on other sites

Hi all. Posting this one again and hopeing for a reply.

 

I used this bit of code from Tips and Tricks

http://www.oscommerce.com/forums/index.php?showtopic=155079 and received

this error :

 

Parse error: syntax error, unexpected T_DNUMBER in /home/ladykd54/public_html/cart/includes/application_top.php on line 232

 

I went back into the files and put them back as they were before the change,

but I am still receiving this error. I changed nothing in the line where this

error is occuring. Here is the bit of code for line 232 :

 

***.**.***.***_address = tep_get_ip_address();

 

Help?

Are you using the file manger in Cpanel to edit files?

I did this before and Cpanel had a bug in it that altered my files when I saved them. Try uploading a known good file from your backup.

 

see my old topic here

Link to comment
Share on other sites

Are you using the file manger in Cpanel to edit files?

I did this before and Cpanel had a bug in it that altered my files when I saved them. Try uploading a known good file from your backup.

 

see my old topic here

 

 

Hi Knifeman;

Thank you very much for your reply. I did use CPanel in my file manager, and like you, have

never had a problem editing there until now. (I read the above link for old topic)

Here's my problem ... I've been trying to restore a backed up file, but my session keeps

timeing out. Question ... is there another way that I can correct the application_top file? If you

have a copy of the snippet of the code for line 232, if I edited via the Admin/File Manager, would

that work? Please forgive as this is new to me here and am stuck in many places trying to get

my site finished and up live.

 

Thanks for your help

Link to comment
Share on other sites

Hi Knifeman;

Thank you very much for your reply. I did use CPanel in my file manager, and like you, have

never had a problem editing there until now. (I read the above link for old topic)

Here's my problem ... I've been trying to restore a backed up file, but my session keeps

timeing out. Question ... is there another way that I can correct the application_top file? If you

have a copy of the snippet of the code for line 232, if I edited via the Admin/File Manager, would

that work? Please forgive as this is new to me here and am stuck in many places trying to get

my site finished and up live.

 

Thanks for your help

Do not use the admin file manger. It is worse than cpanel. I saw a post, today I think, that said the upgraded version works, but most everybody here has said do not use the admin file manger.

 

Are you restoring the entire site or just one file? With an FTP program, you should be able to upload your application_top in under a minute.

 

Tim

Link to comment
Share on other sites

Do not use the admin file manger. It is worse than cpanel. I saw a post, today I think, that said the upgraded version works, but most everybody here has said do not use the admin file manger.

 

Are you restoring the entire site or just one file? With an FTP program, you should be able to upload your application_top in under a minute.

 

Tim

 

 

Hi Tim;

Thanks ... I'll remember not to use the admin file manager.

I would say just restoring the application_top file would probably do the trick. But, being the

dumb newbie that I am lol, I don't know where to find the individual files that have been backed

up. Could you point me in the right direction so I don't crack my head too hard fumbleing around

in the dark? lol

 

Thanks

Link to comment
Share on other sites

Hi Tim;

Thanks ... I'll remember not to use the admin file manager.

I would say just restoring the application_top file would probably do the trick. But, being the

dumb newbie that I am lol, I don't know where to find the individual files that have been backed

up. Could you point me in the right direction so I don't crack my head too hard fumbleing around

in the dark? lol

 

Thanks

If you made a backup of the site with cpanel, you can download it to your hard drive as a zip file. Unzip and extract includes/application_top.php

 

If your site has not been modified, you can download the entire oscommerce program and extract the file from there.

 

I will post the pertinent part of mine in a few minutes. No need to post it all as mine has been heavily modded.

 

Tim

Link to comment
Share on other sites

// verify the browser user agent if the feature is enabled
 if (SESSION_CHECK_USER_AGENT == 'True') {
$http_user_agent = getenv('HTTP_USER_AGENT');
if (!tep_session_is_registered('SESSION_USER_AGENT')) {
  $SESSION_USER_AGENT = $http_user_agent;
  tep_session_register('SESSION_USER_AGENT');
}

if ($SESSION_USER_AGENT != $http_user_agent) {
  tep_session_destroy();
  tep_redirect(tep_href_link(FILENAME_LOGIN));
}
 }

// verify the IP address if the feature is enabled
 if (SESSION_CHECK_IP_ADDRESS == 'True') {
$ip_address = tep_get_ip_address();
if (!tep_session_is_registered('SESSION_IP_ADDRESS')) {
  $SESSION_IP_ADDRESS = $ip_address;
  tep_session_register('SESSION_IP_ADDRESS');
}

if ($SESSION_IP_ADDRESS != $ip_address) {
  tep_session_destroy();
  tep_redirect(tep_href_link(FILENAME_LOGIN));
}
 }

// create the shopping cart & fix the cart if necesary

Link to comment
Share on other sites

// verify the browser user agent if the feature is enabled
 if (SESSION_CHECK_USER_AGENT == 'True') {
$http_user_agent = getenv('HTTP_USER_AGENT');
if (!tep_session_is_registered('SESSION_USER_AGENT')) {
  $SESSION_USER_AGENT = $http_user_agent;
  tep_session_register('SESSION_USER_AGENT');
}

if ($SESSION_USER_AGENT != $http_user_agent) {
  tep_session_destroy();
  tep_redirect(tep_href_link(FILENAME_LOGIN));
}
 }

// verify the IP address if the feature is enabled
 if (SESSION_CHECK_IP_ADDRESS == 'True') {
$ip_address = tep_get_ip_address();
if (!tep_session_is_registered('SESSION_IP_ADDRESS')) {
  $SESSION_IP_ADDRESS = $ip_address;
  tep_session_register('SESSION_IP_ADDRESS');
}

if ($SESSION_IP_ADDRESS != $ip_address) {
  tep_session_destroy();
  tep_redirect(tep_href_link(FILENAME_LOGIN));
}
 }

// create the shopping cart & fix the cart if necesary

 

 

 

I got it .... finally (Happy Dance :D ) I've been stuck on that dang thing for almost 2 days lol.

Remind me not to go fussing in that file anymore lol. Now I'll see if I can get a new set of buttons

to show up. Sigh .... will I ever get this site done??? lol

Thank you, thank you for your help Tim. btw ... I love your anime, cool pic

 

Hugs, Karen

Link to comment
Share on other sites

I got it .... finally (Happy Dance :D ) I've been stuck on that dang thing for almost 2 days lol.

Remind me not to go fussing in that file anymore lol. Now I'll see if I can get a new set of buttons

to show up. Sigh .... will I ever get this site done??? lol

Thank you, thank you for your help Tim. btw ... I love your anime, cool pic

 

Hugs, Karen

Glad I could help. I know the feeling of being on both ends of this forum.

 

Need new buttons? check out this site

button generator

Link to comment
Share on other sites

Glad I could help. I know the feeling of being on both ends of this forum.

 

Need new buttons? check out this site

button generator

 

 

That's where I made my new buttons. But there's now install instructions

with the d/l. I did find the file that holds the original button gifs (admin/includes/languages/english/images/buttons) and uploaded the

new button gifs, but I'm still showing the old buttons on my site.

Is there anything else that I need to do to replace the old buttons?

 

Hugs, Karen

Link to comment
Share on other sites

That's where I made my new buttons. But there's now install instructions

with the d/l. I did find the file that holds the original button gifs (admin/includes/languages/english/images/buttons) and uploaded the

new button gifs, but I'm still showing the old buttons on my site.

Is there anything else that I need to do to replace the old buttons?

 

Hugs, Karen

Karen,

 

If you overwrote your old files, then you should be set. Delete any cached and temp files on your home computer. Your browser may not be getting the new pages. I would ftp one of the buttons back to your computer and view it. Is it the new one or an old one?

 

Tim

Link to comment
Share on other sites

Karen,

 

If you overwrote your old files, then you should be set. Delete any cached and temp files on your home computer. Your browser may not be getting the new pages. I would ftp one of the buttons back to your computer and view it. Is it the new one or an old one?

 

Tim

 

Hi Tim;

 

Sorry, this is first chance I've had to get online today. Been a rough day lol. Hope yours

went well.

 

Ok .... here comes the newbie question of the day .... how do I overwrite the files for the

buttons? I have the buttons d/l'd in 2 places, in loading them into the button folder for the

cart, and I also have them in a file when I opened the zip on my h/d.

 

Hugs, Karen

Link to comment
Share on other sites

Hi Tim;

 

Sorry, this is first chance I've had to get online today. Been a rough day lol. Hope yours

went well.

 

Ok .... here comes the newbie question of the day .... how do I overwrite the files for the

buttons? I have the buttons d/l'd in 2 places, in loading them into the button folder for the

cart, and I also have them in a file when I opened the zip on my h/d.

 

Hugs, Karen

Link to comment
Share on other sites

Hi Tim;

 

Sorry, this is first chance I've had to get online today. Been a rough day lol. Hope yours

went well.

 

Ok .... here comes the newbie question of the day .... how do I overwrite the files for the

buttons? I have the buttons d/l'd in 2 places, in loading them into the button folder for the

cart, and I also have them in a file when I opened the zip on my h/d.

 

Hugs, Karen

Karen,

 

If you unzipped them to your hard drive, you should have X number of files all with the exact names as those that are currently in your buttons image folder online. When you upload the new buttons, you should be prompted "do you wish to overwrite" When you say yes, they will be written over by the new ones. How are you uploading them now? Through FTP or Cpanel or what?

 

You may want to download the old ones first, save them to your hard drive in a separate folder, then you will have them if you decide to go back to them.

 

Tim

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...