If this is your first visit, check our documentation. To post, register or login.
Forums / Installing Zen Cart / Installing on a Windows Server / unexpected T_STRING in class.zcConfigureFileReader.php

unexpected T_STRING in class.zcConfigureFileReader.php

Started by julian_oliva_cb on 5 Jul 2016, 9:23 AM · Views: 6,699

Results 1 to 20 of 20
5 Jul 2016, 9:23 AM
#1
julian_oliva_cb avatar

julian_oliva_cb

New Zenner

Join Date:
Jul 2016
Location:
TOLEDO ESPAÑA
Posts:
11
Plugin Contributions:
0

unexpected T_STRING in class.zcConfigureFileReader.php

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/julianoliva/www/carro/zc_install/includes/classes/class.zcConfigureFileReader.php on line 20

5 Jul 2016, 10:30 AM
#2
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: unexpected T_STRING in class.zcConfigureFileReader.php

Julian Oliva CB:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/julianoliva/www/carro/zc_install/includes/classes/class.zcConfigureFileReader.php on line 20

First time I hear/see that happening, did more than 20 (most likely more) 1.5.5a installs since release.

You may want to download a fresh copy of the 1.5.5a file system and try your installation with that new / fresh file set.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

5 Jul 2016, 12:05 PM
#3
julian_oliva_cb avatar

julian_oliva_cb

New Zenner

Join Date:
Jul 2016
Location:
TOLEDO ESPAÑA
Posts:
11
Plugin Contributions:
0

Re: unexpected T_STRING in class.zcConfigureFileReader.php

it´s the third time I try, and all the time it´s the same error

5 Jul 2016, 1:54 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: unexpected T_STRING in class.zcConfigureFileReader.php

What version of PHP are you running? It "sounds like" you're running a variant of PHP 4.x.

5 Jul 2016, 4:31 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: unexpected T_STRING in class.zcConfigureFileReader.php

Agreed. It's rejecting the PHP keyword "protected", which was added in PHP 5. So that means the site must be running an ancient version of PHP.
You'll need a modern version of PHP (5.6 is recommended) to use Zen Cart, or any other modern system for that matter.

.
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.

5 Jul 2016, 4:35 PM
#6
julian_oliva_cb avatar

julian_oliva_cb

New Zenner

Join Date:
Jul 2016
Location:
TOLEDO ESPAÑA
Posts:
11
Plugin Contributions:
0

Re: unexpected T_STRING in class.zcConfigureFileReader.php

PHP 5.6.x php-cgi is the version

5 Jul 2016, 4:40 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: unexpected T_STRING in class.zcConfigureFileReader.php

There's nothing wrong with the syntax in the file. See line 20 here: https://github.com/zencart/zencart/blob/v155/zc_install/includes/classes/class.zcConfigureFileReader.php

.
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.

5 Jul 2016, 5:10 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: unexpected T_STRING in class.zcConfigureFileReader.php

Julian Oliva CB:

PHP 5.6.x php-cgi is the version
I'm pretty sure that's not what your Zen Cart folder is using. Otherwise you wouldn't get the message you're reporting.

To find out what specific PHP setup is actually being used, edit your /zc_install/index.php file, and on line 2 add a new line:

phpinfo();die();
```Then run zc_install again, and it should report a ton of info about your server.

Who's your hosting company?

.
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.

5 Jul 2016, 5:22 PM
#9
julian_oliva_cb avatar

julian_oliva_cb

New Zenner

Join Date:
Jul 2016
Location:
TOLEDO ESPAÑA
Posts:
11
Plugin Contributions:
0

Re: unexpected T_STRING in class.zcConfigureFileReader.php

I see, The syntax are ok, but......

6 Jul 2016, 9:17 AM
#10
julian_oliva_cb avatar

julian_oliva_cb

New Zenner

Join Date:
Jul 2016
Location:
TOLEDO ESPAÑA
Posts:
11
Plugin Contributions:
0

Re: unexpected T_STRING in class.zcConfigureFileReader.php

PHP Version 5.6.16

6 Jul 2016, 12:41 PM
#11
julian_oliva_cb avatar

julian_oliva_cb

New Zenner

Join Date:
Jul 2016
Location:
TOLEDO ESPAÑA
Posts:
11
Plugin Contributions:
0

Re: unexpected T_STRING in class.zcConfigureFileReader.php

My hosting company are phpwebhosting

6 Jul 2016, 1:32 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: unexpected T_STRING in class.zcConfigureFileReader.php

Please post the top 80-100 lines of information from the phpinfo() output you added to zc_install/index.php

.
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.

6 Jul 2016, 3:59 PM
#13
julian_oliva_cb avatar

julian_oliva_cb

New Zenner

Join Date:
Jul 2016
Location:
TOLEDO ESPAÑA
Posts:
11
Plugin Contributions:
0

Re: unexpected T_STRING in class.zcConfigureFileReader.php

logotipo de PHP
PHP Versión 5.6.16

Sistema astro.phpwebhosting.com Linux 2.6.18-371.6.1.el5.028stab112.3 # 1 SMP Jue Mar 27 de 2014 19:32:28 MSK i686
La fecha de construcción Nov 27 de el año 2015 13:59:08
comando de configuración './configure' '--enable-Estática' '--enable-cli' '--with-mysql' '--with-mysqli' '--enable-bcmath' '--enable-calendar' '- con-gd '' --con-jpeg-dir = / usr / local '' --con-png-dir = / usr / local '' --with-zlib-dir = / usr / include '' --con -freetype-dir = / usr / lib '' gdbm --con-= / usr / include '' --with-imap '' --with-imap-ssl '' --con-gettext '' --enable- enchufes '' --with-mcrypt '' --con-xmlrpc '' --con-rizo '' --enable-ftp '' --con-Kerberos '' --with-iconv '' --con-pera '' --enable-exif '' --enable-mbstring '' --with-pdo-mysql '' --enable-zip '' --enable-soap '' --con-XSL '' --enable- dom '' --enable-xml '' --enable-DOP '' --con-DOP-sqlite '' --with-config-file-path = / etc '' --enable-json '
API de servidor CGI / FastCGI
Soporte directorio virtual discapacitado
Archivo de configuración (php.ini) Path / etc
Archivo de configuración cargado /etc/php.ini
Lea este directorio para los archivos .ini adicionales (ninguna)
archivos .ini adicionales analizados (ninguna)
PHP API 20131106
Extensiones de PHP 20131226
Zend Extensión 220131226
Zend Extensión Build API220131226, NTS
PHP Extensión Build API20131226, NTS
Construir depuración no
Seguridad para subprocesos discapacitado
Manipulación de la señal de Zend discapacitado
Zend Administrador de memoria habilitado
Zend Soporte de varios bytes proporcionado por mbstring
Soporte IPv6 habilitado
Soporte DTrace discapacitado
Secuencias PHP registrados compress.zlib, php, archivo, glob, datos, http, ftp, Phar, postal
Registradas en los transportes de socket Stream TCP, UDP, Unix, UdG
Registrados Stream Filtros zlib. *, convert.iconv. *, mcrypt. *, mdecrypt. *, string.rot13, string.toupper, string.tolower, string.strip_tags, convertir. *, consumido, dechunk
logotipo de Zend Este programa hace uso del motor de Zend lenguaje de scripts:
Zend Engine V2.6.0, Copyright (c) 1998-2015 Zend Technologies

6 Jul 2016, 4:03 PM
#14
drbyte avatar

drbyte

Sensei

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

Re: unexpected T_STRING in class.zcConfigureFileReader.php

Okay. Ask your hosting company to explain why their PHP 5.6 configuration doesn't handle standard PHP OOP syntax.
This is a server issue, not a Zen Cart issue.

.
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.

7 Jul 2016, 10:51 AM
#15
julian_oliva_cb avatar

julian_oliva_cb

New Zenner

Join Date:
Jul 2016
Location:
TOLEDO ESPAÑA
Posts:
11
Plugin Contributions:
0

Re: unexpected T_STRING in class.zcConfigureFileReader.php

I´m talking with my hosting company and the traslate my domain other server, I hope it´s is the solution.
Thaks for the help

9 Jul 2016, 4:15 PM
#16
julian_oliva_cb avatar

julian_oliva_cb

New Zenner

Join Date:
Jul 2016
Location:
TOLEDO ESPAÑA
Posts:
11
Plugin Contributions:
0

Re: unexpected T_STRING in class.zcConfigureFileReader.php

It solved, was a server problem and the version of Mysql
Now i have the next problems:
Gzip Extension in PHP is not enabled and I´m loking for to tutorial and FAQs but Idon´t found

9 Jul 2016, 9:41 PM
#17
vdecals avatar

vdecals

Zen Follower

Join Date:
Jun 2009
Location:
Sparta, TN
Posts:
166
Plugin Contributions:
0

Re: unexpected T_STRING in class.zcConfigureFileReader.php

I think it's referring to your Admin/Configuration/GZip Compression :)

My store - closed 12/05/2023
1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

10 Jul 2016, 7:28 PM
#18
drbyte avatar

drbyte

Sensei

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

Re: unexpected T_STRING in class.zcConfigureFileReader.php

Julian Oliva CB:

Gzip Extension in PHP is not enabled and I´m loking for to tutorial and FAQs but Idon´t found
That's a PHP configuration setting, which your hosting company needs to fix. Ref: http://php.net/manual/en/zlib.configuration.php

.
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.

11 Jul 2016, 7:06 PM
#19
julian_oliva_cb avatar

julian_oliva_cb

New Zenner

Join Date:
Jul 2016
Location:
TOLEDO ESPAÑA
Posts:
11
Plugin Contributions:
0

Re: unexpected T_STRING in class.zcConfigureFileReader.php

thanks I Try

13 Jul 2016, 3:57 PM
#20
julian_oliva_cb avatar

julian_oliva_cb

New Zenner

Join Date:
Jul 2016
Location:
TOLEDO ESPAÑA
Posts:
11
Plugin Contributions:
0

Re: unexpected T_STRING in class.zcConfigureFileReader.php

my hosting company are making several changes