Topic: when use php above 5.4 :(

php 5.6

[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xxx/public_html/include/parser.php on line 856
[26-Nov-2014 00:17:55 UTC] PHP Fatal error:  Call to undefined function mcrypt_encrypt() in /home/xxx/public_html/include/parser.php on line 727
Stack trace:
#1 /home/xxx/public_html/forum.php(70) : eval()'d code(11): include('/home/xxx/pu...')
#2 /home/xxx/public_html/forum.php(70): eval()
#3 /home/xxx/public_html/rewrite.php(97): require('/home/xxx/pu...')
#4 {main}
sorry my BAD english T___T
Have a nice day >.<
(^____^)v

Re: when use php above 5.4 :(

http://punbb.informer.com/forums/topic/ … or-php-55/

ForkBB
I speak only Russian  :P

Re: when use php above 5.4 :(

This is exacly, what I have corrected. If you want to use php >= 5.5, you have to:

1. Download branch 1.4-next
https://github.com/punbb/punbb/archive/v1.4next.zip

2. Replace these files:
admin/extensions.php
include/cache.php
include/dblayer/pgsql.php
include/parser.php
moderate.php
viewtopic.php

good luck smile

If you want to contact me quickly - send e-mail, not PM.
<?php $t='<?php $t=%c%s%c; printf($t,39,$t,39,10);%c'; printf($t,39,$t,39,10);

Re: when use php above 5.4 :(

The pun_pm extension required a fix as well;
http://punbb.informer.com/forums/post/147488/#p147488

Could you provide any tips or links to solutions so I could fix it on my own? The code in the file looks like this:

{
    if (substr($str, 0, 4) == 'Re: ')
        return 'Re[2]: ' . substr($str, 4);
    $str1 = preg_replace('#^Re\[(\d{1,10})\]: #eu', '\'Re[\'.(\\1 + 1).\']: \'', $str);
    return $str == $str1 ? 'Re: ' . $str : $str1;
}

Re: when use php above 5.4 :(

Gregoric wrote:

The pun_pm extension required a fix as well;

Just remove #e modifier from this method, it is not needed. The code should looks like this:

$str1 = preg_replace('#^Re\[(\d{1,10})\]: #u', '\'Re[\'.(\\1 + 1).\']: \'', $str);
If you want to contact me quickly - send e-mail, not PM.
<?php $t='<?php $t=%c%s%c; printf($t,39,$t,39,10);%c'; printf($t,39,$t,39,10);

Re: when use php above 5.4 :(

keeshii wrote:
Gregoric wrote:

The pun_pm extension required a fix as well;

Just remove #e modifier from this method, it is not needed. The code should looks like this:

$str1 = preg_replace('#^Re\[(\d{1,10})\]: #u', '\'Re[\'.(\\1 + 1).\']: \'', $str);

Okay, thank you a bunch!