Check out the Latest Articles:
Solution : Fatal error: Call to undefined function: str_split…

Question
When I open my website ( http://www.******.com/catalog/ ) I get this error:

Fatal error: Call to undefined function: str_split() in /home/******/catalog/includes/modules/flash_carousel.php on line 68

Solution
str_split is PHP 5 native function. If you are using PHP 4+, you can follow below instruction.
Open catalog/includes/functions/flash_carousel.php file. Add below code to your file before last ?> tag.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
if(!function_exists('str_split')) {
    function str_split($string,$string_length=1) {
        if(strlen($string)>$string_length || !$string_length) {
            do {
                $c = strlen($string);
                $parts[] = substr($string,0,$string_length);
                $string = substr($string,$string_length);
            } while($string !== false);
        } else {
            $parts = array($string);
        }
        return $parts;
    }
}


  1. Rick FordNo Gravatar on Sunday 1, 2009

    Hi
    I have been trying get get the carousel to work for quite some time and I am finally at a point that I am just plane stuck. If someone could help me that would be great. Here is the message that I am recieving

    Warning: fopen(/mnt/numbers here/www/estore/catalogkampanya/kampanya.xml) [function.fopen]: failed to open stream: No such file or directory in /mnt/numbers here/www/estore/catalog/includes/functions/flash_carousel.php on line 36

    I have finally got a portion of the carousel to show up on the web but this prints above it. I have uninstalled the entire site 3 times, tried to follow all the direction I can find on the web and have created more folders than i care to count. every time i get a differant error message.

    PLEASE HELP

    Thank you

    Reply

    adminNo Gravatar Reply:

    This error is typical for your site. You can fix it. Please follow below instruction.
    Open catalog/includes/functions/flash_carousel.php file. And go line 35.
    Find below line.
    $filename_dir = DIR_FS_CATALOG . $directory . $filename;

    And replace with below line.
    $filename_dir = DIR_FS_CATALOG . '/' . $directory . $filename;

    Reply

  2. Bo MccouryNo Gravatar on Sunday 1, 2009

    Notice: Constant HEADING_TITLE already defined in /home/miratopr/public_html/includes/languages/english/products_new.php on line 14

    Notice: Constant TEXT_DATE_ADDED already defined in /home/miratopr/public_html/includes/languages/english/products_new.php on line 16

    The carousel work part way but this error is under it.
    Thanks Bo

    Reply

  3. MauricioNo Gravatar on Sunday 1, 2009

    I’m getting some problems before i intalled this contribuition, the errors below.

    Notice: Constant IMAGE_BUTTON_LOGIN already defined in /home/sulameri/public_html/includes/languages/portugues/loginbox.php on line 24

    Notice: Undefined variable: newtheme in /home/sulameri/public_html/includes/boxes/loginbox.php on line 33

    Notice: Undefined variable: connection in /home/sulameri/public_html/includes/classes/seo.class.php on line 846

    Notice: Undefined offset: -1 in /home/sulameri/public_html/includes/classes/seo.class.php on line 1175

    Notice: Undefined variable: _sid in /home/sulameri/public_html/includes/classes/seo.class.php on line 804

    Notice: Undefined variable: connection in /home/sulameri/public_html/includes/classes/seo.class.php on line 846

    Notice: Undefined offset: -1 in /home/sulameri/public_html/includes/classes/seo.class.php on line 1175

    Notice: Undefined variable: _sid in /home/sulameri/public_html/includes/classes/seo.class.php on line 804

    Notice: Undefined variable: connection in /home/sulameri/public_html/includes/classes/seo.class.php on line 846

    Notice: Undefined offset: -1 in /home/sulameri/public_html/includes/classes/seo.class.php on line 1175

    Notice: Undefined variable: _sid in /home/sulameri/public_html/includes/classes/seo.class.php on line 804

    Notice: Undefined variable: connection in /home/sulameri/public_html/includes/classes/seo.class.php on line 846

    Notice: Undefined offset: -1 in /home/sulameri/public_html/includes/classes/seo.class.php on line 1175

    Notice: Undefined variable: _sid in /home/sulameri/public_html/includes/classes/seo.class.php on line 804

    Notice: Undefined variable: connection in /home/sulameri/public_html/includes/classes/seo.class.php on line 846

    Notice: Undefined offset: -1 in /home/sulameri/public_html/includes/classes/seo.class.php on line 1175

    Notice: Undefined variable: _sid in /home/sulameri/public_html/includes/classes/seo.class.php on line 804

    Notice: Undefined variable: connection in /home/sulameri/public_html/includes/classes/seo.class.php on line 846

    Notice: Undefined offset: -1 in /home/sulameri/public_html/includes/classes/seo.class.php on line 1175

    Notice: Undefined variable: _sid in /home/sulameri/public_html/includes/classes/seo.class.php on line 804

    If I disable the line on index.php

    Everithing goes well, but without the carousel, Can u help me

    Reply

    adminNo Gravatar Reply:

    Open catalog/includes/classes/flash_carousel_image_resize.php file.

    If you look 27th line you will see
    error_reporting(E_ALL);

    So you need to turn off by putting //.
    Then your code will be
    //error_reporting(E_ALL);

    Reply

  4. manuNo Gravatar on Sunday 1, 2009

    I installed well (i think) carousel on Oscommerce,
    no error, no problem, but no picture….
    any idea?

    Reply

  5. excaNo Gravatar on Sunday 1, 2009

    hello, i had install your flash but i got problem. i follow your step
    but there no dispaly, just blank space, i had dmod 777 for kampanya folder

    so anything i had miss?
    you can see my store at
    http://warung.exalumni.com

    thanks

    Reply