Menu

#246 PHP-5 stripos() in 1.3.2 which claims to be 4.x comp.

next release
closed-fixed
engine (135)
6
2008-02-07
2007-08-29
p_oberg
No

The function stripos is used in linpha v 1.3.2 which claims to be PHP-4 compatible but stripos is a PHP-5 function which does not exist in PHP-4.

Trigging the error:
Thumbnails EXIF/IPTC->(choose create on all 3)->Start
Error message:
Fatal error: Call to undefined function: stripos() in /srv/www/htdocs/linpha/functions/db_api.php on line 1245

System: SuSE 9.2 with PHP 4.3.8 Apache/2.0.50 mysql Ver 12.22 Distrib 4.0.21
(I know, I should rheeeaaaaaly upgrade but I'm rebuilding my hose and simply does not have the time just now, and I'm only using it interally in my home so it never sees the daylight.)

Discussion

  • p_oberg

    p_oberg - 2007-08-29

    Patch to create the stripos function equivalent

     
  • p_oberg

    p_oberg - 2007-08-29

    Logged In: YES
    user_id=1878404
    Originator: YES

    I managed to fix it temporarily by adding the attached patch.
    I used: patch db_api.php < patch.txt

    However, I'm unsure if the function i pasted does the same as the real stripos. The code in the patch is publicly available at http://se2.php.net/stripos and seems to be suggested by the user "michiel at mb-it dot nl"

    File Added: patch.txt

     
  • bzrudi

    bzrudi - 2007-08-29

    Logged In: YES
    user_id=184593
    Originator: NO

    Hey dr_oberg,

    thanks for the patch, but it's already fixed by Vytautas in CVS so that LinPHA is compatible with PHP4 >= 4.1.0 again. It was accidentally commited to CVS ;-) However, I will leave this report open until next release so that it's not reported over and over again...
    So - solution is to replace db_api.php with the one from current CVS.

    Thanks!

    cheers bzrudi

     
  • bzrudi

    bzrudi - 2007-08-29
    • milestone: 246283 --> next release
    • priority: 5 --> 6
    • assigned_to: nobody --> vytautas
    • status: open --> open-fixed
     
  • wwp

    wwp - 2007-10-05

    Logged In: YES
    user_id=329414
    Originator: NO

    FYI it's fixed in CVS since 2007-09-13.

     
  • bzrudi

    bzrudi - 2008-02-07
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.