Forums / Upgrading from 1.3.x to 1.3.9 / Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

Locked

Started by lmichael on 17 Nov 2010, 5:25 PM · Views: 10,567

Results 1 to 20 of 21
This thread is locked. New replies are disabled.
17 Nov 2010, 5:25 PM
#1
lmichael avatar

lmichael

New Zenner

Join Date:
Nov 2006
Location:
Mansfield, Ohio
Posts:
26
Plugin Contributions:
0

Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

I am having the same issue with payment modules after upgrading from v137 to v139h.
The modules are listed in Catalog > Modules > Payment. Shipping Zones have been defined.

These modules are present with red dots.
Authorize.net
Authorize.net
Authorize.net - eCheck
Ceon Manual Card v2.0.0
Cash on Delivery cod
The Zen Cart FREE CHARGE CARD
FirstData/Linkpoint/YourPay API
Check/Money Order

The option to install the modules is not present. Check/Money Order cannot be enabled either.
I installed the Ceon module hoping it would solve the problem but there is still no option to install.
In addition, this message is also generated at checkout;

Sorry, we are not accepting payments from your region at this time.

Any suggestions?
Thanks,
Michael

17 Nov 2010, 10:14 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

Lmichael:

I am having the same issue with payment modules after upgrading from v137 to v139h.
The modules are listed in Catalog > Modules > Payment. Shipping Zones have been defined.

These modules are present with red dots.
Authorize.net
Authorize.net
Authorize.net - eCheck
Ceon Manual Card v2.0.0
Cash on Delivery cod
The Zen Cart FREE CHARGE CARD
FirstData/Linkpoint/YourPay API
Check/Money Order

The option to install the modules is not present. Check/Money Order cannot be enabled either.
I installed the Ceon module hoping it would solve the problem but there is still no option to install.
In addition, this message is also generated at checkout;

Sorry, we are not accepting payments from your region at this time.

Any suggestions?
Thanks,
Michael

First, look in the /cache directory ... do you see any debug logs for the Admin?

Sort them in order by date and see what they read, the current by date first ...

It sounds like you have a bad, corrupt, missing or duplicate file ...

NOTE: these are auto loading directories and backup files will attempt to load and break things ...

Once you see the right Panel again ... Stop! ...

Next steps ... go to Modules ... Payment ... and edit any module installed and save the settings to NotePad ... these are about to be wiped out ...

Click on REMOVE ...

Click on INSTALL ...

Now EDIT and re-configure them ...

Next steps ... go to Modules ... Shipping ... and edit any module installed and save the settings to NotePad ... these are about to be wiped out ...

Click on REMOVE ...

Click on INSTALL ...

Now EDIT and re-configure them ...

Next steps ... go to Modules ... Order Total ... and edit any module installed and save the settings to NotePad ... these are about to be wiped out ...

Click on REMOVE ...

Click on INSTALL ...

Now EDIT and re-configure them ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 Nov 2010, 9:00 PM
#3
lmichael avatar

lmichael

New Zenner

Join Date:
Nov 2006
Location:
Mansfield, Ohio
Posts:
26
Plugin Contributions:
0

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

[quote=Ajeh;961634]First, look in the /cache directory ... do you see any debug logs for the Admin?

Sort them in order by date and see what they read, the current by date first ...

It sounds like you have a bad, corrupt, missing or duplicate file ...

NOTE: these are auto loading directories and backup files will attempt to load and break things ...

Once you see the right Panel again ... Stop! ...

Next steps ... go to Modules ... Payment ... and edit any module installed and save the settings to NotePad ... these are about to be wiped out ...
######################################################################___

I have received the following error messages in the debug utility.
v1.3.9h
[15-Nov-2010 17:32:03] PHP Warning: htmlspecialchars() expects at most 3 parameters, 4 given in
/home/*/public_html/MYSTORE/adminnew/includes/functions/general.php on line 39
[16-Nov-2010 17:20:06] same
[17-Nov-2010 11:49:37] same
[18-Nov-2010 11:26:23] same

I replaced the file to check for corruption above with the original file from v1.3.8 full set.
PHP Warning: htmlspecialchars() expects at most 3 parameters, 4 given in
/home/*/public_html/MYSTORE/adminnew/includes/functions/general.php on line 39

The error disappeared

I did the same with other files in the debug utility and replaced with v138 files

/MYSTORE/adminnew/includes/modules/product/collect_info.php on line 412
/MYSTORE/adminnew/includes/modules/product/collect_info.php on line 299
/MYSTORE/adminnew/includes/modules/product/collect_info.php on line 433
and
/MYSTORE/includes/modules/create_account.php on line 391

Result errors disappeared. GREAT!

