ladykaren Posted October 6, 2006 Posted October 6, 2006 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?
knifeman Posted October 6, 2006 Posted October 6, 2006 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
ladykaren Posted October 6, 2006 Author Posted October 6, 2006 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
knifeman Posted October 6, 2006 Posted October 6, 2006 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
ladykaren Posted October 6, 2006 Author Posted October 6, 2006 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
knifeman Posted October 6, 2006 Posted October 6, 2006 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
knifeman Posted October 6, 2006 Posted October 6, 2006 // 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
ladykaren Posted October 6, 2006 Author Posted October 6, 2006 // 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
knifeman Posted October 6, 2006 Posted October 6, 2006 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
ladykaren Posted October 6, 2006 Author Posted October 6, 2006 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
knifeman Posted October 6, 2006 Posted October 6, 2006 That's where I made my new buttons. But there's now install instructionswith 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
ladykaren Posted October 8, 2006 Author Posted October 8, 2006 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
ladykaren Posted October 9, 2006 Author Posted October 9, 2006 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
knifeman Posted October 9, 2006 Posted October 9, 2006 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.