Guest Posted March 5, 2006 Posted March 5, 2006 Hi I am trying to install this contribution and its sort of working ok. The configuration in OsCommerce is working but when i try to login or create an account i am getting an error which i will list below.. Parse error: parse error, unexpected T_REQUIRE in /home/xtremein/public_html/store/create_account.php on line 4 And this is the top page of that file: <?php /* $Id: create_account.php,v 1.65 2003/06/09 23:03:54 hpdl Exp $ adapted for Separate Pricing Per Customer 2005/02/14 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); i am using EditPlus to verify the line which i have highlighted in bold.. this is the same error i am getting with the login page too... Can anyone give advice on this?!? Its getting pretty urgent that i finish this off now and start getting the shop online... Quote
Guest Posted March 6, 2006 Posted March 6, 2006 is this a daft easy question that nobody is answering it?!? sorry but i am a real newbie with all of this.. i have found that installing this has messed with the whole format of my site too and am also finding other errors now in the site... Quote
Wendy James Posted March 6, 2006 Posted March 6, 2006 I do not see anything wrong with the code you pasted here. Maybe that is why no one has posted anything.. because they do not know the answer. Only thing I can suggest is to post more code from the top of the page than you did. Quote Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Guest Posted March 6, 2006 Posted March 6, 2006 Hi Wendy, thx for getting back to me.. ok cool.. here is more of the top of the file.. :( <?php /* $Id: create_account.php,v 1.65 2003/06/09 23:03:54 hpdl Exp $ adapted for Separate Pricing Per Customer 2005/02/14 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // needs to be included earlier to set the success message in the messageStack require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT); $process = false; if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) { $process = true; if (ACCOUNT_GENDER == 'true') { if (isset($HTTP_POST_VARS['gender'])) { $gender = tep_db_prepare_input($HTTP_POST_VARS['gender']); } else { $gender = false; } } $firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']); $lastname = tep_db_prepare_input($HTTP_POST_VARS['lastname']); if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS['dob']); $email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']); // BOF Separate Pricing Per Customer, added: field for tax id number if (ACCOUNT_COMPANY == 'true') { $company = tep_db_prepare_input($HTTP_POST_VARS['company']); $company_tax_id = tep_db_prepare_input($HTTP_POST_VARS['company_tax_id']); } // EOF Separate Pricing Per Customer, added: field for tax id number $street_address = tep_db_prepare_input($HTTP_POST_VARS['street_address']); if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($HTTP_POST_VARS['suburb']); $postcode = tep_db_prepare_input($HTTP_POST_VARS['postcode']); $city = tep_db_prepare_input($HTTP_POST_VARS['city']); if (ACCOUNT_STATE == 'true') { $state = tep_db_prepare_input($HTTP_POST_VARS['state']); if (isset($HTTP_POST_VARS['zone_id'])) { $zone_id = tep_db_prepare_input($HTTP_POST_VARS['zone_id']); } else { $zone_id = false; } } $country = tep_db_prepare_input($HTTP_POST_VARS['country']); $telephone = tep_db_prepare_input($HTTP_POST_VARS['telephone']); $fax = tep_db_prepare_input($HTTP_POST_VARS['fax']); if (isset($HTTP_POST_VARS['newsletter'])) { $newsletter = tep_db_prepare_input($HTTP_POST_VARS['newsletter']); } else { $newsletter = false; } $password = tep_db_prepare_input($HTTP_POST_VARS['password']); $confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']); $error = false; if (ACCOUNT_GENDER == 'true') { if ( ($gender != 'm') && ($gender != 'f') ) { $error = true; $messageStack->add('create_account', ENTRY_GENDER_ERROR); } } if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_FIRST_NAME_ERROR); } if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) { $error = true; Quote
Jan Zonjee Posted March 6, 2006 Posted March 6, 2006 Hi Wendy, thx for getting back to me.. ok cool.. here is more of the top of the file.. Wendy is right, everybody who sees this will be puzzled, there is nothing wrong. The only thing I can think of is that you use something like UTF-8 for the character encoding of your PHP files. I often find that when I copy and paste text from a website into a PHP file I get the strangest errors. If I look in TextWrangler (a Mac program) and tell it to show invisibles there are strange characters, totally invisible (normally) but causing all kinds of absurd errors. When I save it as ASCII everything is fine again. Opening and saving in Notepad (if you use Windows) might do that trick also. No guarantee that this is the source of your problems of course.... Quote
Guest Posted March 6, 2006 Posted March 6, 2006 :( Thx JanZ... man this is going to be a pain i can see.. i used 'Compare it' to make the various changes to the files so i don't know if that could've been the problem!? I will try again and do a full manual install and hopefully that will help.. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.