The final error message;
[15-Nov-2010 17:33:43] PHP Parse error: syntax error, unexpected T_STRING in
/home/*/public_html/MYSTORE/includes/languages/english/modules/payment/paypal.php on line 24

Replacing the file did not work.

In my admin>modules>payment there is still no option to install the modules, but they are all still listed.
If I click on any of the modules nothing happens but the error message generated from debug utility is;
MYSTORE/includes/languages/english/modules/payment/paypal.php on line 24

This is still a in a test upgrade folder to work out these issues. Every thing seems to work fine create account, checkout, email confirmation etc... accept for the payment modules.
Thanks so much for your help.
michael

18 Nov 2010, 9:34 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

Please peek at this thread and apply the changes from post #6 for when using older than php v5.2.3 ...
http://www.zen-cart.com/forum/showthread.php?t=153143

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

19 Nov 2010, 4:48 PM
#5
lmichael avatar

lmichael

New Zenner

Join Date:
Nov 2006
Location:
Mansfield, Ohio
Posts:
26
Plugin Contributions:
0

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

Ajeh:

Please peek at this thread and apply the changes from post #6 for when using older than php v5.2.3 ...
http://www.zen-cart.com/forum/showthread.php?t=153143

Thanks Ajeh for the support.

I went to the thread and applied the changes. I removed "TRUE" carefully in each file to insure integrity of the PHP files.

My payment modules are still listed but cannot be enabled or installed. Everything else seems to work ok..

I understand the PCI compliance issue and working to update my server to PHP5x

I am currently running the older version PHP4x but wanted to update to PHP5 after completing the zc upgrades. Unfortunately still have 3 stores running 1.3.7 and was concerned about updating to PHP5 since 1.3.7 is not compatible with 5.

I was getting hacked and cleaning files and monitoring constantly. Have cleaned files and folders, changed admin directory name and passwords. So far, OK.

Still get this error when trying to enable any of the Payment modules in 1.3.9h, even money order;
[19-Nov-2010 11:11:13] PHP Parse error: syntax error, unexpected T_STRING in /home/renegade/public_html/BOOMUPGRD/includes/languages/english/modules/payment/paypal.php on line 24

Should I (can I) upgrade from 1.3.7 to 1.3.8 first, upgrade to the latest PHP5 release and then update to 1.3.9h? Am under lots of pressure as holiday season approaches. The offline credit card module is no longer showing at checkout on these versions even though it is enabled.

Thank You,
Michael

19 Nov 2010, 5:27 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

Lmichael:

The final error message;
[15-Nov-2010 17:33:43] PHP Parse error: syntax error, unexpected T_STRING in
/home/*/public_html/MYSTORE/includes/languages/english/modules/payment/paypal.php on line 24

Replacing the file did not work.

What does this file read?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

19 Nov 2010, 5:35 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

Lmichael:

Should I (can I) upgrade from 1.3.7 to 1.3.8 first, upgrade to the latest PHP5 release and then update to 1.3.9h? Am under lots of pressure as holiday season approaches. The offline credit card module is no longer showing at checkout on these versions even though it is enabled.

Zen Cart v1.3.9h can run in php 4.3.2 or higher ...

You could upgrade to v1.3.9h and then to php 5.2.3 or higher after ...

NOTE: be sure to do full backups of both your database as well as your site ...

It is strongly recommended to upgrade a Development copy of your site and database and not your Live Site ... as in use a copy of the Live database into a new Developement database and a copy of your Live site in a new Development directory ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

19 Nov 2010, 5:47 PM
#8
lmichael avatar

lmichael

New Zenner

Join Date:
Nov 2006
Location:
Mansfield, Ohio
Posts:
26
Plugin Contributions:
0

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

Ajeh:

What does this file read?

Not sure what you mean. Should I post the code from this file?

public_html/MYSTORE/includes/languages/english/modules/payment/paypal.php on line 24

So you can see it?

19 Nov 2010, 5:51 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

That would be easiest ...

You could post just lines 20-30 if you like so that we can see the code above and below the error ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

19 Nov 2010, 6:11 PM
#10
lmichael avatar

lmichael

New Zenner

Join Date:
Nov 2006
Location:
Mansfield, Ohio
Posts:
26
Plugin Contributions:
0

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

Ajeh:

That would be easiest ...

You could post just lines 20-30 if you like so that we can see the code above and below the error ...

from notepad

19_ define('MODULE_PAYMENT_PAYPAL_TEXT_ADMIN_TITLE', 'PayPal Website Payments Standard - IPN');
20_
21_ define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_TITLE', 'PayPal');
22_
23_ if (IS_ADMIN_FLAG === true) {
24_
25_ define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<strong>PayPal Website Payments Standard (IPN)</strong> (Basic PayPal service)<br /><a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">Manage your PayPal account.</a><br /><br /><font color="green">Configuration Instructions:</font><br />1. <a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">Sign up for your PayPal account - click here.</a><br />2. In your PayPal account, under "Profile",<ul><li>set your <strong>Instant Payment Notification Preferences</strong> URL to:<br /><nobr><pre>'.str_replace('index.php?main_page=index','ipn_main_handler.php',zen_catalog_href_link(FILENAME_DEFAULT, '', 'SSL')) . '</pre></nobr><br />(If another valid URL is already entered, you may leave it alone.)<br /><span class="alert">Be sure that the Checkbox to enable IPN is checked!</span><br /><br /></li><li>in <strong>Website Payments Preferences</strong> set your <strong>Automatic Return URL</strong> to:<br /><nobr><pre>'.zen_catalog_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL',false).'</pre></nobr></li>' . (defined('MODULE_PAYMENT_PAYPALSTD_STATUS') ? '' : '<li>... and click "install" above to enable PayPal Standard support... and "edit" to tell Zen Cart your PayPal settings.</li>') . '</ul><font color="green"><hr /><strong>Requirements:</strong></font><br /><hr /><strong>PayPal Account</strong> (<a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">click to signup</a>)<br /><strong><strong>Port 80</strong> is used for bidirectional communication with the gateway, so must be open on your host's router/firewall<br /><strong>Settings</strong> must be configured as described above.' );
26_
27_
28_
29_ } else {
30_
31_ define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<strong>PayPal</strong>');
32_
33_ }

