• Welcome to Simple Machines Community Forum. Please login or sign up.
January 28, 2022, 12:37:37 PM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


SimplePortal

Started by SimplePortal Team, March 10, 2008, 11:16:07 PM

Previous topic - Next topic

Dave J

Quote from: Chen Zhen on October 03, 2021, 07:10:37 PMYour error message actually shows line 3591 of PortalBlocks.php which is just the eval function that executes the code from your custom PHP blocks.
Line 35 is what's triggering the error from a PHP custom block.

Disable every custom PHP block, switch back to PHP 7.4 and then enable your custom PHP blocks one at a time until the error occurs. This will allow you to determine which blocks are causing the error.
Keep in mind that you may have multiple custom PHP blocks containing deprecated code.
With that possibility this process may have to be repeated.
 
If you copy the problem block code in a proper code editor it will give you line numbers which should allow you to find the line of code causing the error.

I've only just seen this as I didn't get an alert/email to say it was posted.

Thanks UD I'll look into it.
All the Quiz info is here

Dave J

Quote from: Chen Zhen on October 03, 2021, 07:10:37 PMYour error message actually shows line 3591 of PortalBlocks.php which is just the eval function that executes the code from your custom PHP blocks.
Line 35 is what's triggering the error from a PHP custom block.

Disable every custom PHP block, switch back to PHP 7.4 and then enable your custom PHP blocks one at a time until the error occurs. This will allow you to determine which blocks are causing the error.
Keep in mind that you may have multiple custom PHP blocks containing deprecated code.
With that possibility this process may have to be repeated.
 
If you copy the problem block code in a proper code editor it will give you line numbers which should allow you to find the line of code causing the error.

I have found the issue now and removed the block. Thanks UD
All the Quiz info is here

Chen Zhen

Quote from: WellwisherI am trying to move a block to the 1st position. When I attempt to change it, I get the following new error:

It's never happened before, I have been running this mod for years  :-\

Current version I am using is SimplePortal version 2.3.7

The rest of my forum seems to be fine.

Database Error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'row = row + 1
WHERE col = 4
AND row >= 1
AND row < 3' at line 2
File: ////forum/Sources/PortalAdminBlocks.php
Line: 662

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.18, while your database is at version 2.0.4. The above error might possibly go away if you execute the latest version of upgrade.php.

I reported this to Sinan in the past: ref. https://github.com/SimplePortal/SimplePortal/issues/17
.. he used a column name in this mod that became a reserved word in MySQL.
There are only 2 ways to fix it but both involve editing the SP code..

(1) encase each instance of that column name with grave accents

or

(2) replace that column name with ie. rowx in the installer and the regular code. This will also involve editing the sp_blocks table in ie. PhpMyAdmin to change the column name.
 

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Wellwisher

Quote from: Chen Zhen on November 30, 2021, 09:43:25 PM
Quote from: WellwisherI am trying to move a block to the 1st position. When I attempt to change it, I get the following new error:

It's never happened before, I have been running this mod for years  :-\

Current version I am using is SimplePortal version 2.3.7

The rest of my forum seems to be fine.

Database Error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'row = row + 1
WHERE col = 4
AND row >= 1
AND row < 3' at line 2
File: ////forum/Sources/PortalAdminBlocks.php
Line: 662

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.18, while your database is at version 2.0.4. The above error might possibly go away if you execute the latest version of upgrade.php.

I reported this to Sinan in the past: ref. https://github.com/SimplePortal/SimplePortal/issues/17
.. he used a column name in this mod that became a reserved word in MySQL.
There are only 2 ways to fix it but both involve editing the SP code..

(1) encase each instance of that column name with grave accents

or

(2) replace that column name with ie. rowx in the installer and the regular code. This will also involve editing the sp_blocks table in ie. PhpMyAdmin to change the column name.
 

Thank you Chen Zhen. At least your reply has relaxed me knowing that there's nothing wrong with my Smf set-up / data base.

You reported that to the dev in 2020 and its still not fixed. I am assuming this is why people have moved to other portals and shame on me for finding out late lol.

I was trying to put my Christmas banner in first place  ;D .


Chen Zhen


@Wellwisher:
You can use this slightly updated/modified version which should fix your MySQL reserved word problem.
ref. https://simpleportal.net/index.php?action=downloads;area=stable_beta_packages;file=147

If you have any problems with it please ask for support in this thread.

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Wellwisher

Quote from: Chen Zhen on December 02, 2021, 06:17:23 PM@Wellwisher:
You can use this slightly updated/modified version which should fix your MySQL reserved word problem.
ref. https://simpleportal.net/index.php?action=downloads;area=stable_beta_packages;file=147

If you have any problems with it please ask for support in this thread.

Thank you. How do you recommend I update this mod? Should I completely uninstall the previous version, or just install new version as is?

I am assuming either way, I will lose all the content in my boxes (which isn't too much of a biggie)?

Chen Zhen

You uninstall Simple Portal 2.3.7 and then install SP 2.3.8 ..
you will not lose any block data if you leave the "Remove all data associated with this modification" <-- unchecked.


My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

rcane

Good morning,

I'm getting the following error when trying to use the portal shoutbox.

The SMF side didn't see a problem with the db and suggested a post over here.


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM smfqg_sp_blocks
WHERE col = 5
ORDER BY row DESC
LIMIT 1' at line 2
File: /home/myDomain/public_html/myDomainName.com/Sources/PortalAdminBlocks.php
Line: 680

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.18, while your database is at version 2.0.17. The above error might possibly go away if you execute the latest version of upgrade.php.

Chen Zhen


It seems like you have the same issue that Wellwisher reported a few posts back in this thread.

Uninstall your current Simple Portal package & replace it with this one:
https://simpleportal.net/index.php?action=downloads;area=stable_beta_packages;file=147

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

xtian

Hi I am trying to uninstall 2.3.7 so I can install 2.3.8 but says module can't be found.
It is running, or was untill I deleted the files in admin package manager.
Now can't install either 2.8.7 or 8
And smf 2.0.19 has errors in the install
I think I broke something :-(
Not a program person just a user
cheers

Chen Zhen


@xtian:
re. Simple Portal & the SMF 2.0 branch

Having no idea what you did regarding deleting files & such, you do have the option of using the repair_settings.php to remove all hooks and then use the SMF 2.0.19 upgrade package.
If you do those 2 steps properly your forum will be back to square one with the database intact.
After which you can install all your mods again.

repair_settings.php instructions (remove hooks link is on bottom right when using the file):
https://wiki.simplemachines.org/smf/Repair_settings.php

Upgrade instructions:
https://wiki.simplemachines.org/smf/Upgrading


My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Chen Zhen


SimplePortal 2.3.8-BETA2 has been released for those that are interested.
This version appears to be necessary for custom PHP blocks to work with SMF 2.0.19.

It can be downloaded here:
https://simpleportal.net/index.php?action=downloads;area=stable_beta_packages;file=147

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Advertisement: