close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Depreciated PHP function split()

Thread began 7/30/2009 11:34 am by michael_moll385275 | Last modified 8/01/2009 10:07 pm by tom250037 | 9387 views | 5 replies |

michael_moll385275

Depreciated PHP function split()

The depreciated PHP function split() is generated by Universal email:

Deprecated: Function split() is deprecated in PHP version 5.3. This is the error message:

C:\Users\Mike\wamp\www\Sites\Testing\WA_Universal_Email\MailFormatting_PHP.php on line 42

I also ran into the same usage of the split() function with the PowerStore2.
The reccommend alternative to the PHP split() function is to replace it with the explode() function, which works fine.

Please review all your software for the use of the PHP split() function and either replace it with the explode() function or some other appropriate fix. I purchased the SuperSite and PowerStore2 and I do not want to have to do this myself everytime I use your products.

Thank you

Sign in to reply to this post

Ray BorduinWebAssist

Since a stable version of PHP 5.3 only just came out in the last couple of days, we have not yet made updates to our extensions. Thank you for bringing this to our attention. Please report line numbers and post the code sample when you run into these issues so we can be sure not to miss them when making updates.

Sign in to reply to this post
Did this help? Tips are appreciated...

michael_moll385275

Another depreciated function

Found another depreciated function while checking out.

Deprecated: Function eregi() is deprecated in C:\Users\Mike\wamp\www\Sites\PowerStore200\WA_ValidationToolkit\WAVT_Scripts_PHP.php on line 547

Sign in to reply to this post

Ray BorduinWebAssist

Thank you for bringing this to our attention. I will make sure to have someone look into it.

I'm sure the solution is to replace it with preg() but the arguments would have to change slightly as well.

I'll look up the line and try to figure out the best fix. Thanks again.

Sign in to reply to this post
Did this help? Tips are appreciated...

Ray BorduinWebAssist

Well... it is odd that the php site doesn't even mention it is depricated... I can only imagine that ereg() must be depricated as well.

I see the code is used in our regular expression validation... which makes sense. It appears we actually try to match using both the ereg and preg techniques:

if (!(!$required && $value=="")) {
if (strpos($extraArgs,"i") >= 0) {
$theMatch = eregi($regExStrStripped, $value);
}
else {
$theMatch = ereg($regExStrStripped, $value);
}
if (!$theMatch) {
$theMatch = preg_match($regExStr, $value);
if (!$theMatch) {
$isValid = false;
}
}
}

so the solution is to remove the checks using this type of regular expression match, and leave the preg functions as they are like:

if (!(!$required && $value=="")) {
$theMatch = preg_match($regExStr, $value);
if (!$theMatch) {
$isValid = false;
}
}

a find and replace of those lines should do the trick.

Sign in to reply to this post
Did this help? Tips are appreciated...

tom250037Beta Tester

Ray,
Here is a good read on migrating from PHP 5.2x to 5.3 on the php site

migration53

You can hide the depreciating warnings by editing php.ini and editing your error reporting

error_reporting =E_ALL & ~E_DEPRECATED

Hope that helps.

Tom

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...