News:

Wondering if this will always be free?  See why free is better.

Main Menu

smf 2.1 install error in sources/querystring

Started by Sudhakar Arjunan, November 22, 2014, 07:15:32 PM

Previous topic - Next topic

Sudhakar Arjunan

Dear Team,

I was using 2.0.9.

Downloaded 2.1 large upgrade, overrighted my existing forum folder.

When i user browser to load forum.website.com, it shows me.

Parse error: syntax error, unexpected T_FUNCTION in C:\Inetpub\vhosts\website.com\httpdocs\forum\Sources\QueryString.php on line 627

in sources/querystring.php file - bolder one is 627

// Let's do something special for session ids!
if (defined('SID') && SID != '')
$buffer = preg_replace_callback('~"' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&))((?:board|topic)=[^#"]+?)(#[^"]*?)?"~', function ($m)
{
global $scripturl; return '"' . $scripturl . "/" . strtr("$m[1]", '&;=', '//,') . ".html?" . SID . (isset($m[2]) ? $m[2] : "") . '"';
}, $buffer);
else
$buffer = preg_replace_callback('~"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"~', function ($m)
{
global $scripturl; return '"' . $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? $m[2] : "") . '"';
}, $buffer );
}

// Return the changed buffer.
return $buffer;
}

?>
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Arantor

This would be because you have an old version of PHP, likely 5.2.17.

SMF 2.1 requires 5.3.8 or higher.

margarett

I have the feeling this will be the first of many support topics about this :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Sudhakar Arjunan

Team you are right.

currently in my windows server - PHP support (Run PHP as FastCGI Applicaiton , PHP version 5.2.17 ).

Luckily backed up the site with backup files and now the old 2.0.9 site is up. ( Since in windows dedicated server it was easy to restore - cut & paste )

Until i upgrade my windows server to 5.3.8, i will need to use my linux dedicated box to test the 2.1 . Since my apache upgraded to 2.2.29 and PHP is now 5.3.29 last week on linux dedicated server. ( is 5.3.29 is ok ? i guess it wont ! )

--- Yes i have read the system spec clearly but on excitement i missed to check the php version, thanks for pointing me.

Will upgrade my php version in windows server to 5.3.8 and try installing smf 2.1
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Arantor

5.3.8 is a *minimum*, not the recommended version. 5.3.28 is the recommended version if you're going for 5.3 branch, since that's the most recent (and the only one supported by PHP itself, 5.4.x is recommended if possible)

Sudhakar Arjunan

Since i use a managed dedicated server . I have informed that to give whichever is stable and above 5.3.8, also they replied as planning to take the server down for 5.4 php upgrade shortly.

After which i will try installing 2.1

Thank you team.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

JBlaze

I think the installer/upgrader should not allow installation if PHP < 5.3.8. Would for sure reduce the support requests.
Jason Clemons
Former Team Member 2009 - 2012

Arantor

I think the installer checks, not sure if the upgrades does, and if it does, it needs to have no dependencies before checking.

However, it is also a bit late by the time the upgrader is uploaded...

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori

we had discussed ways to test that the server has the correct php version but nothing was done so we can try to make sure users dont trash their old install and then find out they cant upgrade due to php version.

http://www.simplemachines.org/community/index.php?topic=523980.msg3709264#msg3709264

JBlaze

Quote from: Illori on November 23, 2014, 08:35:48 AM
we can try to make sure users dont trash their old install and then find out they cant upgrade due to php version.

This is why we always stress making backups before doing anything to their forum. If they can't manage to listen to that, it's their own fault.
Jason Clemons
Former Team Member 2009 - 2012

Sudhakar Arjunan

Dear team,

Got 2.1 beta 1 installed on my large forum with 2 lakh topics.

In our server upgraded php to 5.4 and the smf 2.1 upgrade from 2.0.9 went  smooth.

But my display page is generating 8000 error daily

Guest
Today at 19:18:35
157.55.39.9 
b87f8d1626d09b59d8e
Type of error: Undefined
8: Undefined index: member   http://forum.website.com/index.php?topic=80731.0
File: C:/Inetpub/vhosts/website.com/httpdocs/forum/Sources/Display.php
Line: 1372
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

JBlaze

I hope you didn't upgrade your live SMF install to 2.1 Beta 1...
Jason Clemons
Former Team Member 2009 - 2012

