Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Wayne B Posted June 16, 2023 Posted June 16, 2023 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
Nathan Explosion Posted June 16, 2023 Posted June 16, 2023 What version of PHP is active on the site?
Wayne B Posted June 16, 2023 Author Posted June 16, 2023 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.
Nathan Explosion Posted June 16, 2023 Posted June 16, 2023 Just now, Wayne B said: 7.2 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.
Wayne B Posted June 16, 2023 Author Posted June 16, 2023 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.
Nathan Explosion Posted June 16, 2023 Posted June 16, 2023 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
Wayne B Posted June 16, 2023 Author Posted June 16, 2023 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)
Nathan Explosion Posted June 16, 2023 Posted June 16, 2023 You're running an unsupported version of PHP (8.2 isn't supported yet, ignore that tick) for the current version of software. And the mysqli PHP extension appears to not be enabled.
Wayne B Posted June 16, 2023 Author Posted June 16, 2023 4 minutes ago, Nathan Explosion said: 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
Wayne B Posted June 16, 2023 Author Posted June 16, 2023 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
Stuart Silvester Posted June 16, 2023 Posted June 16, 2023 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.
Wayne B Posted June 16, 2023 Author Posted June 16, 2023 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?
Stuart Silvester Posted June 16, 2023 Posted June 16, 2023 Maybe your MySQL hostname is wrong, something isn't specified correct in the config. - https://www.google.com/search?q=mysql+"No+such+file+or+directory" That's not really related to the other issue you are seeing though. You're definitely running an older version of PHP (when the framework loads) that isn't compatible. I would focus on figuring that out first.
Wayne B Posted June 16, 2023 Author Posted June 16, 2023 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
Stuart Silvester Posted June 16, 2023 Posted June 16, 2023 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.
Wayne B Posted June 16, 2023 Author Posted June 16, 2023 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?
Stuart Silvester Posted June 16, 2023 Posted June 16, 2023 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.
Wayne B Posted June 16, 2023 Author Posted June 16, 2023 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
Marc Posted June 16, 2023 Posted June 16, 2023 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?
Recommended Posts