Menu

Deprecated: preg_replace(): The /e modifier is deprecated

Help
Patrice
2017-01-04
2017-01-05
  • Patrice

    Patrice - 2017-01-04

    Hi all !
    I have this error message :
    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home//public_html//includes/functions/functions_print.php on line 1484

    The line :
    $sentence=preg_replace('/~([^<>]{1,})~/e', "''.UTF8_strtoupper('\1').''", $sentence);

    How can I do ? My skills in Php are too low ...
    TIA
    Pat

     
  • Gerry Kroll

    Gerry Kroll - 2017-01-04

    This bug was fixed in PhpGedView 4.3.0 (the "SVN" version) more than a year ago.

    You need to upgrade your PhpGedView installation to the latest-and-greatest 4.3.0 that you have downloaded from the SVN repository.

    If you need detailed guidance in the upgrade process, please post here.

    The upgrade is simply a replacement of everything in the server's PhpGedView install directory except for the configuration file "config.php" and the "index" and "media" directories, followed by the launch of the Install wizard to update the "config" file, followed by re-importing the GEDCOM

     
  • Patrice

    Patrice - 2017-01-04

    Oups ...
    I found a zipped file on Github for the 4.3 version
    https://github.com/rathervague/phpgedview
    I will try it ...
    Thank you again Gerry !

     
  • Patrice

    Patrice - 2017-01-04

    Thank you Lester !
    I'm going to try this version r7149.
    Have a good day !
    Pat

     
  • Patrice

    Patrice - 2017-01-04

    Hello
    I have installed "PhpGedView 4.3.0 svn", I have access to the admin panel but the problem is still the same ...

    ERROR 2: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
    0 Error occurred on in function preg_replace
    1 called from line 1488 of file functions_print.php in function print_text
    2 called from line 90 of file editgedcoms.php

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/u428400550/public_html/family/includes/functions/functions_print.php on line 1488

    I cant do anything ...

    And if I click on "Upload a Gedcom file" I obtain :
    Strict Standards: Declaration of ServiceClient::getInstance() should be compatible with & GedcomRecord::getInstance($data, $latest = false) in /home/u428400550/public_html/family/includes/classes/class_serviceclient.php on line 919

    Any idea ?
    (I have tried with Php 5.5/5.6 and 7 ... same thing)

    Thanks

    Version Apache 2.4
    Version PHP 7
    Version MySQL 5.6

     
  • Lester Caine

    Lester Caine - 2017-01-04

    Sorry Patrice ... I'd just copied your link to svn ... https://sourceforge.net/p/phpgedview/svn/HEAD/tree/ will get the RIGHT version. The website is in folder phpGedView in the resulting zip. We should be able to just snapshot that section but it's getting the wrong branch :( The preg_replace_callback is on line 1524 of functions_print.php in the right build.

     

    Last edit: Lester Caine 2017-01-04
  • Patrice

    Patrice - 2017-01-04

    Fabulous ! It works !!! :-)
    Some errors with Php v7, but none with Php v5.5.
    PhpGedview is an enormous work.
    I dont know if someone maintain this software, but it was not easy to find the right version, I hope it is still in dev ...
    Thank you again Lester and Gerry!
    I wish you a beautiful and happy year 2017!

     
  • Gerry Kroll

    Gerry Kroll - 2017-01-05

    Patrice:
    You say that there are some errors when PHP 7 is used. Please provide more detail, because I'd like to make PhpGedView fully compatible with PHP 7.

    I do not have access to PHP 6 or PHP 7, so I will need your help to solve these problems.

    This discussion should now be taken off-line. Please use this e-mail address: gkroll at keldine dot ca

     

    Last edit: Gerry Kroll 2017-01-28

Log in to post a comment.