Jump to content

Problems with ViewOrders.inc.php


Guest griffweb

Recommended Posts

Guest griffweb

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mogageoc/public_html/shop/includes/content/viewOrder.inc.php on line 2

Parse error: syntax error, unexpected T_STRING in /home/mogageoc/public_html/shop/includes/content/viewOrder.inc.php on line 2

I get the above error when someone goes into view their order. I have an out of the box unmodded viewOrder.inc.php file and it still occurs.

I have searched the site and see some other references to this error but all worked in a different direction.

Here is the code:

<?php

/*

+--------------------------------------------------------------------------

| CubeCart v3.0.17

| ========================================

| by Alistair Brookbanks

| CubeCart is a Trade Mark of Devellion Limited

| Copyright Devellion Limited 2005 - 2006. All rights reserved.

| Devellion Limited,

| 5 Bridge Street,

| Bishops Stortford,

| HERTFORDSHIRE.

| CM23 2JU

| UNITED KINGDOM

| http://www.devellion.com

| UK Private Limited Company No. 5323904

| ========================================

| Web: http://www.cubecart.com

| Date: Tuesday, 17th July 2007

| Email: sales (at) cubecart (dot) com

| License Type: CubeCart is NOT Open Source Software and Limitations Apply

| Licence Info: http://www.cubecart.com/site/faq/license.php

+--------------------------------------------------------------------------

| viewOrder.inc.php

| ========================================

| Displays the Customers Specific Order

+--------------------------------------------------------------------------

*/

if (eregi(".inc.php",$HTTP_SERVER_VARS['PHP_SELF']) || eregi(".inc.php",$_SERVER['PHP_SELF'])) {

echo "<html>\r\n<head>\r\n<title>Forbidden 403</title>\r\n</head>\r\n<body><h3>Forbidden 403</h3>\r\nThe document you are requesting is forbidden.\r\n</body>\r\n</html>";

exit;

}

$view_order=new XTemplate ("skins/".$config['skinDir']."/styleTemplates/content/viewOrder.tpl");

$view_order->assign("LANG_YOUR_VIEW_ORDER",$lang['front']['viewOrder']['order_no']." ".treatGet($_GET['cart_order_id']));

$order = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_order_sum INNER JOIN ".$glob['dbprefix']."CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix']."CubeCart_customer.customer_id WHERE ".$glob['dbprefix']."CubeCart_order_sum.cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])." AND ".$glob['dbprefix']."CubeCart_order_sum.customer_id=".$db->mySQLsafe($ccUserData[0]['customer_id']));

------ Cut --------------

Any ideas???

Mike

Link to comment
Share on other sites

That's a weird one. Line 2 is that which starts a block of comments. It's supposed to be slash-asterisk. But the PHP parser is finding the backslash.

Do you have anything unique in the installation of PHP for the store's site?

Link to comment
Share on other sites

Guest griffweb

That's a weird one. Line 2 is that which starts a block of comments. It's supposed to be slash-asterisk. But the PHP parser is finding the backslash.

Do you have anything unique in the installation of PHP for the store's site?

Nothing out of the ordinary. Funny thing is, all other files seem to be working fine. It is just this file. I have beat my head against the wall and tried everything..

Mike

Link to comment
Share on other sites

Do you have this problem with everyone who views their order, or just one particular person?

Can you capture the URL that shows when you hover over the link that you would have clicked on just before getting this error?

You are going to have to spend some time looking at the raw data in your orders table. You will be looking for data (or the record as a whole) that may contain an unusually high number of single quotes (apostrophes) - or ANY single or double quotes that are 'escaped' by using a backslash.

Link to comment
Share on other sites

Guest griffweb

Do you have this problem with everyone who views their order, or just one particular person?

Can you capture the URL that shows when you hover over the link that you would have clicked on just before getting this error?

You are going to have to spend some time looking at the raw data in your orders table. You will be looking for data (or the record as a whole) that may contain an unusually high number of single quotes (apostrophes) - or ANY single or double quotes that are 'escaped' by using a backslash.

I fixed it by going back to V3.0.10's viewOrder.inc.php file. Not sure why, but it works. I think it might have to do with a mod in the database where I added a field to the customer information. It is possible that the file would not display the data correctly without adding this field back to the View Order code. Although, looking at the error message doesn't indicate that at all. For now, it displays correctly so I will chalk it up as fixed.

Thanks for the help and the reply.

Mike

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...