News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

People cannot register

Started by bigmo66, September 01, 2020, 09:33:11 PM

Previous topic - Next topic

bigmo66

Hello, long time user, never a problem until now. I have folks telling me they cannot register on my site. They get the following error, "Call to undefined function split()

Have not done anything to forum in a long time and first I have heard of this.  Any suggestions or ideas?

Thanks
Steve

vbgamer45

Are you on the latest SMF 2.0.x? It sounds like your host did a PHP upgrade which caused some old code to fail.
What's the line and error number?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

bigmo66

I am using 2.0.17  When a person tries to register, they simply see this:


bigmo66


bigmo66

How do i look at and edit php? I am looking around Cpanel right now.  Someone said the word "split" needs to be changed to "explode".  I really need to figure this out as I have had countless potential members turned away.

vbgamer45

I would think it is from some mod or change to the forum split is not part of the software in 2.0.17

I would try searching the files fro split. It is a little tricky in this case since we can't see the file/line number.

I would start with Sources\Register.php
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Dzonny

Hello there.

The error you're getting is most likely caused by php upgrade on your server, like vbgamer mentioned. (The split function was removed in PHP 7)
Can you tell us what is the PHP version you're using on your server? You can use phpinfo() to check about that if you're not sure.

EDIT: ^^what vbgamer said :)

bigmo66

Thanks for the replies. I am using PHP 7.0  There is a drop down that lists all the versions. Looks like I can select 7+ or several below 7.

vbgamer45

That will fix it for now. But lesser versions of PHP haven't been supported for years. So you should really fix the main cause of the issue.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

bigmo66

While I have owned the site for over a decade, I have had very little problems. SMF has been great and I have never felt the need to change. What I don't have is a lot of experience which brings me to this forum from time to time. I have no idea where to look to fix the issue. I'm happy to do some digging though.  If I downgrade PHP, how far back to go and will it cause issues with my forum?

bigmo66

I reverted back to 5.6 for now. I will continue to find out what to fix so I can go back to 7.0

Dzonny

Understood, no worries. I would personally rather check for installed mod and split function there, than downgrading PHP itself.
Can you write us a list of your installed mods?

bigmo66

I uninstalled and deleted a few mods this morning, checking each time if fixed. I'll post a list of mods. Haven't installed any in a good while.

bigmo66

1.    SMF 1.1.18 Update    1.0    [ List Files ] [ Delete ]
2.    The Rules    1.03    [ Uninstall ] [ List Files ] [ Delete ]
3.    Fix Message Empty Error For Embed Video Mods    1.0    [ Uninstall ] [ List Files ] [ Delete ]
4.    SMF 1.0.20 / 1.1.12 Update    1.0    [ List Files ] [ Delete ]
5.    Ad Managment    3.2    [ Uninstall ] [ List Files ] [ Delete ]
6.    Menu_Icons    1.0    [ Uninstall ] [ List Files ] [ Delete ]
7.    Ohara YouTube Embed    1.2.1    [ Uninstall ] [ List Files ] [ Delete ]
8.    Bot Buster    1.1    [ Install Mod ] [ List Files ] [ Delete ]
9.    SimplePortal    2.3.6    [ Uninstall ] [ List Files ] [ Delete ]
10.    SMF 1.1.19 / 2.0.6 Update    1.0    [ List Files ] [ Delete ]
11.    Audio and Video BBCodes    1.0 beta 1    [ List Files ] [ Delete ]
12.    SMF 2.0.13 Update    1.0    [ List Files ] [ Delete ]
13.    Image Upload    1.0.0    [ Uninstall ] [ List Files ] [ Delete ]
14.    Stop Spammer    2.3.9    [ Uninstall ] [ List Files ] [ Delete ]
15.    SMF 1.0.18 / 1.1.10 / 2.0 RC1-2 Update    1.1    [ List Files ] [ Delete ]
16.    SMF 1.0.19 / 1.1.11 Update    1.0    [ List Files ] [ Delete ]
17.    SMF 2.0.11 Update    1.0    [ List Files ] [ Delete ]
18.    SMF 2.0.16 Update    1.0    [ List Files ] [ Delete ]
19.    SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update    1.0    [ List Files ] [ Delete ]
20.    SMF 1.0.14 / 1.1.6 Update    1.0    [ List Files ] [ Delete ]
21.    SMF 1.1.15 Update    1.0    [ List Files ] [ Delete ]
22.    SMF 1.0.19 / 1.1.11 Update    1.0    [ List Files ] [ Delete ]
23.    SMF 1.1.14 Update    1.0    [ List Files ] [ Delete ]
24.    SMF 1.0.16 / 1.1.8 Update    1.0    [ List Files ] [ Delete ]
25.    eBay BBCode    2.0.2    [ Uninstall ] [ List Files ] [ Delete ]
26.    Board Icons    1.0    [ Uninstall ] [ List Files ] [ Delete ]
27.    SMF Gallery Lite    5.5a    [ Install Mod ] [ List Files ] [ Delete ]
28.    SMF 1.1.21 / 2.0.10 Update    1.0    [ List Files ] [ Delete ]
29.    SMF 2.0.15 Update    1.0    [ List Files ] [ Delete ]
30.    SMF 1.0.22 / 1.1.16 Update    1.0    [ List Files ] [ Delete ]
31.    Tapatalk SMF 2.0 Plugin    4.2.4    [ Uninstall ] [ List Files ] [ Delete ]
32.    Disable 'last edit by...' for Administrators    1.2    [ Uninstall ] [ List Files ] [ Delete ]
33.    SMF 1.0.19 / 1.1.11 Update    1.0    [ List Files ] [ Delete ]
34.    Simple Image Upload    1.1.0    [ Install Mod ] [ List Files ] [ Delete ]
35.    EmailValidator    1.0    [ Uninstall ] [ List Files ] [ Delete ]
36.    httpBL    2.5.1    [ Install Mod ] [ List Files ] [ Delete ]
37.    SMF 1.0.19 / 1.1.11 Update    1.0    [ List Files ] [ Delete ]
38.    SMF 1.0.15 / 1.1.7 Update    1.0    [ List Files ] [ Delete ]
39.    SMF 1.0.19 / 1.1.11 Update    1.0    [ List Files ] [ Delete ]
40.    SMF 2.0.12 Update    1.0    [ List Files ] [ Delete ]
41.    SMF 1.0.19 / 1.1.11 Update    1.0    [ List Files ] [ Delete ]
42.    SMF 1.0.17 / 1.1.9 / 2.0 RC1 Update    1.0    [ List Files ] [ Delete ]
43.    cbi 1.0    1.8.0    [ List Files ] [ Delete ]
44.    SMF 2.0.17 Update    1.0    [ Uninstall ] [ List Files ] [ Delete ]
45.    Add Domaintools to TrackIP    1.1    [ Uninstall ] [ List Files ] [ Delete ]
46.    SMF 1.0.18 / 1.1.10 / 2.0 RC1-2 Update    1.1    [ List Files ] [ Delete ]
47.    SMF 1.1.20 / 2.0.9 Update    1.0    [ List Files ] [ Delete ]
48.    SMF 2.0.14 Update    1.0    [ List Files ] [ Delete ]
49.    SMF 1.0.21 / 1.1.13 Update    1.0    [ List Files ] [ Delete ]
50.    SMF 1.0.23 / 1.1.17 Update    1.0    [ List Files ] [ Delete ]
51.    SMF 1.0.19 / 1.1.11 Update    1.0    [ List Files ] [ Delete ]

vbgamer45

It would probably be one of them, can't really tell though.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Dzonny

I searched through some of those but couldn't find split function used in any.
Dunno about "The Rules" mod though, as it's removed from our site, and I can't find a package to parse and see the code itself.

But anyway, what you can do is to make a backup of your forum directory and download it to your PC (Themes and Sources dir most likely) and then do a search through all of those for split function to see if there's any results. You can use notepad++ or similar software for this though.

bigmo66

#16
If I download every mod and look through it, am I just looking for the word "split".