19 Nov 2010, 6:23 PM
#11
lmichael avatar

lmichael

New Zenner

Join Date:
Nov 2006
Location:
Mansfield, Ohio
Posts:
26
Plugin Contributions:
0

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

Ajeh:

Zen Cart v1.3.9h can run in php 4.3.2 or higher ...
You could upgrade to v1.3.9h and then to php 5.2.3 or higher after ...
NOTE: be sure to do full backups of both your database as well as your site ...
It is strongly recommended to upgrade a Development copy of your site and database and not your Live Site ... as in use a copy of the Live database into a new Developement database and a copy of your Live site in a new Development directory ...

I am doing this. Have ded.server with cPanel, WHM. The current upgrade with this store was successful, using new directory and restore of the original db. The store seems fully functional accept for the payment modules. I am a little slow at this and my clients will be very unhappy with too much downtime.

19 Nov 2010, 7:03 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

I cannot tell what you have there ...

Could you zip the file and then attach it here?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

19 Nov 2010, 7:25 PM
#13
lmichael avatar

lmichael

New Zenner

Join Date:
Nov 2006
Location:
Mansfield, Ohio
Posts:
26
Plugin Contributions:
0

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

file is attached

19 Nov 2010, 9:16 PM
#14
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

Change line 24 with:

  define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_LOGO', '<img src="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT . '" title="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT . '" />  ' .
                                                    '<span class="smallText">' . MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT . '</span>');

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

20 Nov 2010, 9:51 PM
#15
lmichael avatar

lmichael

New Zenner

Join Date:
Nov 2006
Location:
Mansfield, Ohio
Posts:
26
Plugin Contributions:
0

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

Ajeh,

I made the changes but received almost the same error. The error went from line 24 to line 26.

[20-Nov-2010 09:19:43] PHP Parse error: syntax error, unexpected ')' in /home/renegade/public_html/BOOMUPGRD/includes/languages/english/modules/payment/paypal.php on line 26

[19-Nov-2010 10:50:02] PHP Parse error: syntax error, unexpected T_STRING in /home/renegade/public_html/BOOMUPGRD/includes/languages/english/modules/payment/paypal.php on line 24

I have decided to abandon this installation/upgrade and start over.
Since I have the option of creating development directories and databases, I will be able to document in detail the process. I have read numerous articles and posts and feel more confident about starting over.

Thank you very much for your help.
Will be buying you a cup of coffee soon!
Michael:blush:

20 Nov 2010, 9:53 PM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

If you use the original version of that file that comes with a fresh Zen Cart install, then you won't have PHP errors with it unless your FTP program is mangling it during upload.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

20 Nov 2010, 9:55 PM
#17
lmichael avatar

lmichael

New Zenner

Join Date:
Nov 2006
Location:
Mansfield, Ohio
Posts:
26
Plugin Contributions:
0

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

I will give it a try. Thanks DrByte

20 Nov 2010, 10:02 PM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

If that doesn't work for you, then one or more other files are damaged on your server, in which case I'd start here: http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

20 Nov 2010, 10:17 PM
#19
lmichael avatar

lmichael

New Zenner

Join Date:
Nov 2006
Location:
Mansfield, Ohio
Posts:
26
Plugin Contributions:
0

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

I replaced it with the original from 1.3.9h and the error went back to line 24

[20-Nov-2010 17:00:17] PHP Parse error: syntax error, unexpected T_STRING in /home/renegade/public_html/BOOMUPGRD/includes/languages/english/modules/payment/paypal.php on line 24

Because I am fairly new at this, chances are, I have made an error during the installation. Since I have 4 other stores to go from v137 to v139 I am coming in with a new plan. I would like these stores to become operational so I can upgrade mysql and php from 4x to 5x.?

I am confident this will work this time.

Would you suggest starting a new thread if there are any issues or stay here?
Michael

20 Nov 2010, 11:30 PM
#20
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Parse error: syntax error, unexpected T_STRING in /includes/languages/.../paypal.php

Your issues appear to be related to incomplete merging of customizations when upgrading.
New issues would warrant a new thread.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.