Arantor

Given how many mod threads he has asked for updates in, I bet he did...

JBlaze

Jason Clemons
Former Team Member 2009 - 2012


stmaxx

#16
Please note that many popular Hosts , have an option to upgrade your PHP version to 5.4.
But please read...when ever you change the PHP version, it changed things on the your root!

there are normally 3 settings for the version and they all change you .htaccess files and most creat a back up:
example:

you will have settings for your complete service to be set to one php.ini
or individual, so each sub domain uses it's own php.ini
or the fastcgi on each version.

QuotePHP 5.2
All files with the extension .php will be handled by the PHP 5.2 engine.
Legacy PHP with security updates. Compatible with most environments.
   PHP 5.2 (Single php.ini)
Same as PHP 5.2, but all subdirectories will use ~/public_html/php.ini
   PHP 5.2 (FastCGI)
All files with the extension .php will be handled by PHP 5.2 FastCGI processes.
FastCGI for PHP makes all your PHP applications run through mod_fastcgi instead of mod_suphp. This eliminates the overhead of loading the PHP interpreter on every hit. Since it is always in memory ready for the next hit, the responses will be generated faster.
   PHP 5.4
All files with the extension .php will be handled by the PHP 5.4 engine.
Latest version of PHP.
   PHP 5.4 (Single php.ini)
Same as PHP 5.4, but all subdirectories will use ~/public_html/php.ini
   PHP 5.4 (FastCGI)
All files with the extension .php will be handled by PHP 5.4 FastCGI processes.
FastCGI for PHP makes all your PHP applications run through mod_fastcgi instead of mod_suphp. This eliminates the overhead of loading the PHP interpreter on every hit. Since it is always in memory ready for the next hit, the responses will be generated faster.

If you do not have this option, then you will need to ask you host to set this up for you!

and remember your ,htaccess will change and a back up copy, will or should be created!


stmaxx

This is better informed, example of the instructions for the PHP version changes:

If you are not familiar with these options, do NOT change them.
This can cause all PHP scripts on your site to stop functioning if misconfigured.
NOTES:
If you have custom handlers specified in ~/public_html/.htaccess, changing these settings can overwrite them. If you are not sure, make a backup of ~/public_html/.htaccess before changing settings.
   PHP 5.2
All files with the extension .php will be handled by the PHP 5.2 engine.
Legacy PHP with security updates. Compatible with most environments.
   PHP 5.2 (Single php.ini)
Same as PHP 5.2, but all subdirectories will use ~/public_html/php.ini
   PHP 5.2 (FastCGI)
All files with the extension .php will be handled by PHP 5.2 FastCGI processes.
FastCGI for PHP makes all your PHP applications run through mod_fastcgi instead of mod_suphp. This eliminates the overhead of loading the PHP interpreter on every hit. Since it is always in memory ready for the next hit, the responses will be generated faster.
   PHP 5.4
All files with the extension .php will be handled by the PHP 5.4 engine.
Latest version of PHP.
   PHP 5.4 (Single php.ini)
Same as PHP 5.4, but all subdirectories will use ~/public_html/php.ini
   PHP 5.4 (FastCGI)
All files with the extension .php will be handled by PHP 5.4 FastCGI processes.
FastCGI for PHP makes all your PHP applications run through mod_fastcgi instead of mod_suphp. This eliminates the overhead of loading the PHP interpreter on every hit. Since it is always in memory ready for the next hit, the responses will be generated faster.

Additional extensions available for Installation
Http
Magick Wand
Mail Parse
OAuth
OCI8
Upload Progress
IonCube
SourceGuardian

Notice: Be aware that this only modifies your ~/public_html/php.ini file. If you apply these changes, please confirm that your other php.ini files are up-to-date for the appropriate version of PHP you're using. We highly suggest using the "Single php.ini" option for your desired version of PHP, to ensure that the proper php.ini is being applied for your site's software. If you choose to use PHP 5.4, you'll want to make sure your crons use "/usr/php/54/usr/bin/php" instead, as otherwise it will use PHP 5.2.
Your current ~/public_html/php.ini will be backed up.
Frequently Asked Questions:


read also in the Host cpanel:

What are the benefits of using FastCGI for PHP with your hosting account?
What are the potential problems with FastCGI and why I might want to disable it for PHP?
What are the differences between the options?


Advertisement: