Jump to content

Recommended Posts

Posted

Good Morning All

I have moved the site to a new server, once DNS settings have propogated I am now getting the following error

Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /public_html/board/upload/init.php on line 1505

Any ideas why and how to resolve? 

Everything looks fine on the move and has gone ok. 

I cannot access the ACP (same error) and I have re-uploaded the files from the client area, and tried to upgrade but I dont get the upgrade screens, again just this error.

Thaanks

Posted
42 minutes ago, Nathan Explosion said:

What version of PHP is active on the site?

7.2 - I have also changed the version to 8.0, 8.1 and 8.2 and still the error remains the same.

Posted

 

1 minute ago, Nathan Explosion said:

Well, that's most definitely not going to work if you are using the latest version of the suite.

If you've changed to 8.0 or 8.1, you really should run the requirements checker to ensure all is well before even attempting to troubleshoot further.

No its a older version that was working fine

I'm moving across to another provider to start the upgrade to php 8+

I just get this error keeping the site in 7.2 which is what its working fine on the previous server. 

Posted

OK - as you didn't that include that information previously, an assumption had to be made based on what you did provide.

Stil...run the requirements checker to check all is well. If you are sticking with old versions of the suite (might be a good idea to say what version it is) & php for the moment, you will need to run an earlier version of the checker. I believe this one should be good:

https://invisioncommunity.com/files/file/7046-invision-community-requirements-checker/?changelog=24577

 

Posted
2 minutes ago, Nathan Explosion said:

OK - as you didn't that include that information previously, an assumption had to be made based on what you did provide.

Stil...run the requirements checker to check all is well. If you are sticking with old versions of the suite (might be a good idea to say what version it is) & php for the moment, you will need to run an earlier version of the checker. I believe this one should be good:

https://invisioncommunity.com/files/file/7046-invision-community-requirements-checker/?changelog=24577

 

Thank you

Getting the following on the checker

Get Ready for Invision Community 4.7 (police.community)

Posted
4 minutes ago, Nathan Explosion said:

Could contain: Page, Text

You're running an unsupported version of PHP (8.2 isn't supported yet, ignore that tick) for the current version of software.

That is strange as its definitely set at 7.0

Could contain: Page, Text

Posted

mysqli PHP extension is installed. What else could be causing this error;

Fatal error: Uncaught mysqli_sql_exception: No such file or directory in /home/sites/3b/f/fd794f5001/public_html/board/upload/ips4_old.php:327 Stack trace: #0 /home/sites/3b/f/fd794f5001/public_html/board/upload/ips4_old.php(327): mysqli->__construct('localhost', 'polcom_aduser', Object(SensitiveParameterValue), 'polcom_livesite', NULL, NULL) #1 {main} thrown in /home/sites/3b/f/fd794f5001/public_html/board/upload/ips4_old.php on line 327

 

Posted
7 minutes ago, Wayne B said:

mysqli PHP extension is installed. What else could be causing this error;

Fatal error: Uncaught mysqli_sql_exception: No such file or directory in /home/sites/3b/f/fd794f5001/public_html/board/upload/ips4_old.php:327 Stack trace: #0 /home/sites/3b/f/fd794f5001/public_html/board/upload/ips4_old.php(327): mysqli->__construct('localhost', 'polcom_aduser', Object(SensitiveParameterValue), 'polcom_livesite', NULL, NULL) #1 {main} thrown in /home/sites/3b/f/fd794f5001/public_html/board/upload/ips4_old.php on line 327

 

Well, it's two fold really.

The MySQLi exception is being thrown because whilst it's connecting to your MySQL server, it cannot use the database you're connecting to (check the details in conf_global.php are correct).

Newer versions of PHP throw an exception instead of an error here, I have just published an update to ips4.php to disable these exceptions.

Posted
18 minutes ago, Stuart Silvester said:

Well, it's two fold really.

The MySQLi exception is being thrown because whilst it's connecting to your MySQL server, it cannot use the database you're connecting to (check the details in conf_global.php are correct).

Newer versions of PHP throw an exception instead of an error here, I have just published an update to ips4.php to disable these exceptions.

Hi Stuart

Thanks for your reply, I have double checked all details and even created and stored a new password - all is present and correct. 

I have also uploaded the new ips4.php that you uploaded 15 mins or so ago and I am still getting this;

Fatal error: Uncaught mysqli_sql_exception: No such file or directory in /home/sites/3b/f/fd794f5001/public_html/board/upload/ips4.php:327 Stack trace: #0 /home/sites/3b/f/fd794f5001/public_html/board/upload/ips4.php(327): mysqli->__construct('localhost', 'polcom_aduser', Object(SensitiveParameterValue), 'polcom_livesite', NULL, NULL) #1 {main} thrown in /home/sites/3b/f/fd794f5001/public_html/board/upload/ips4.php on line 327

Any other suggestions?

Posted

So it works fine on php 7.4 on the old server - migrate it to the new one as 7.4 as well and the error is reported. All login details and database details are present and correct. 

I dont understand it.

Wayne

Posted
13 minutes ago, Wayne B said:

So it works fine on php 7.4 on the old server - migrate it to the new one as 7.4 as well and the error is reported. All login details and database details are present and correct. 

I dont understand it.

Wayne

Right, but you have uploaded the files for 4.7.11, so now you must use PHP 8.0 or 8.1.

For some reason your server doesn't appear to be using PHP 8 when loading Invision Community, it would be worth talking to your web host about that. Additionally, it might be worth making sure that your domain name is loading content from your new server and not your old one.

Posted
2 minutes ago, Stuart Silvester said:

Right, but you have uploaded the files for 4.7.11, so now you must use PHP 8.0 or 8.1.

For some reason your server doesn't appear to be using PHP 8 when loading Invision Community, it would be worth talking to your web host about that. Additionally, it might be worth making sure that your domain name is loading content from your new server and not your old one.

Yes - I have uploaded them, now changed to PHP 8.1 - still the same issue. 

When navigating to https://police.community ;

Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /home/sites/3b/f/fd794f5001/public_html/board/upload/init.php on line 1505

 

When using the checker Get Ready for Invision Community 4.7 (police.community) I'm getting the same Fatal Error;

Fatal error: Uncaught mysqli_sql_exception: No such file or directory in /home/sites/3b/f/fd794f5001/public_html/board/upload/ips4.php:327 Stack trace: #0 /home/sites/3b/f/fd794f5001/public_html/board/upload/ips4.php(327): mysqli->__construct('localhost', 'polcom_aduser', Object(SensitiveParameterValue), 'polcom_livesite', NULL, NULL) #1 {main} thrown in /home/sites/3b/f/fd794f5001/public_html/board/upload/ips4.php on line 327

 

Its fully propagated has the new domain and the old cPanel account is now suspended so its definitely not connecting there.

phpMyAdmin is version 5.1 and that has to be 5.5.3 or ideally 5.6.2 if I recall? 

Posted
2 minutes ago, Stuart Silvester said:

Are you sure this is the right server? 4.7.11 does not have anything on line 1505 of init.php.

That error is definitely that you're using PHP 7 instead of 8.

I'll send you the conf_global.php on DM

Is there anywhere else that its defined?

Thanks

Wayne

Posted

Im not sure why you would be sednign the conf_global there, as it's the init.php file that is being referred to.

I would mention, if you are having problems with managing a server, it may be best to get someone who can manage this on your behalf. Have you considered our cloud offering?

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...