Erro in version PHP Version 5.2.17

Hi,

My sharedhost server is PHP Version 5.2.17.

The error that appears is:

[b]Warning: Unexpected character in input: ‘\’ (ASCII=92) state=1 in /home/myserver/public_html/evento/web/index.php on line 12

Parse error: syntax error, unexpected T_STRING in /home/[/b][b]myserver/public_html/evento/web/index.php on line 12

[/b]Please have some way to make it work?

Post your code at line 12, but probably there is some strange character in the code.

[color=#222222]This happens if you are trying to use namespaces but do not have PHP 5.3. [/color]

[color=#222222]PHP 5.2 and below don’t support namespaces and throw this error when they see the backslash[/color]

[color=#222222]

[/color]

[color=#222222]NOTE that Yii2 expects the minimum version to be PHP 5.4[/color]

You definitely need a new shared host. :)

If it isn’t possible to upgrade the version of PHP used for your domain, then you’re screwed.

5.2 is almost 10 years old unsupported version with known security vulnerabilities. I’d update or switch shared host to something else.

Even PHP 5.4 is old… recently ended the security support for it so if a hosting company still haves PHP 5.2 without an option for upgrade to a newer version… you should leave it without looking back

PHP supported versions - http://php.net/supported-versions.php

Right.

That shared hosting is a client.

In this case I wanted to know if he had any alternative way (even if temporary) to work.

We are already moving to another hosting. Thank you

Two years ago, most shared hosting providers urged their users to upgrade from 5.2 and put out notice that they would drop support for it.

Many providers offered 5.5, even back then.

Your client will be very happy to upgrade as PHP has not even gotten more secure, but also more much more performant.

See this: http://www.pixelite.co.nz/article/how-why-you-should-update-php-to-55-with-drupal/

Over 50% memory reduction and at least 10% increased request/second.

I actually still run 5.3 on some of my domains - I will definitely upgrade to 5.5 asap - there is bundled APC in PHP now, so performance will be great. :)

I am curious: what hosting provider are we talking about?

Just upgraded all domains to 5.6 :)

That is the preferred version of PHP on Dreamhost shared plan.

I have been a happy Dreamhoster for many years.

The hostin question is UOLHOST (in Brazil), but it was only at the customer’s option using an old plan and refused to change it.

How the system is used only during the client’s campaign (2 months), I put the system in my provider (PHP 5.4) and it worked perfectly.

Thank you