Latest v11 download crash on install

Post

Posted
Rating:
#8332 (In Topic #2087)

Composr installer: step 8 of 10

An error has occurred

/home/compibtk/public_html/site/pages/modules_custom/galleries.php: Call to undefined function disable_php_memory_limit()

Here is the stack trace:

Below is a stack trace revealing the state Composr was in when the error occurred. If this represents a bug in the unmodified software, you may want to check Composr website for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, what you tried to do, how you tried to do it, version numbers, and any other appropriate information.
We apologize for this problem and if it's a bug we hope you will work with us so that we can fix it for you promptly.

File '/home/compibtk/public_html/sources/minikernel.php'
Line '564'
Function 'get_html_trace'
Args  
File '/home/compibtk/public_html/sources/global3.php'
Line '4,487'
Function 'fatal_exit'
Args

object

File '/home/compibtk/public_html/sources/zones2.php'
Line '546'
Function 'cms_eval'
Args

'/home/compibtk/public_html/site/pages/modules_custom/galleries.php'

File '/home/compibtk/public_html/install.php'
Line '2,569'
Function 'reinstall_module'
Args

''

'galleries'

File '/home/compibtk/public_html/install.php'
Line '205'
Function 'step_8'
Args


echo $code . "<br><br><p><p>";
echo $context . "<br><p><p>";

Code

if (!function_exists('installgalleries1030799574_10')) { function installgalleries1030799574_10(?int $upgrade_from = null, ?int $upgrade_from_hack = null) { require_code('galleries'); require_lang('galleries'); require_code('galleries2'); if ($upgrade_from === null) { $GLOBALS['SITE_DB']->create_table('galleries', [ 'name' => '*ID_TEXT', 'the_description' => 'LONG_TRANS__COMCODE', 'fullname' => 'SHORT_TRANS__COMCODE', 'add_date' => 'TIME', 'rep_image' => 'URLPATH', 'parent_id' => 'ID_TEXT', 'watermark_top_left' => 'URLPATH', 'watermark_top_right' => 'URLPATH', 'watermark_bottom_left' => 'URLPATH', 'watermark_bottom_right' => 'URLPATH', 'accept_images' => 'BINARY', 'accept_videos' => 'BINARY', 'allow_rating' => 'BINARY', 'allow_comments' => 'SHORT_INTEGER', 'notes' => 'LONG_TEXT', 'is_member_synched' => 'BINARY', 'layout_mode' => 'ID_TEXT', 'gallery_views' => 'INTEGER', 'g_owner' => '?MEMBER', 'gallery_sort' => 'ID_TEXT', // See allowed values in hooks/systems/config/galleries_sort_order 'media_sort' => 'ID_TEXT', // See allowed values in hooks/systems/config/gallery_media_default_sort_order ]); $GLOBALS['SITE_DB']->create_index('galleries', 'watermark_top_left', ['watermark_top_left']); $GLOBALS['SITE_DB']->create_index('galleries', 'watermark_top_right', ['watermark_top_right']); $GLOBALS['SITE_DB']->create_index('galleries', 'watermark_bottom_left', ['watermark_bottom_left']); $GLOBALS['SITE_DB']->create_index('galleries', 'watermark_bottom_right', ['watermark_bottom_right']); $GLOBALS['SITE_DB']->create_index('galleries', 'gadd_date', ['add_date']); $GLOBALS['SITE_DB']->create_index('galleries', 'parent_id', ['parent_id']); $GLOBALS['SITE_DB']->create_index('galleries', 'ftjoin_gfullname', ['fullname']); $GLOBALS['SITE_DB']->create_index('galleries', 'ftjoin_gdescrip', ['the_description']); $GLOBALS['SITE_DB']->create_table('images', [ 'id' => '*AUTO', 'cat' => 'ID_TEXT', 'url' => 'URLPATH', 'the_description' => 'LONG_TRANS__COMCODE', 'allow_rating' => 'BINARY', 'allow_comments' => 'SHORT_INTEGER', 'allow_trackbacks' => 'BINARY', 'notes' => 'LONG_TEXT', 'submitter' => 'MEMBER', 'validated' => 'BINARY', 'add_date' => 'TIME', 'edit_date' => '?TIME', 'image_views' => 'INTEGER', 'title' => 'SHORT_TRANS', ]); $GLOBALS['SITE_DB']->create_index('images', 'image_views', ['image_views']); $GLOBALS['SITE_DB']->create_index('images', 'category_list', ['cat']); $GLOBALS['SITE_DB']->create_index('images', 'i_validated', ['validated']); $GLOBALS['SITE_DB']->create_index('images', 'xis', ['submitter']); $GLOBALS['SITE_DB']->create_index('images', 'iadd_date', ['add_date']); $GLOBALS['SITE_DB']->create_index('images', 'ftjoin_dtitle', ['title']); $GLOBALS['SITE_DB']->create_table('videos', [ 'id' => '*AUTO', 'cat' => 'ID_TEXT', 'url' => 'URLPATH', 'thumb_url' => 'URLPATH', 'closed_captions_url' => 'URLPATH', 'the_description' => 'LONG_TRANS__COMCODE', 'allow_rating' => 'BINARY', 'allow_comments' => 'SHORT_INTEGER', 'allow_trackbacks' => 'BINARY', 'notes' => 'LONG_TEXT', 'submitter' => 'MEMBER', 'validated' => 'BINARY', 'add_date' => 'TIME', 'edit_date' => '?TIME', 'video_views' => 'INTEGER', 'video_width' => 'INTEGER', 'video_height' => 'INTEGER', 'video_length' => 'INTEGER', 'title' => 'SHORT_TRANS', ]); $GLOBALS['SITE_DB']->create_index('videos', 'video_views', ['video_views']); $GLOBALS['SITE_DB']->create_index('videos', 'vs', ['submitter']); $GLOBALS['SITE_DB']->create_index('videos', 'v_validated', ['validated']); $GLOBALS['SITE_DB']->create_index('videos', 'category_list', ['cat']); $GLOBALS['SITE_DB']->create_index('videos', 'vadd_date', ['add_date']); $GLOBALS['SITE_DB']->create_index('videos', 'ftjoin_dtitle', ['title']); add_privilege('GALLERIES', 'may_download_gallery', false); add_privilege('GALLERIES', 'high_personal_gallery_limit', false); add_privilege('GALLERIES', 'no_personal_gallery_limit', false); // Add root gallery add_gallery('root', do_lang('GALLERIES_HOME'), '', '', '', 1, 1, 0, GALLERY_LAYOUT_MODE_GRID); require_code('permissions2'); set_global_category_access('galleries', 'root'); // Setup homepage hero slider slides require_code('content2'); install_predefined_content('galleries'); } if (($upgrade_from === null) || ($upgrade_from < 7)) { delete_config_option('ffmpeg_path'); $GLOBALS['SITE_DB']->create_table('video_transcoding', [ 't_id' => '*ID_TEXT', 't_local_id' => '?AUTO_LINK', 't_local_id_field' => 'ID_TEXT', 't_error' => 'LONG_TEXT', 't_url' => 'URLPATH', 't_table' => 'ID_TEXT', 't_url_field' => 'ID_TEXT', 't_orig_filename_field' => 'ID_TEXT', 't_width_field' => 'ID_TEXT', 't_height_field' => 'ID_TEXT', 't_output_filename' => 'ID_TEXT', // This is the filename in uploads/galleries where the transcoder is expected to place new files. If blank, this means that the post-transcode API call will be explicitly fed a URL instead. ]); } if (($upgrade_from !== null) && ($upgrade_from < 7)) { // LEGACY $GLOBALS['SITE_DB']->add_table_field('videos', 'title', 'SHORT_TRANS'); $GLOBALS['SITE_DB']->add_table_field('images', 'title', 'SHORT_TRANS'); $GLOBALS['SITE_DB']->create_index('images', 'ftjoin_dtitle', ['title']); $GLOBALS['SITE_DB']->create_index('videos', 'ftjoin_dtitle', ['title']); $GLOBALS['SITE_DB']->add_table_field('galleries', 'gallery_views', 'INTEGER'); $GLOBALS['SITE_DB']->add_table_field('galleries', 'g_owner', '?MEMBER'); } if (($upgrade_from !== null) && ($upgrade_from < 9)) { // LEGACY $GLOBALS['SITE_DB']->alter_table_field('images', 'comments', 'LONG_TRANS', 'the_description'); $GLOBALS['SITE_DB']->alter_table_field('videos', 'comments', 'LONG_TRANS', 'the_description'); $GLOBALS['SITE_DB']->delete_table_field('galleries', 'teaser'); } if (($upgrade_from !== null) && ($upgrade_from < 10)) { // LEGACY $GLOBALS['SITE_DB']->add_table_field('video_transcoding', 't_local_id', '?AUTO_LINK', null); $GLOBALS['SITE_DB']->add_table_field('video_transcoding', 't_local_id_field', 'ID_TEXT', ''); $GLOBALS['SITE_DB']->delete_index_if_exists('images', 'ftjoin_icomments'); $GLOBALS['SITE_DB']->delete_index_if_exists('videos', 'ftjoin_vcomments'); } if (($upgrade_from === null) || ($upgrade_from < 10)) { $GLOBALS['SITE_DB']->create_index('video_transcoding', 't_local_id', ['t_local_id']); $GLOBALS['SITE_DB']->create_index('galleries', '#gallery_search__combined', ['fullname', 'the_description']); $GLOBALS['SITE_DB']->create_index('images', '#image_search__combined', ['the_description', 'title']); $GLOBALS['SITE_DB']->create_index('videos', '#video_search__combined', ['the_description', 'title']); add_privilege('SEARCH', 'autocomplete_keyword_gallery', false); add_privilege('SEARCH', 'autocomplete_title_gallery', false); add_privilege('SEARCH', 'autocomplete_keyword_image', false); add_privilege('SEARCH', 'autocomplete_title_image', false); add_privilege('SEARCH', 'autocomplete_keyword_videos', false); add_privilege('SEARCH', 'autocomplete_title_videos', false); $GLOBALS['SITE_DB']->create_index('images', 'ftjoin_idescription', ['the_description']); $GLOBALS['SITE_DB']->create_index('videos', 'ftjoin_vdescription', ['the_description']); } if (($upgrade_from !== null) && ($upgrade_from < 11)) { // LEGACY $GLOBALS['SITE_DB']->alter_table_field('galleries', 'description', 'LONG_TRANS__COMCODE', 'the_description'); $GLOBALS['SITE_DB']->alter_table_field('images', 'description', 'LONG_TRANS__COMCODE', 'the_description'); $GLOBALS['SITE_DB']->alter_table_field('videos', 'description', 'LONG_TRANS__COMCODE', 'the_description'); rename_config_option('galleries_default_sort_order', 'gallery_media_default_sort_order'); rename_config_option('gallery_name_order', 'galleries_sort_order'); if (get_option('galleries_sort_order') == '1') { set_option('galleries_sort_order', 'title ASC'); } else { set_option('galleries_sort_order', 'recent ASC'); } $GLOBALS['SITE_DB']->add_table_field('galleries', 'layout_mode', 'ID_TEXT'); $GLOBALS['SITE_DB']->add_table_field('videos', 'closed_captions_url', 'URLPATH'); $GLOBALS['SITE_DB']->add_table_field('galleries', 'gallery_sort', 'SHORT_TEXT'); $GLOBALS['SITE_DB']->add_table_field('galleries', 'media_sort', 'SHORT_TEXT'); $GLOBALS['SITE_DB']->query_update('galleries', ['layout_mode' => GALLERY_LAYOUT_MODE_GRID], ['flow_mode_interface' => '0']); $GLOBALS['SITE_DB']->query_update('galleries', ['layout_mode' => GALLERY_LAYOUT_MODE_CAROUSEL], ['flow_mode_interface' => '1']); $GLOBALS['SITE_DB']->delete_table_field('galleries', 'flow_mode_interface'); $max = 100; $start = 0; do { $rows = $GLOBALS['SITE_DB']->query_select('images', ['id', 'thumb_url'], [], ' AND thumb_url LIKE \'' . db_encode_like('uploads/galleries_thumbs/%') . '\' ORDER BY id', $max, $start); foreach ($rows as $row) { @unlink(get_custom_file_base() . '/' . urldecode($row['thumb_url'])); } $start += $max; } while (!empty($rows)); $GLOBALS['SITE_DB']->delete_table_field('images', 'thumb_url'); set_option('gallery_media_default_sort_order', str_replace('add_date', 'recent', get_option('gallery_media_default_sort_order'))); set_option('galleries_sort_order', str_replace('name', 'title', str_replace('add_date', 'recent', get_option('gallery_media_default_sort_order')))); } } } return installgalleries1030799574_10();

/home/compibtk/public_html/site/pages/modules_custom/galleries.php

Last edit: by Malatesa

Post

Posted
Rating:
#8334
This seems like custom code because it's a modules_custom, and it does not seem like the code that appears from the workflow addon.

Can you include the contents of your site/pages/modules_custom/galleries.php please so we can further diagnose?

Post

Posted
Rating:
#8345
It's the untouched version of galleries.php that came with the download. I downloaded the latest version of Composr and ran the installer on a clean install. Even wiped MySQL and started it over from scratch. 

galleries.php

<?php




function init__site__pages__modules_custom__galleries($code)
{
    i_solemnly_declare(I_UNDERSTAND_SQL_INJECTION | I_UNDERSTAND_XSS | I_UNDERSTAND_PATH_INJECTION);

    if (!addon_installed('workflows')) { // Not installed
        return $code;
    }

    if (!addon_installed('validation')) {
        return $code;
    }

    if (!addon_installed('galleries')) {
        return $code;
    }

    require_code('override_api');

    // Add a redirection for the workflow handling
    insert_code_before__by_command(
        $code,
        "run",
        "return new Tempcode();",
        "if (\$type == 'workflow') {
            require_code('workflows'); // Load workflow-related code
            return workflow_update_handler();
        }",
        1,
        true
    );

    // Add workflow warnings to carousel mode galleries. This has to be done for images…
    insert_code_before__by_command(
        $code,
        "do_gallery_carousel_mode",
        "\$current_entry = do_template('GALLERY_CAROUSEL_MODE_IMAGE'",
        "// Add the workflow form if this entry is not validated
        if (\$row['validated'] == 0) {
            require_code('workflows');

            \$wf = get_workflow_of_content('image', strval(\$row['id']));
            if (\$wf !== null) {
                \$workflow_content_id = get_workflow_content_id('image', strval(\$row['id']));
                if (\$workflow_content_id !== null) {
                    \$warning_details->attach(get_workflow_form(\$workflow_content_id));
                }
            }
        }",
        1,
        true
    );

    // …and videos separately.
    insert_code_before__by_command(
        $code,
        "do_gallery_carousel_mode",
        "\$current_entry = do_template('GALLERY_CAROUSEL_MODE_VIDEO'",
        "// Add the workflow form if this entry is not validated
        if (\$row['validated'] == 0) {
            require_code('workflows');

            \$wf = get_workflow_of_content('video', strval(\$row['id']));
            if (\$wf !== null) {
                \$workflow_content_id = get_workflow_content_id('video', strval(\$row['id']));
                if (\$workflow_content_id !== null) {
                    \$warning_details->attach(get_workflow_form(\$workflow_content_id));
                }
            }
        }",
        1,
        true
    );

    // Add workflow warnings to images
    insert_code_before__by_command(
        $code,
        "show_image",
        "\$add_date = get_timezoned_date_time(\$myrow['add_date']);",
        "if (\$myrow['validated'] == 0) {
            require_code('workflows');

            \$workflow_content_id = get_workflow_content_id('image', strval(\$myrow['id']));
            if (\$workflow_content_id !== null) {
                \$warning_details->attach(get_workflow_form(\$workflow_content_id));
            }
        }",
        1,
        true
    );

    // …and videos separately.
    insert_code_before__by_command(
        $code,
        "show_video",
        "\$add_date = get_timezoned_date_time(\$myrow['add_date']);",
        "if (\$myrow['validated'] == 0) {
            require_code('workflows');

            \$workflow_content_id = get_workflow_content_id('video', strval(\$myrow['id']));
            if (\$workflow_content_id !== null) {
                \$warning_details->attach(get_workflow_form(\$workflow_content_id));
            }
        }",
        1,
        true
    );

    return $code;
}

Last edit: by Malatesa

Post

Posted
Rating:
#8346
This is very weird. disable_php_memory_limit() doesn't even exist in that file.

Please add to the tracker if you have not already done so, and I'll have a deeper look.
0 guests and 0 members have recently viewed this.