Announcement

#1 2021-09-26 20:54:58

notised
Member
2021-09-26
3

Cannot Get Piwigo to install on site

Hello/Hi/Greetings,

I'm having a difficult time getting Piwigo to run and install on my server. I am running an Ubuntu 20.04 server and have previously had Piwigo on here and working completely fine. I eventually ended up breaking some things on my server and ended up trying to start Piwigo from scratch. Only this time I am not able to get Piwigo to even install.

I was following the guide here- https://pojig.com/how-to-install-piwigo … ntu-20-04/

I installed all the packages listed in the guide and also had mysql-server installed. I was able to successfully set up mysql, and create the database named piwigo_db. Created the user and assigned them to the database. Checked everything to make sure and it looked all good to me.

The only thing i'm doing different from the guide above, is putting Piwigo in a sub directory since I would like for my site to list all the sub directories available and then be able to navigate to Piwigo from there.
so my file path looks like this: /var/www/mysite/piwigo

If I go to mysite.com, it shows me the directory with Piwigo listed. If I click Piwigo, it takes me to mysite.com/piwigo and it does not re-route me to piwigo/install.php, it simply just lists the code like so:

"0 && $page['start']>=count($page['items'])) { page_not_found('', duplicate_index_url(array('start'=>0))); } trigger_notify('loc_begin_index'); //---------------------------------------------- change of image display order if (isset($_GET['image_order'])) { if ( (int)$_GET['image_order'] > 0) { pwg_set_session_var('image_order', (int)$_GET['image_order']); } else { pwg_unset_session_var('image_order'); } redirect( duplicate_index_url( array(), // nothing to redefine array('start') // changing display order goes back to section first page ) ); } if (isset($_GET['display'])) { $page['meta_robots']['noindex']=1; if (array_key_exists($_GET['display'], ImageStdParams::get_defined_type_map())) { pwg_set_session_var('index_deriv', $_GET['display']); } } //-------------------------------------------------------------- initialization // navigation bar $page['navigation_bar'] = array(); if (count($page['items']) > $page['nb_image_page']) { $page['navigation_bar'] = create_navigation_bar( duplicate_index_url(array(), array('start')), count($page['items']), $page['start'], $page['nb_image_page'], true, 'start' ); } $template->assign('thumb_navbar', $page['navigation_bar'] ); // caddie filling :-) if (isset($_GET['caddie'])) { fill_caddie($page['items']); redirect(duplicate_index_url()); } if (isset($page['is_homepage']) and $page['is_homepage']) { $canonical_url = get_gallery_home_url(); } else { $start = $page['nb_image_page'] * round($page['start'] / $page['nb_image_page']); if ($start>0 && $start >= count($page['items']) ) { $start -= $page['nb_image_page']; } $canonical_url = duplicate_index_url(array('start' => $start)); } $template->assign('U_CANONICAL', $canonical_url); //-------------------------------------------------------------- page title $title = $page['title']; $template_title = $page['section_title']; $nb_items = count($page['items']); $template->assign('TITLE', $template_title); $template->assign('NB_ITEMS', $nb_items); //-------------------------------------------------------------- menubar include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); $template->set_filename('index', 'index.tpl'); // +-----------------------------------------------------------------------+ // | index page (categories, thumbnails, search, calendar, random, etc.) | // +-----------------------------------------------------------------------+ if ( empty($page['is_external']) ) { //----------------------------------------------------- template initialization $page['body_id'] = 'theCategoryPage'; if (isset($page['flat']) or isset($page['chronology_field'])) { $template->assign( 'U_MODE_NORMAL', duplicate_index_url( array(), array('chronology_field', 'start', 'flat') ) ); } if ($conf['index_flat_icon'] and !isset($page['flat']) and 'categories' == $page['section']) { $template->assign( 'U_MODE_FLAT', duplicate_index_url(array('flat' => ''), array('start', 'chronology_field')) ); } if (!isset($page['chronology_field'])) { $chronology_params = array( 'chronology_field' => 'created', 'chronology_style' => 'monthly', 'chronology_view' => 'list', ); if ($conf['index_created_date_icon']) { $template->assign( 'U_MODE_CREATED', duplicate_index_url( $chronology_params, array('start', 'flat') ) ); } if ($conf['index_posted_date_icon']) { $chronology_params['chronology_field'] = 'posted'; $template->assign( 'U_MODE_POSTED', duplicate_index_url( $chronology_params, array('start', 'flat') ) ); } } else { if ($page['chronology_field'] == 'created') { $chronology_field = 'posted'; } else { $chronology_field = 'created'; } if ($conf['index_'.$chronology_field.'_date_icon']) { $url = duplicate_index_url( array('chronology_field'=>$chronology_field ), array('chronology_date', 'start', 'flat') ); $template->assign( 'U_MODE_'.strtoupper($chronology_field), $url ); } } if ('search' == $page['section']) { $template->assign( 'U_SEARCH_RULES', get_root_url().'search_rules.php?search_id='.$page['search'] ); } if (isset($page['category']) and is_admin() and $conf['index_edit_icon']) { $template->assign( 'U_EDIT', get_root_url().'admin.php?page=album-'.$page['category']['id'] ); } if (is_admin() and !empty($page['items']) and $conf['index_caddie_icon']) { $template->assign( 'U_CADDIE', add_url_params(duplicate_index_url(), array('caddie'=>1) ) ); } if ( $page['section']=='search' and $page['start']==0 and !isset($page['chronology_field']) and isset($page['qsearch_details']) ) { $cats = array_merge( (array)@$page['qsearch_details']['matching_cats_no_images'], (array)@$page['qsearch_details']['matching_cats'] ); if (count($cats)) { usort($cats, 'name_compare'); $hints = array(); foreach ( $cats as $cat ) { $hints[] = get_cat_display_name( array($cat), '' ); } $template->assign( 'category_search_results', $hints); } $tags = (array)@$page['qsearch_details']['matching_tags']; foreach ( $tags as $tag ) { $tag['URL'] = make_index_url(array('tags'=>array($tag))); $template->append( 'tag_search_results', $tag); } if (empty($page['items'])) { $template->append( 'no_search_results', htmlspecialchars($page['qsearch_details']['q'])); } elseif (!empty($page['qsearch_details']['unmatched_terms'])) { $template->assign( 'no_search_results', array_map('htmlspecialchars', $page['qsearch_details']['unmatched_terms'])); } } // image order if ( $conf['index_sort_order_input'] and count($page['items']) > 0 and $page['section'] != 'most_visited' and $page['section'] != 'best_rated') { $preferred_image_orders = get_category_preferred_image_orders(); $order_idx = pwg_get_session_var( 'image_order', 0 ); // get first order field and direction $first_order = substr($conf['order_by'], 9); if (($pos = strpos($first_order, ',')) !== false) { $first_order = substr($first_order, 0, $pos); } $first_order = trim($first_order); $url = add_url_params( duplicate_index_url(), array('image_order' => '') ); $tpl_orders = array(); $order_selected = false; foreach ($preferred_image_orders as $order_id => $order) { if ($order[2]) { // force select if the field is the first field of order_by if (!$order_selected && $order[1]==$first_order) { $order_idx = $order_id; $order_selected = true; } $tpl_orders[ $order_id ] = array( 'DISPLAY' => $order[0], 'URL' => $url.$order_id, 'SELECTED' => $order_idx==$order_id, ); } } $tpl_orders[0]['SELECTED'] = !$order_selected; // unselect "Default" if another one is selected $template->assign('image_orders', $tpl_orders); } // category comment if (($page['start']==0 or $conf['album_description_on_all_pages']) and !isset($page['chronology_field']) and !empty($page['comment']) ) { $template->assign('CONTENT_DESCRIPTION', $page['comment'] ); } if ( isset($page['category']['count_categories']) and $page['category']['count_categories']==0 ) {// count_categories might be computed by menubar - if the case unassign flat link if no sub albums $template->clear_assign('U_MODE_FLAT'); } //------------------------------------------------------ main part : thumbnails if ( 0==$page['start'] and !isset($page['flat']) and !isset($page['chronology_field']) and ('recent_cats'==$page['section'] or 'categories'==$page['section']) and (!isset($page['category']['count_categories']) or $page['category']['count_categories']>0 ) ) { include(PHPWG_ROOT_PATH.'include/category_cats.inc.php'); } if ( !empty($page['items']) ) { include(PHPWG_ROOT_PATH.'include/category_default.inc.php'); if ($conf['index_sizes_icon']) { $url = add_url_params( duplicate_index_url(), array('display' => '') ); $selected_type = $template->get_template_vars('derivative_params')->type; $template->clear_assign( 'derivative_params' ); $type_map = ImageStdParams::get_defined_type_map(); unset($type_map[IMG_XXLARGE], $type_map[IMG_XLARGE]); foreach($type_map as $params) { $template->append( 'image_derivatives', array( 'DISPLAY' => l10n($params->type), 'URL' => $url.$params->type, 'SELECTED' => ($params->type == $selected_type ? true:false), ) ); } } } // slideshow // execute after init thumbs in order to have all picture informations if (!empty($page['cat_slideshow_url'])) { if (isset($_GET['slideshow'])) { redirect($page['cat_slideshow_url']); } elseif ($conf['index_slideshow_icon']) { $template->assign('U_SLIDESHOW', $page['cat_slideshow_url']); } } } //------------------------------------------------------------ end include(PHPWG_ROOT_PATH.'include/page_header.php'); trigger_notify('loc_end_index'); flush_page_messages(); $template->parse_index_buttons(); $template->pparse('index'); //------------------------------------------------------------ log informations pwg_log(); include(PHPWG_ROOT_PATH.'include/page_tail.php'); ?> "

If I manually go to mysite.com/piwigo/install.php I get a different set of code that is displayed:

"$v) { if( is_array($_POST[$k]) ) { foreach($_POST[$k] as $k2 => $v2) { $_POST[$k][$k2] = addslashes($v2); } @reset($_POST[$k]); } else { $_POST[$k] = addslashes($v); } } @reset($_POST); } if( is_array($_GET) ) { foreach($_GET as $k => $v ) { if( is_array($_GET[$k]) ) { foreach($_GET[$k] as $k2 => $v2) { $_GET[$k][$k2] = addslashes($v2); } @reset($_GET[$k]); } else { $_GET[$k] = addslashes($v); } } @reset($_GET); } if( is_array($_COOKIE) ) { foreach($_COOKIE as $k => $v) { if( is_array($_COOKIE[$k]) ) { foreach($_COOKIE[$k] as $k2 => $v2) { $_COOKIE[$k][$k2] = addslashes($v2); } @reset($_COOKIE[$k]); } else { $_COOKIE[$k] = addslashes($v); } } @reset($_COOKIE); } } //----------------------------------------------------- variable initialization define('DEFAULT_PREFIX_TABLE', 'piwigo_'); if (isset($_POST['install'])) { $prefixeTable = $_POST['prefix']; } else { $prefixeTable = DEFAULT_PREFIX_TABLE; } include(PHPWG_ROOT_PATH . 'include/config_default.inc.php'); @include(PHPWG_ROOT_PATH. 'local/config/config.inc.php'); defined('PWG_LOCAL_DIR') or define('PWG_LOCAL_DIR', 'local/'); include(PHPWG_ROOT_PATH . 'include/functions.inc.php'); include(PHPWG_ROOT_PATH . 'include/template.class.php'); // download database config file if exists check_input_parameter('dl', $_GET, false, '/^[a-f0-9]{32}$/'); if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'])) { $filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl']; header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); header('Content-Disposition: attachment; filename="database.inc.php"'); header('Content-Transfer-Encoding: binary'); header('Content-Length: '.filesize($filename)); echo file_get_contents($filename); unlink($filename); exit(); } // Obtain various vars $dbhost = (!empty($_POST['dbhost'])) ? $_POST['dbhost'] : 'localhost'; $dbuser = (!empty($_POST['dbuser'])) ? $_POST['dbuser'] : ''; $dbpasswd = (!empty($_POST['dbpasswd'])) ? $_POST['dbpasswd'] : ''; $dbname = (!empty($_POST['dbname'])) ? $_POST['dbname'] : ''; // dblayer if (extension_loaded('mysqli')) { $dblayer = 'mysqli'; } else { if (version_compare(PHP_VERSION, '7') >= 0) { fatal_error('PHP extension "mysqli" is not loaded'); } if (!extension_loaded('mysql')) { fatal_error('No PHP extension installed for mysql, Piwigo needs one'); } $dblayer = 'mysql'; } $admin_name = (!empty($_POST['admin_name'])) ? $_POST['admin_name'] : ''; $admin_pass1 = (!empty($_POST['admin_pass1'])) ? $_POST['admin_pass1'] : ''; $admin_pass2 = (!empty($_POST['admin_pass2'])) ? $_POST['admin_pass2'] : ''; $admin_mail = (!empty($_POST['admin_mail'])) ? $_POST['admin_mail'] : ''; $is_newsletter_subscribe = true; if (isset($_POST['install'])) { $is_newsletter_subscribe = isset($_POST['newsletter_subscribe']); } $infos = array(); $errors = array(); $config_file = PHPWG_ROOT_PATH.PWG_LOCAL_DIR .'config/database.inc.php'; if (@file_exists($config_file)) { include($config_file); // Is Piwigo already installed ? if (defined("PHPWG_INSTALLED")) { die('Piwigo is already installed'); } } include(PHPWG_ROOT_PATH . 'include/constants.php'); include(PHPWG_ROOT_PATH . 'admin/include/functions.php'); include(PHPWG_ROOT_PATH . 'admin/include/languages.class.php'); $languages = new languages('utf-8'); if (isset($_GET['language'])) { $language = strip_tags($_GET['language']); if (!in_array($language, array_keys($languages->fs_languages))) { $language = PHPWG_DEFAULT_LANGUAGE; } } else { $language = 'en_UK'; // Try to get browser language foreach ($languages->fs_languages as $language_code => $fs_language) { if (substr($language_code,0,2) == @substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2)) { $language = $language_code; break; } } } if ('fr_FR' == $language) { define('PHPWG_DOMAIN', 'fr.piwigo.org'); } else if ('it_IT' == $language) { define('PHPWG_DOMAIN', 'it.piwigo.org'); } else if ('de_DE' == $language) { define('PHPWG_DOMAIN', 'de.piwigo.org'); } else if ('es_ES' == $language) { define('PHPWG_DOMAIN', 'es.piwigo.org'); } else if ('pl_PL' == $language) { define('PHPWG_DOMAIN', 'pl.piwigo.org'); } else if ('zh_CN' == $language) { define('PHPWG_DOMAIN', 'cn.piwigo.org'); } else if ('ru_RU' == $language) { define('PHPWG_DOMAIN', 'ru.piwigo.org'); } else if ('nl_NL' == $language) { define('PHPWG_DOMAIN', 'nl.piwigo.org'); } else if ('tr_TR' == $language) { define('PHPWG_DOMAIN', 'tr.piwigo.org'); } else if ('da_DK' == $language) { define('PHPWG_DOMAIN', 'da.piwigo.org'); } else if ('pt_BR' == $language) { define('PHPWG_DOMAIN', 'br.piwigo.org'); } else { define('PHPWG_DOMAIN', 'piwigo.org'); } define('PHPWG_URL', 'https://'.PHPWG_DOMAIN); load_language('common.lang', '', array('language' => $language, 'target_charset'=>'utf-8')); load_language('admin.lang', '', array('language' => $language, 'target_charset'=>'utf-8')); load_language('install.lang', '', array('language' => $language, 'target_charset'=>'utf-8')); header('Content-Type: text/html; charset=UTF-8'); //------------------------------------------------- check php version if (version_compare(PHP_VERSION, REQUIRED_PHP_VERSION, '<')) { include(PHPWG_ROOT_PATH.'install/php5_apache_configuration.php'); } //----------------------------------------------------- template initialization $template = new Template(PHPWG_ROOT_PATH.'admin/themes', 'clear'); $template->set_filenames( array('install' => 'install.tpl') ); if (!isset($step)) { $step = 1; } //---------------------------------------------------------------- form analyze include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$dblayer.'.inc.php'); include(PHPWG_ROOT_PATH . 'admin/include/functions_install.inc.php'); include(PHPWG_ROOT_PATH . 'admin/include/functions_upgrade.php'); if (isset($_POST['install'])) { install_db_connect($infos, $errors); pwg_db_check_charset(); $webmaster = trim(preg_replace('/\s{2,}/', ' ', $admin_name)); if (empty($webmaster)) { $errors[] = l10n('enter a login for webmaster'); } else if (preg_match( '/[\'"]/', $webmaster)) { $errors[] = l10n('webmaster login can\'t contain characters \' or "'); } if ($admin_pass1 != $admin_pass2 || empty($admin_pass1)) { $errors[] = l10n('please enter your password again'); } if (empty($admin_mail)) { $errors[] = l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)'); } else { $error_mail_address = validate_mail_address(null, $admin_mail); if (!empty($error_mail_address)) { $errors[] = $error_mail_address; } } if ( count( $errors ) == 0 ) { $step = 2; $file_content = ''; @umask(0111); // writing the configuration file if ( !($fp = @fopen( $config_file, 'w' ))) { // make sure nobody can list files of _data directory secure_directory(PHPWG_ROOT_PATH.$conf['data_location']); $tmp_filename = md5(uniqid(time())); $fh = @fopen( PHPWG_ROOT_PATH.$conf['data_location'] . 'pwg_' . $tmp_filename, 'w' ); @fputs($fh, $file_content, strlen($file_content)); @fclose($fh); $template->assign( array( 'config_creation_failed' => true, 'config_url' => 'install.php?dl='.$tmp_filename, 'config_file_content' => $file_content, ) ); } @fputs($fp, $file_content, strlen($file_content)); @fclose($fp); // tables creation, based on piwigo_structure.sql execute_sqlfile( PHPWG_ROOT_PATH.'install/piwigo_structure-mysql.sql', DEFAULT_PREFIX_TABLE, $prefixeTable, 'mysql' ); // We fill the tables with basic informations execute_sqlfile( PHPWG_ROOT_PATH.'install/config.sql', DEFAULT_PREFIX_TABLE, $prefixeTable, 'mysql' ); $query = ' INSERT INTO '.$prefixeTable.'config (param,value,comment) VALUES (\'secret_key\',md5('.pwg_db_cast_to_text(DB_RANDOM_FUNCTION.'()').'), \'a secret key specific to the gallery for internal use\');'; pwg_query($query); conf_update_param('piwigo_db_version', get_branch_from_version(PHPWG_VERSION)); conf_update_param('gallery_title', pwg_db_real_escape_string(l10n('Just another Piwigo gallery'))); conf_update_param( 'page_banner', '
%gallery_title%
'."\n\n

".pwg_db_real_escape_string(l10n('Welcome to my photo gallery')).'
' ); // fill languages table, only activate the current language $languages->perform_action('activate', $language); // fill $conf global array load_conf_from_db(); // PWG_CHARSET is required for building the fs_themes array in the // themes class if (!defined('PWG_CHARSET')) { define('PWG_CHARSET', 'utf-8'); } activate_core_themes(); activate_core_plugins(); $insert = array( 'id' => 1, 'galleries_url' => PHPWG_ROOT_PATH.'galleries/', ); mass_inserts(SITES_TABLE, array_keys($insert), array($insert)); // webmaster admin user $inserts = array( array( 'id' => 1, 'username' => $admin_name, 'password' => md5($admin_pass1), 'mail_address' => $admin_mail, ), array( 'id' => 2, 'username' => 'guest', ), ); mass_inserts(USERS_TABLE, array_keys($inserts[0]), $inserts); create_user_infos(array(1,2), array('language' => $language)); // Available upgrades must be ignored after a fresh installation. To // make PWG avoid upgrading, we must tell it upgrades have already been // made. list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); define('CURRENT_DATE', $dbnow); $datas = array(); foreach (get_available_upgrade_ids() as $upgrade_id) { $datas[] = array( 'id' => $upgrade_id, 'applied' => CURRENT_DATE, 'description' => 'upgrade included in installation', ); } mass_inserts( UPGRADE_TABLE, array_keys($datas[0]), $datas ); if ($is_newsletter_subscribe) { fetchRemote( get_newsletter_subscribe_base_url($language).$admin_mail, $result, array(), array('origin' => 'installation') ); conf_update_param('show_newsletter_subscription', 'false'); } } } //------------------------------------------------------ start template output foreach ($languages->fs_languages as $language_code => $fs_language) { if ($language == $language_code) { $template->assign('language_selection', $language_code); } $languages_options[$language_code] = $fs_language['name']; } $template->assign('language_options', $languages_options); $template->assign( array( 'T_CONTENT_ENCODING' => 'utf-8', 'RELEASE' => PHPWG_VERSION, 'F_ACTION' => 'install.php?language=' . $language, 'F_DB_HOST' => $dbhost, 'F_DB_USER' => $dbuser, 'F_DB_NAME' => $dbname, 'F_DB_PREFIX' => $prefixeTable, 'F_ADMIN' => $admin_name, 'F_ADMIN_EMAIL' => $admin_mail, 'EMAIL' => ''.$admin_mail.'', 'F_NEWSLETTER_SUBSCRIBE' => $is_newsletter_subscribe, 'L_INSTALL_HELP' => l10n('Need help ? Ask your question on Piwigo message board.', PHPWG_URL.'/forum'), )); //------------------------------------------------------ errors & infos display if ($step == 1) { $template->assign('install', true); } else { $infos[] = l10n('Congratulations, Piwigo installation is completed'); if (isset($error_copy)) { $errors[] = $error_copy; } else { session_set_save_handler('pwg_session_open', 'pwg_session_close', 'pwg_session_read', 'pwg_session_write', 'pwg_session_destroy', 'pwg_session_gc' ); if ( function_exists('ini_set') ) { ini_set('session.use_cookies', $conf['session_use_cookies']); ini_set('session.use_only_cookies', $conf['session_use_only_cookies']); ini_set('session.use_trans_sid', intval($conf['session_use_trans_sid'])); ini_set('session.cookie_httponly', 1); } session_name($conf['session_name']); session_set_cookie_params(0, cookie_path()); register_shutdown_function('session_write_close'); $user = build_user(1, true); log_user($user['id'], false); // email notification if (isset($_POST['send_credentials_by_mail'])) { include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); $keyargs_content = array( get_l10n_args('Hello %s,', $admin_name), get_l10n_args('Welcome to your new installation of Piwigo!', ''), get_l10n_args('', ''), get_l10n_args('Here are your connection settings', ''), get_l10n_args('', ''), get_l10n_args('Link: %s', get_absolute_root_url()), get_l10n_args('Username: %s', $admin_name), get_l10n_args('Password: ********** (no copy by email)', ''), get_l10n_args('Email: %s', $admin_mail), get_l10n_args('', ''), get_l10n_args('Don\'t hesitate to consult our forums for any help: %s', PHPWG_URL), ); pwg_mail( $admin_mail, array( 'subject' => l10n('Just another Piwigo gallery'), 'content' => l10n_args($keyargs_content), 'content_format' => 'text/plain', ) ); } } } if (count($errors) != 0) { $template->assign('errors', $errors); } if (count($infos) != 0 ) { $template->assign('infos', $infos); } //----------------------------------------------------------- html code display $template->pparse('install'); ?> "

I'm able to do everything up to step 5 on the guide cited above, but when trying to get to mysite.com/piwigo/install.php I am met with the above code that doesn't show me any error message or missing php/mysql packages.

Is there something wrong I am doing this time around? I was able to get it working just fine previously following this guide, but for some reason this time around I am having a difficult time.

Some system info:

PHP 7.4.3 (cli) (built: Aug 13 2021 05:39:12) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

mysqladmin  Ver 8.0.26-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))
Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version          8.0.26-0ubuntu0.20.04.2
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/run/mysqld/mysqld.sock
Uptime:                 2 days 1 hour 16 min 58 sec

Threads: 2  Questions: 666  Slow queries: 0  Opens: 600  Flush tables: 3  Open tables: 519  Queries per second avg: 0.003

These are the php packages I have installed:
libapache2-mod-php7.4/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
libapache2-mod-php/focal,now 2:7.4+75 all [installed]
php-cli/focal,now 2:7.4+75 all [installed]
php-common/focal,now 2:75 all [installed]
php-curl/focal,now 2:7.4+75 all [installed]
php-gd/focal,now 2:7.4+75 all [installed]
php-intl/focal,now 2:7.4+75 all [installed]
php-ldap/focal,now 2:7.4+75 all [installed]
php-mbstring/focal,now 2:7.4+75 all [installed]
php-mysql/focal,now 2:7.4+75 all [installed]
php-xml/focal,now 2:7.4+75 all [installed]
php-xmlrpc/focal,now 2:7.4+75 all [installed]
php-zip/focal,now 2:7.4+75 all [installed]
php7.4-cli/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
php7.4-common/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
php7.4-curl/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
php7.4-gd/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
php7.4-intl/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
php7.4-json/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
php7.4-ldap/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
php7.4-mbstring/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
php7.4-mysql/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed]
php7.4-opcache/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
php7.4-readline/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
php7.4-xml/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
php7.4-xmlrpc/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
php7.4-zip/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed,automatic]
php7.4/focal-updates,now 7.4.3-4ubuntu2.6 all [installed,automatic]
php/focal,now 2:7.4+75 all [installed]

These are the mysql packages I have installed:
mysql-client-8.0/focal-updates,focal-security,now 8.0.26-0ubuntu0.20.04.2 amd64 [installed,automatic]
mysql-client-core-8.0/focal-updates,focal-security,now 8.0.26-0ubuntu0.20.04.2 amd64 [installed,automatic]
mysql-common/focal,now 5.8+1.0.5ubuntu2 all [installed,automatic]
mysql-server-8.0/focal-updates,focal-security,now 8.0.26-0ubuntu0.20.04.2 amd64 [installed,automatic]
mysql-server-core-8.0/focal-updates,focal-security,now 8.0.26-0ubuntu0.20.04.2 amd64 [installed,automatic]
mysql-server/focal-updates,focal-security,now 8.0.26-0ubuntu0.20.04.2 all [installed]
php-mysql/focal,now 2:7.4+75 all [installed]
php7.4-mysql/focal-updates,now 7.4.3-4ubuntu2.6 amd64 [installed]

Last edited by notised (2021-09-26 21:20:50)

Offline

 

#2 2021-09-27 12:33:32

erAck
Only trying to help
2015-09-06
1998

Re: Cannot Get Piwigo to install on site

Looks like PHP is installed but not enabled for Apache.
This search leads to possible answers, among them the first hit. The solution might be as simple as to executing

Code:

sudo a2enmod php7.4

Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2021-09-27 15:40:10

notised
Member
2021-09-26
3

Re: Cannot Get Piwigo to install on site

Awesome find! I was thinking there may be some issue with php since it didn't seem to be loading while everything was there.

I did have an error while running the command

sudo a2enmod php7.4

It said it did not exist in /etc/apache2/mods-available and it also wasn't enabled. I just purged php7* and ran the autoremove commands and then installed php all over again. One installed I ran sudo a2enmod php7.4 again and it worked this time.

Went to load my Piwigo page and it showed me the error message about needing mysqli so I ran sudo apt install php-mysqlnd and then restarted apache2 with sudo systemctl restart apache2.service and everything was up and running perfectly.

Thank you so much for your help on this one. Lesson learned, use autoremove/purge when removing more intricate programs.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact