Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-02-11 21:52:44

progre55
Member
Registered: 2006-05-02
Posts: 668

Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

I was attempting to upgrade an older site (4.07) to the latest TXP 4.5.4. When doing so, I received this message:

Parse error: syntax error, unexpected '=', expecting ')' in /home/xxxx/public_html/textpattern/lib/txplib_misc.php on line 875

In looking at a few posts I thought it may be the php version of the server — but in fact the server has on it php 5.3.19 —

Does anyone have an idea of why this error is being thrown —

When I revert back — site comes up without a hitch —-

progre55

Last edited by progre55 (2013-02-11 21:53:02)

Offline

#2 2013-02-12 00:47:03

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

Does your txplib_misc.php match the official one?


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#3 2013-02-12 13:12:24

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

MattD:

I will check — but I pulled it straight from the download on the site so not sure why it would not —-

progre55

Offline

#4 2013-02-12 13:55:41

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,398
Website GitHub Mastodon Twitter

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

Whenever I upgrade I check my diagnostics afterwards just to check that everything uploaded ok. I would check there first:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2013-02-12 15:39:35

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

Problem is the error message does not allow me to get into the admin to check diagnostics — it is the first thing on the screen — plain white screen with error on top —-

Offline

#6 2013-02-12 16:29:13

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,319

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

Nothing keeps you from ftp’ing over txplib_misc.php a second time …


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#7 2013-02-12 16:49:44

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

Agreed — that is what I will be doing this afternoon — should have additional information — once that is done —-

Offline

#8 2013-02-12 17:52:12

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,810
GitHub

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

Add this to .htaccess:

SetEnv PHP_VER 5_3

This forces PHP5.3 to be used, some shared servers have PHP4 and PHP5 installed in tandem.

Edited to force PHP 5.3 rather than PHP 5

Last edited by gaekwad (2013-02-12 17:54:22)

Offline

#9 2014-10-16 11:01:01

ingleslenobel
Member
Registered: 2014-10-16
Posts: 88

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

I have just installed a fresh new textpattern via fasthosts self installer and I have this same error. I added SetEnv PHP_VER 5_3 in the root .htaccess but this didn’t do anything. Any other solutions?

Fyi, * PHP Version 5.4.14 * Apache 2.2.15

Thank you

Last edited by ingleslenobel (2014-10-16 11:04:05)

Offline

#10 2014-10-16 11:46:26

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,810
GitHub

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

Make a file called petelikesbananas.php in the root of your site with this in it:

<?php phpinfo(); ?>

Then run it in a browser. There will be a version toward the top of the page. What is it?

Offline

#11 2014-10-16 11:50:08

ingleslenobel
Member
Registered: 2014-10-16
Posts: 88

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

Hello again Pete, looks like they upgraded it from last time I asked, now 5.4.33

Offline

#12 2014-10-16 12:10:50

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,810
GitHub

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

PHP 5.4.33 should be OK. When you log in to the administration area, what version is shown in the footer?

Offline

#13 2014-10-16 12:19:16

ingleslenobel
Member
Registered: 2014-10-16
Posts: 88

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

I have: Textpattern CMS · 4.5.5 (+ Logged in as admin, Logout)

Offline

#14 2014-10-16 12:23:31

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,810
GitHub

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

First thing is to update that to 4.5.7 – the Fasthosts installer is out of date, and there’re some fixes that were rolled into 4.5.7 that are important. Have you updated a Textpattern manually before now? Info here if you need it.

Offline

#15 2014-10-16 12:41:38

ingleslenobel
Member
Registered: 2014-10-16
Posts: 88

Re: Upgrade from 4.07: Parse error: syntax error, unexpected '=', expect

Yay, this did it! Diagnostic all ok now… thank you again!!

gaekwad wrote #284870:

First thing is to update that to 4.5.7 – the Fasthosts installer is out of date, and there’re some fixes that were rolled into 4.5.7 that are important. Have you updated a Textpattern manually before now? Info here if you need it.

Offline

Board footer

Powered by FluxBB