This is the "Rules.php"  Am I only looking at php files or everything?

<?php
/**********************************************************************************
* Rules.php                                                                       *
***********************************************************************************
*                                                                                 *
*  Execution file for "The Rules" modification.                                   *
*                                                                                 *
*  Displays the forum rules when the "RULES" tab is clicked.                      *
*                                                                                 *
**********************************************************************************/

if (!defined('SMF'))
die('Hacking attempt...');

function 
Rules()
{
global $context$settings$options$scripturl$boarddir$sourcedir$modSettings$user_info$txt;

if($user_info['is_guest'] && empty($modSettings['rules_enable_guest_access'])) redirectexit();

$context['all_pages']['rules'] = 'rules';
if (!empty($modSettings['the_rules_enable_agreement'])) $context['all_pages']['agreement'] = 'agreement';
if (!empty($modSettings['the_rules_enable_additional']))  $context['all_pages']['additional'] = 'additional';

$context['sub_action'] = isset($_REQUEST['sa']) ? $_REQUEST['sa'] : '';
$context['current_page'] = $context['sub_action'] ? $context['sub_action'] : 'rules';

switch ($context['current_page'])
{
case 'agreement':
$link_name = !empty($modSettings['the_rules_agreement_display_name']) ? $modSettings['the_rules_agreement_display_name'] : $txt['agreement'];
$link_url $scripturl '?action=rules;sa=agreement';
$context['page_contents'] = file_exists($boarddir '/agreement.txt') ? parse_bbc(file_get_contents($boarddir '/agreement.txt')) : $txt['the_rules_not_configured'];
break;

case 'additional':
$link_name = !empty($modSettings['the_rules_additional_display_name']) ? $modSettings['the_rules_additional_display_name'] : $txt['additional'];
$link_url $scripturl '?action=rules;sa=additional';
$context['page_contents'] = !empty($modSettings['the_rules_additional_text']) ? parse_bbc($modSettings['the_rules_additional_text']) : $txt['the_rules_not_configured'];
break;

default:
$link_name = !empty($modSettings['the_rules_display_name']) ? $modSettings['the_rules_display_name'] : $txt['rules'];
$link_url $scripturl '?action=rules';
$context['page_contents'] = !empty($modSettings['the_rules_text']) ? parse_bbc($modSettings['the_rules_text']) : $txt['the_rules_not_configured'];
}

$context['linktree'][] = array(
'url' => $scripturl.'?action=rules',
'name' => $txt['rules'],
);

if (!empty($modSettings['the_rules_enable_agreement']) || !empty($modSettings['the_rules_enable_additional']))
$context['linktree'][] = array(
'url' => $link_url,
'name' => $link_name
);

$context['page_title'] = $link_name;

$menu_items = array();
foreach ($context['all_pages'] as $active_page => $this_page)
{
$name_ptr 'the_rules_' . (($this_page == 'rules') ? '' $this_page '_') . 'display_name';
$display_name = !empty($modSettings[$name_ptr]) ? $modSettings[$name_ptr] : $txt['rules_title_' $this_page];

if ($active_page == $context['current_page'])
{
$menu_items[] = '<span class="error" style="font-weight: bold;">' $display_name '</span>';
}
else
{
$action = ($this_page == 'rules') ? '?action=rules' '?action=rules;sa=' $this_page;
$menu_items[] = '<a href="' $scripturl $action '">' $display_name '</a>';
}
}
$context['the_rules_menu'] = implode(' &bull; '$menu_items);

loadTemplate('Rules');
}

?>

Dzonny

Please use the attachments when you want to add the php file rather than pasting the code itself in the posts here :)

Well, mods can change various files and add new ones, so I can't really tell what the changes are for that specific mod, because it's removed from our site like I mentioned earlier. Doesn't mean that this one is the problematic one though.
That's why I'd suggest to search through all files in Sources and Themes dir instead, and you can do that with notepad++ without problems and in no time. :)

bigmo66

Unzipping the directory to a folder now...

bigmo66

I used notepad++ and looked through the themes folder.  It found the split a lot, but what instance am I looking for?


Advertisement: