Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 11/12/2016, à 10:47

Lannelide

Pas de visuel sur phpmyadmin // pas de php sur page web créée

Bonjour,,

J'ai travaillé sur un site web sur un  Mac et utilisé Mamp pour le visualiser sans problème.
les pages sont en .php, il y a des balises pour le menu, footer etc en php.
Tout fonctionne sur différents navigateurs (sur le Mac).

Aujourd'hui, je souhaite pouvoir copier le dossier contenant mon site sur mon pc portable linux.


Je viens de suivre le tuto: Installation Apache Mysql PHP phpmyadmin (+ vidéo).

J'ai placé mon dossier dans /srv/html

1-Lorsque je vais sur localhost, mon dossier est visible, si je clique sur une des pages, je n'ai droit qu'a ce qui ressemble à mon code html/css present sur la dite page. Aucune balises php ne sont chargées.

2-Quand je tape localhost/phpmyadmin dans la barre du navigateur il y a un "- Accès refusé !" à coté.
Lorsque je vais sur localhost/phpmyadmin j'ai une page blanche avec du code:

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * Main loader script
 *
 * @package PhpMyAdmin
 */

/**
 * Gets some core libraries and displays a top message if required
 */
require_once 'libraries/common.inc.php';

/**
 * display Git revision if requested
 */
require_once 'libraries/display_git_revision.lib.php';
require_once 'libraries/Template.class.php';

/**
 * pass variables to child pages
 */
$drops = array(
    'lang',
    'server',
    'collation_connection',
    'db',
    'table'
);
foreach ($drops as $each_drop) {
    if (array_key_exists($each_drop, $_GET)) {
        unset($_GET[$each_drop]);
    }
}
unset($drops, $each_drop);

/*
 * Black list of all scripts to which front-end must submit data.
 * Such scripts must not be loaded on home page.
 *
 */
$target_blacklist = array (
    'import.php', 'export.php'
);

// If we have a valid target, let's load that script instead
if (! empty($_REQUEST['target'])
    && is_string($_REQUEST['target'])
    && ! preg_match('/^index/', $_REQUEST['target'])
    && ! in_array($_REQUEST['target'], $target_blacklist)
    && in_array($_REQUEST['target'], $goto_whitelist)
) {
    include $_REQUEST['target'];
    exit;
}

if (isset($_REQUEST['ajax_request']) && ! empty($_REQUEST['access_time'])) {
    exit;
}

// See FAQ 1.34
if (! empty($_REQUEST['db'])) {
    $page = null;
    if (! empty($_REQUEST['table'])) {
        $page = PMA_Util::getScriptNameForOption(
            $GLOBALS['cfg']['DefaultTabTable'], 'table'
        );
    } else {
        $page = PMA_Util::getScriptNameForOption(
            $GLOBALS['cfg']['DefaultTabDatabase'], 'database'
        );
    }
    include $page;
    exit;
}

/**
 * Check if it is an ajax request to reload the recent tables list.
 */
require_once 'libraries/RecentFavoriteTable.class.php';
if ($GLOBALS['is_ajax_request'] && ! empty($_REQUEST['recent_table'])) {
    $response = PMA_Response::getInstance();
    $response->addJSON(
        'list',
        PMA_RecentFavoriteTable::getInstance('recent')->getHtmlList()
    );
    exit;
}

if ($GLOBALS['PMA_Config']->isGitRevision()) {
    if (isset($_REQUEST['git_revision']) && $GLOBALS['is_ajax_request'] == true) {
        PMA_printGitRevision();
        exit;
    }
    echo '<div id="is_git_revision"></div>';
}

// Handles some variables that may have been sent by the calling script
$GLOBALS['db'] = '';
$GLOBALS['table'] = '';
$show_query = '1';

// Any message to display?
if (! empty($message)) {
    echo PMA_Util::getMessage($message);
    unset($message);
}

$common_url_query =  PMA_URL_getCommon();
$mysql_cur_user_and_host = '';

// when $server > 0, a server has been chosen so we can display
// all MySQL-related information
if ($server > 0) {
    include 'libraries/server_common.inc.php';
    include 'libraries/StorageEngine.class.php';

    // Use the verbose name of the server instead of the hostname
    // if a value is set
    $server_info = '';
    if (! empty($cfg['Server']['verbose'])) {
        $server_info .= htmlspecialchars($cfg['Server']['verbose']);
        if ($GLOBALS['cfg']['ShowServerInfo']) {
            $server_info .= ' (';
        }
    }
    if ($GLOBALS['cfg']['ShowServerInfo'] || empty($cfg['Server']['verbose'])) {
        $server_info .= $GLOBALS['dbi']->getHostInfo();
    }
    if (! empty($cfg['Server']['verbose']) && $GLOBALS['cfg']['ShowServerInfo']) {
        $server_info .= ')';
    }
    $mysql_cur_user_and_host = $GLOBALS['dbi']->fetchValue('SELECT USER();');

    // should we add the port info here?
    $short_server_info = (!empty($GLOBALS['cfg']['Server']['verbose'])
                ? $GLOBALS['cfg']['Server']['verbose']
                : $GLOBALS['cfg']['Server']['host']);
}

echo '<div id="maincontainer">' . "\n";
// Anchor for favorite tables synchronization.
echo PMA_RecentFavoriteTable::getInstance('favorite')->getHtmlSyncFavoriteTables();
echo '<div id="main_pane_left">';
if ($server > 0 || count($cfg['Servers']) > 1
) {
    if ($cfg['DBG']['demo']) {
        echo '<div class="group">';
        echo '<h2>' . __('phpMyAdmin Demo Server') . '</h2>';
        echo '<p style="margin: 0.5em 1em 0.5em 1em">';
        printf(
            __(
                'You are using the demo server. You can do anything here, but '
                . 'please do not change root, debian-sys-maint and pma users. '
                . 'More information is available at %s.'
            ),
            '<a href="http://demo.phpmyadmin.net/">demo.phpmyadmin.net</a>'
        );
        echo '</p>';
        echo '</div>';
    }
    echo '<div class="group">';
    echo '<h2>' . __('General settings') . '</h2>';
    echo '<ul>';

    /**
     * Displays the MySQL servers choice form
     */
    if ($cfg['ServerDefault'] == 0
        || (! $cfg['NavigationDisplayServers']
        && (count($cfg['Servers']) > 1
        || ($server == 0 && count($cfg['Servers']) == 1)))
    ) {
        echo '<li id="li_select_server" class="no_bullets" >';
        include_once 'libraries/select_server.lib.php';
        echo PMA_Util::getImage('s_host.png') . " " . PMA_selectServer(true, true);
        echo '</li>';
    }

    /**
     * Displays the mysql server related links
     */
    if ($server > 0 && ! PMA_DRIZZLE) {
        include_once 'libraries/check_user_privileges.lib.php';

        // Logout for advanced authentication
        if ($cfg['Server']['auth_type'] != 'config') {
            if ($cfg['ShowChgPassword']) {
                $conditional_class = 'ajax';
                PMA_printListItem(
                    PMA_Util::getImage('s_passwd.png') . "&nbsp;" . __('Change password'),
                    'li_change_password',
                    'user_password.php' . $common_url_query,
                    null,
                    null,
                    'change_password_anchor',
                    "no_bullets",
                    $conditional_class
                );
            }
        } // end if
        echo '    <li id="li_select_mysql_collation" class="no_bullets" >';
        echo '        <form method="post" action="index.php">' . "\n"
           . PMA_URL_getHiddenInputs(null, null, 4, 'collation_connection')
           . '            <label for="select_collation_connection">' . "\n"
           . '                ' . PMA_Util::getImage('s_asci.png') . "&nbsp;"
                               . __('Server connection collation') . "\n"
           // put the doc link in the form so that it appears on the same line
           . PMA_Util::showMySQLDocu('Charset-connection')
           . ': ' .  "\n"
           . '            </label>' . "\n"

           . PMA_generateCharsetDropdownBox(
               PMA_CSDROPDOWN_COLLATION,
               'collation_connection',
               'select_collation_connection',
               $collation_connection,
               true,
               true
           )
           . '        </form>' . "\n"
           . '    </li>' . "\n";
    } // end of if ($server > 0 && !PMA_DRIZZLE)
    echo '</ul>';
    echo '</div>';
}

echo '<div class="group">';
echo '<h2>' . __('Appearance settings') . '</h2>';
echo '  <ul>';

// Displays language selection combo
if (empty($cfg['Lang']) && count($GLOBALS['available_languages']) > 1) {
    echo '<li id="li_select_lang" class="no_bullets">';
    include_once 'libraries/display_select_lang.lib.php';
    echo PMA_Util::getImage('s_lang.png') . " " . PMA_getLanguageSelectorHtml();
    echo '</li>';
}

// ThemeManager if available

if ($GLOBALS['cfg']['ThemeManager']) {
    echo '<li id="li_select_theme" class="no_bullets">';
    echo PMA_Util::getImage('s_theme.png') . " "
            .  $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox();
    echo '</li>';
}
echo '<li id="li_select_fontsize">';
echo PMA_Config::getFontsizeForm();
echo '</li>';

echo '</ul>';

// User preferences

if ($server > 0) {
    echo '<ul>';
    PMA_printListItem(
        PMA_Util::getImage('b_tblops.png') . "&nbsp;" . __('More settings'),
        'li_user_preferences',
        'prefs_manage.php' . $common_url_query,
        null,
        null,
        null,
        "no_bullets"
    );
    echo '</ul>';
}

echo '</div>';


echo '</div>';
echo '<div id="main_pane_right">';


if ($server > 0 && $GLOBALS['cfg']['ShowServerInfo']) {

    echo '<div class="group">';
    echo '<h2>' . __('Database server') . '</h2>';
    echo '<ul>' . "\n";
    PMA_printListItem(
        __('Server:') . ' ' . $server_info,
        'li_server_info'
    );
    PMA_printListItem(
        __('Server type:') . ' ' . PMA_Util::getServerType(),
        'li_server_type'
    );
    PMA_printListItem(
        __('Server version:')
        . ' '
        . PMA_MYSQL_STR_VERSION . ' - ' . PMA_MYSQL_VERSION_COMMENT,
        'li_server_version'
    );
    PMA_printListItem(
        __('Protocol version:') . ' ' . $GLOBALS['dbi']->getProtoInfo(),
        'li_mysql_proto'
    );
    PMA_printListItem(
        __('User:') . ' ' . htmlspecialchars($mysql_cur_user_and_host),
        'li_user_info'
    );

    echo '    <li id="li_select_mysql_charset">';
    echo '        ' . __('Server charset:') . ' '
       . '        <span lang="en" dir="ltr">';
    if (! PMA_DRIZZLE) {
        echo '           '
            . $mysql_charsets_descriptions[$mysql_charset_map['utf-8']];
    }
    echo '           (' . $mysql_charset_map['utf-8'] . ')'
       . '        </span>'
       . '    </li>'
       . '  </ul>'
       . ' </div>';
}

if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) {
    echo '<div class="group">';
    echo '<h2>' . __('Web server') . '</h2>';
    echo '<ul>';
    if ($GLOBALS['cfg']['ShowServerInfo']) {
        PMA_printListItem($_SERVER['SERVER_SOFTWARE'], 'li_web_server_software');

        if ($server > 0) {
            $client_version_str = $GLOBALS['dbi']->getClientInfo();
            if (preg_match('#\d+\.\d+\.\d+#', $client_version_str)) {
                $client_version_str = 'libmysql - ' . $client_version_str;
            }
            PMA_printListItem(
                __('Database client version:') . ' ' . $client_version_str,
                'li_mysql_client_version'
            );

            $php_ext_string = __('PHP extension:') . ' ';
            if (PMA_DatabaseInterface::checkDbExtension('mysqli')) {
                $extension = 'mysqli';
            } else {
                $extension = 'mysql';
            }
            $php_ext_string  .= $extension . ' '
                . PMA_Util::showPHPDocu('book.' . $extension . '.php');

            PMA_printListItem(
                $php_ext_string,
                'li_used_php_extension'
            );

            $php_version_string = __('PHP version:') . ' ' . phpversion();

            PMA_printListItem(
                $php_version_string,
                'li_used_php_version'
            );
        }
    }

    if ($cfg['ShowPhpInfo']) {
        PMA_printListItem(
            __('Show PHP information'),
            'li_phpinfo',
            'phpinfo.php' . $common_url_query,
            null,
            '_blank'
        );
    }
    echo '  </ul>';
    echo ' </div>';
}

echo '<div class="group pmagroup">';
echo '<h2>phpMyAdmin</h2>';
echo '<ul>';
$class = null;
// We rely on CSP to allow access to http://www.phpmyadmin.net, but IE lacks
// support here and does not allow request to http once using https.
if ($GLOBALS['cfg']['VersionCheck']
    && (! $GLOBALS['PMA_Config']->get('is_https') || PMA_USR_BROWSER_AGENT != 'IE')
) {
    $class = 'jsversioncheck';
}
PMA_printListItem(
    __('Version information:') . ' <span class="version">' . PMA_VERSION . '</span>',
    'li_pma_version',
    null,
    null,
    null,
    null,
    $class
);
PMA_printListItem(
    __('Documentation'),
    'li_pma_docs',
    PMA_Util::getDocuLink('index'),
    null,
    '_blank'
);
PMA_printListItem(
    __('Wiki'),
    'li_pma_wiki',
    PMA_linkURL('http://wiki.phpmyadmin.net/'),
    null,
    '_blank'
);

// does not work if no target specified, don't know why
PMA_printListItem(
    __('Official Homepage'),
    'li_pma_homepage',
    PMA_linkURL('http://www.phpMyAdmin.net/'),
    null,
    '_blank'
);
PMA_printListItem(
    __('Contribute'),
    'li_pma_contribute',
    PMA_linkURL('https://www.phpmyadmin.net/contribute/'),
    null,
    '_blank'
);
PMA_printListItem(
    __('Get support'),
    'li_pma_support',
    PMA_linkURL('https://www.phpmyadmin.net/support/'),
    null,
    '_blank'
);
PMA_printListItem(
    __('List of changes'),
    'li_pma_changes',
    'changelog.php' . PMA_URL_getCommon(),
    null,
    '_blank'
);
echo '    </ul>';
echo ' </div>';

echo '</div>';

echo '</div>';

/**
 * Warning if using the default MySQL privileged account
 */
if ($server != 0
    && $cfg['Server']['user'] == 'root'
    && $cfg['Server']['password'] == ''
) {
    trigger_error(
        __(
            'You are connected as \'root\' with no password, which'
            . ' corresponds to the default MySQL privileged account.'
            . ' Your MySQL server is running with this default, is open to'
            . ' intrusion, and you really should fix this security hole by'
            . ' setting a password for user \'root\'.'
        ),
        E_USER_WARNING
    );
}

/**
 * As we try to handle charsets by ourself, mbstring overloads just
 * break it, see bug 1063821.
 */
if (@extension_loaded('mbstring') && @ini_get('mbstring.func_overload') > 1) {
    trigger_error(
        __(
            'You have enabled mbstring.func_overload in your PHP '
            . 'configuration. This option is incompatible with phpMyAdmin '
            . 'and might cause some data to be corrupted!'
        ),
        E_USER_WARNING
    );
}

/**
 * mbstring is used for handling multibytes inside parser, so it is good
 * to tell user something might be broken without it, see bug #1063149.
 */
if (! @extension_loaded('mbstring')) {
    trigger_error(
        __(
            'The mbstring PHP extension was not found and you seem to be using'
            . ' a multibyte charset. Without the mbstring extension phpMyAdmin'
            . ' is unable to split strings correctly and it may result in'
            . ' unexpected results.'
        ),
        E_USER_WARNING
    );
}

if ($cfg['LoginCookieValidityDisableWarning'] == false) {
    /**
     * Check whether session.gc_maxlifetime limits session validity.
     */
    $gc_time = (int)@ini_get('session.gc_maxlifetime');
    if ($gc_time < $GLOBALS['cfg']['LoginCookieValidity'] ) {
        trigger_error(
            __(
                'Your PHP parameter [a@http://php.net/manual/en/session.' .
                'configuration.php#ini.session.gc-maxlifetime@_blank]session.' .
                'gc_maxlifetime[/a] is lower than cookie validity configured ' .
                'in phpMyAdmin, because of this, your login might expire sooner ' .
                'than configured in phpMyAdmin.'
            ),
            E_USER_WARNING
        );
    }
}

/**
 * Check whether LoginCookieValidity is limited by LoginCookieStore.
 */
if ($GLOBALS['cfg']['LoginCookieStore'] != 0
    && $GLOBALS['cfg']['LoginCookieStore'] < $GLOBALS['cfg']['LoginCookieValidity']
) {
    trigger_error(
        __(
            'Login cookie store is lower than cookie validity configured in ' .
            'phpMyAdmin, because of this, your login will expire sooner than ' .
            'configured in phpMyAdmin.'
        ),
        E_USER_WARNING
    );
}

/**
 * Check if user does not have defined blowfish secret and it is being used.
 */
if (! empty($_SESSION['encryption_key'])
    && empty($GLOBALS['cfg']['blowfish_secret'])
) {
    trigger_error(
        __(
            'The configuration file now needs a secret passphrase (blowfish_secret).'
        ),
        E_USER_WARNING
    );
}

/**
 * Check for existence of config directory which should not exist in
 * production environment.
 */
if (file_exists('config')) {
    trigger_error(
        __(
            'Directory [code]config[/code], which is used by the setup script, ' .
            'still exists in your phpMyAdmin directory. It is strongly ' .
            'recommended to remove it once phpMyAdmin has been configured. ' .
            'Otherwise the security of your server may be compromised by ' .
            'unauthorized people downloading your configuration.'
        ),
        E_USER_WARNING
    );
}

if ($server > 0) {
    $cfgRelation = PMA_getRelationsParam();
    if (! $cfgRelation['allworks']
        && $cfg['PmaNoRelation_DisableWarning'] == false
    ) {
        $msg_text = __(
            'The phpMyAdmin configuration storage is not completely '
            . 'configured, some extended features have been deactivated. '
            . '%sFind out why%s. '
        );
        if ($cfg['ZeroConf'] == true) {
            $msg_text .= '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' .
                __(
                    'Or alternately go to \'Operations\' tab of any database '
                    . 'to set it up there.'
                );
        }
        $msg = PMA_Message::notice($msg_text);
        $msg->addParam(
            '<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php'
            . $common_url_query . '">',
            false
        );
        $msg->addParam('</a>', false);
        /* Show error if user has configured something, notice elsewhere */
        if (!empty($cfg['Servers'][$server]['pmadb'])) {
            $msg->isError(true);
        }
        $msg->display();
    } // end if
}

/**
 * Warning about different MySQL library and server version
 * (a difference on the third digit does not count).
 * If someday there is a constant that we can check about mysqlnd,
 * we can use it instead of strpos().
 * If no default server is set, $GLOBALS['dbi'] is not defined yet.
 * Drizzle can speak MySQL protocol, so don't warn about version mismatch for
 * Drizzle servers.
 * We also do not warn if MariaDB is detected, as it has its own version
 * numbering.
 */
if (isset($GLOBALS['dbi'])
    && !PMA_DRIZZLE
    && $cfg['ServerLibraryDifference_DisableWarning'] == false
) {
    /** @var PMA_String $pmaString */
    $pmaString = $GLOBALS['PMA_String'];

    $_client_info = $GLOBALS['dbi']->getClientInfo();
    if ($server > 0
        && /*overload*/mb_strpos($_client_info, 'mysqlnd') === false
        && /*overload*/mb_strpos(PMA_MYSQL_STR_VERSION, 'MariaDB') === false
        && substr(PMA_MYSQL_CLIENT_API, 0, 3) != substr(
            PMA_MYSQL_INT_VERSION, 0, 3
        )
    ) {
        trigger_error(
            PMA_sanitize(
                sprintf(
                    __(
                        'Your PHP MySQL library version %s differs from your ' .
                        'MySQL server version %s. This may cause unpredictable ' .
                        'behavior.'
                    ),
                    $_client_info,
                    substr(
                        PMA_MYSQL_STR_VERSION,
                        0,
                        strpos(PMA_MYSQL_STR_VERSION . '-', '-')
                    )
                )
            ),
            E_USER_NOTICE
        );
    }
    unset($_client_info);
}

/**
 * Warning about Suhosin only if its simulation mode is not enabled
 */
if ($cfg['SuhosinDisableWarning'] == false
    && @ini_get('suhosin.request.max_value_length')
    && @ini_get('suhosin.simulation') == '0'
) {
    trigger_error(
        sprintf(
            __(
                'Server running with Suhosin. Please refer to %sdocumentation%s ' .
                'for possible issues.'
            ),
            '[doc@faq1-38]',
            '[/doc]'
        ),
        E_USER_WARNING
    );
}

/**
 * Warning about incomplete translations.
 *
 * The data file is created while creating release by ./scripts/remove-incomplete-mo
 */
if (file_exists('libraries/language_stats.inc.php')) {
    include 'libraries/language_stats.inc.php';
    /*
     * This message is intentionally not translated, because we're
     * handling incomplete translations here and focus on english
     * speaking users.
     */
    if (isset($GLOBALS['language_stats'][$lang])
        && $GLOBALS['language_stats'][$lang] < $cfg['TranslationWarningThreshold']
    ) {
        trigger_error(
            'You are using an incomplete translation, please help to make it '
            . 'better by [a@https://www.phpmyadmin.net/translate/'
            . '@_blank]contributing[/a].',
            E_USER_NOTICE
        );
    }
}

/**
 * prints list item for main page
 *
 * @param string $name            displayed text
 * @param string $listId          id, used for css styles
 * @param string $url             make item as link with $url as target
 * @param string $mysql_help_page display a link to MySQL's manual
 * @param string $target          special target for $url
 * @param string $a_id            id for the anchor,
 *                                used for jQuery to hook in functions
 * @param string $class           class for the li element
 * @param string $a_class         class for the anchor element
 *
 * @return void
 */
function PMA_printListItem($name, $listId = null, $url = null,
    $mysql_help_page = null, $target = null, $a_id = null, $class = null,
    $a_class = null
) {
    echo PMA\Template::get('list/item')
        ->render(
            array(
                'content' => $name,
                'id' => $listId,
                'class' => $class,
                'url' => array(
                    'href' => $url,
                    'target' => $target,
                    'id' => $a_id,
                    'class' => $a_class,
                ),
                'mysql_help_page' => $mysql_help_page,
            )
        );

Du coup ma/mes questions sont, comment régler ce problème d'affichage du php? et comment accéder à phpmyadmin?

Sur la page de documentation de Phpmyadmin il y a pas mal de conseil pour régler les problème, mais j'ai peur de faire une boulette.


Par avance merci.

Hors ligne

#2 Le 11/12/2016, à 11:36

jplemoine

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

Regarde le tuto : ils parlent du problème de page blanche.


Membre de l'ALDIL (Association Lyonnaise pour le Développement de l'Informatique Libre)
- En pro, après 20 ans de développement, administrateur Linux / Unix depuis Avril 2019.
- En privé, sous Ubuntu-Xubuntu depuis 2009.

Hors ligne

#3 Le 11/12/2016, à 12:01

Lannelide

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

J'ai essayé la commandé pour ce prob de page blanche selon le tuto:

sudo apt install php-mbstring php7.0-mbstring php-gettext

voici le résultat:

lannelide@Lannelide-PC:~$ sudo apt install php-mbstring php7.0-mbstring php-gettext
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
php-gettext is already the newest version (1.0.11-2build1).
php-mbstring is already the newest version (1:7.0+35ubuntu6).
php7.0-mbstring is already the newest version (7.0.8-0ubuntu0.16.04.3).
0 mis à jour, 0 nouvellement installés, 0 à enlever et 4 non mis à jour.
lannelide@Lannelide-PC:~$ 

Visiblement, pas de changement selon le terminal et après reboot pc , j'ai toujours la même chose:
-une page blanche avec le code posté plus haut.

Hors ligne

#4 Le 11/12/2016, à 12:21

jplemoine

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

0 mis à jour, 0 nouvellement installés, 0 à enlever et 4 non mis à jour.

Pourquoi 4 non mis à jour ?


Membre de l'ALDIL (Association Lyonnaise pour le Développement de l'Informatique Libre)
- En pro, après 20 ans de développement, administrateur Linux / Unix depuis Avril 2019.
- En privé, sous Ubuntu-Xubuntu depuis 2009.

Hors ligne

#5 Le 11/12/2016, à 12:31

Lannelide

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

Je ne sais pas.
Au cas où, je poste le résultat d'un sudo apt-get update:

lannelide@Lannelide-PC:~$ sudo apt-get update
[sudo] Mot de passe de lannelide : 
Atteint:1 http://fr.archive.ubuntu.com/ubuntu xenial InRelease
Réception de:2 http://fr.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Atteint:3 http://repository.spotify.com stable InRelease                       
Atteint:4 http://ppa.launchpad.net/libreoffice/ppa/ubuntu xenial InRelease     
Atteint:5 http://archive.canonical.com/ubuntu xenial InRelease                 
Réception de:6 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Atteint:7 http://ppa.launchpad.net/nowrep/qupzilla/ubuntu xenial InRelease     
Atteint:8 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease
Atteint:9 https://deb.opera.com/opera-stable stable InRelease                  
Réception de:10 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [68,2 kB]
Réception de:11 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [43,1 kB]
Réception de:12 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [19,4 kB]
Réception de:13 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [25,6 kB]
Réception de:14 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 DEP-11 Metadata [212 B]
361 ko réceptionnés en 1s (272 ko/s)  
AppStream cache update completed, but some metadata was ignored due to errors.
Lecture des listes de paquets... Fait
lannelide@Lannelide-PC:~$ 

Et d'un sudo apt-get upgrade:

lannelide@Lannelide-PC:~$ sudo apt-get upgrade
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Calcul de la mise à jour... Fait
Les paquets suivants ont été conservés :
  linux-headers-lowlatency linux-image-lowlatency linux-lowlatency
  linux-tools-virtual
0 mis à jour, 0 nouvellement installés, 0 à enlever et 4 non mis à jour.
lannelide@Lannelide-PC:~$ 

Ducoup je suppose que les 4 paquets non mis à jour en question sont :
linux-headers-lowlatency
linux-image-lowlatency
linux-lowlatency
linux-tools-virtual

Mais je ne sais pas du tout si ça a un rapport avec mon problème de php

Hors ligne

#6 Le 11/12/2016, à 12:35

jplemoine

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

C'est surtout cette ligne

AppStream cache update completed, but some metadata was ignored due to errors.

qui me fait dire que l'update n'est pas complet.. Et donc l'upgrade ?
Tente un

sudo apt-get dist-upgrade

Membre de l'ALDIL (Association Lyonnaise pour le Développement de l'Informatique Libre)
- En pro, après 20 ans de développement, administrateur Linux / Unix depuis Avril 2019.
- En privé, sous Ubuntu-Xubuntu depuis 2009.

Hors ligne

#7 Le 11/12/2016, à 12:56

Lannelide

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

Voici les retours de sudo apt-get dist-upgrade


lannelide@Lannelide-PC:~$ sudo apt-get dist-upgrade
[sudo] Mot de passe de lannelide : 
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Calcul de la mise à jour... Fait
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
  linux-tools-4.4.0-51 linux-tools-4.4.0-51-generic
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
Les NOUVEAUX paquets suivants seront installés :
  linux-headers-4.4.0-53 linux-headers-4.4.0-53-lowlatency
  linux-image-4.4.0-53-lowlatency linux-tools-4.4.0-53
  linux-tools-4.4.0-53-generic
Les paquets suivants seront mis à jour :
  linux-headers-lowlatency linux-image-lowlatency linux-lowlatency
  linux-tools-virtual
4 mis à jour, 5 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 69,2 Mo dans les archives.
Après cette opération, 299 Mo d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] o
Réception de:1 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-4.4.0-53 all 4.4.0-53.74 [9 953 kB]
Réception de:2 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-4.4.0-53-lowlatency amd64 4.4.0-53.74 [784 kB]
Réception de:3 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-image-4.4.0-53-lowlatency amd64 4.4.0-53.74 [57,8 MB]
Réception de:4 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-lowlatency amd64 4.4.0.53.56 [1 784 B]
Réception de:5 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-image-lowlatency amd64 4.4.0.53.56 [2 298 B]
Réception de:6 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-lowlatency amd64 4.4.0.53.56 [2 276 B]
Réception de:7 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-tools-4.4.0-53 amd64 4.4.0-53.74 [689 kB]
Réception de:8 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-tools-4.4.0-53-generic amd64 4.4.0-53.74 [1 876 B]
Réception de:9 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-tools-virtual amd64 4.4.0.53.56 [2 296 B]
69,2 Mo réceptionnés en 16s (4 150 ko/s)                                       
Sélection du paquet linux-headers-4.4.0-53 précédemment désélectionné.
(Lecture de la base de données... 323276 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../linux-headers-4.4.0-53_4.4.0-53.74_all.deb ...
Dépaquetage de linux-headers-4.4.0-53 (4.4.0-53.74) ...
Sélection du paquet linux-headers-4.4.0-53-lowlatency précédemment désélectionné.
Préparation du dépaquetage de .../linux-headers-4.4.0-53-lowlatency_4.4.0-53.74_amd64.deb ...
Dépaquetage de linux-headers-4.4.0-53-lowlatency (4.4.0-53.74) ...
Sélection du paquet linux-image-4.4.0-53-lowlatency précédemment désélectionné.
Préparation du dépaquetage de .../linux-image-4.4.0-53-lowlatency_4.4.0-53.74_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.4.0-53-lowlatency /boot/vmlinuz-4.4.0-53-lowlatency
Done.
Dépaquetage de linux-image-4.4.0-53-lowlatency (4.4.0-53.74) ...
Préparation du dépaquetage de .../linux-lowlatency_4.4.0.53.56_amd64.deb ...
Dépaquetage de linux-lowlatency (4.4.0.53.56) sur (4.4.0.51.54) ...
Préparation du dépaquetage de .../linux-image-lowlatency_4.4.0.53.56_amd64.deb ...
Dépaquetage de linux-image-lowlatency (4.4.0.53.56) sur (4.4.0.51.54) ...
Préparation du dépaquetage de .../linux-headers-lowlatency_4.4.0.53.56_amd64.deb ...
Dépaquetage de linux-headers-lowlatency (4.4.0.53.56) sur (4.4.0.51.54) ...
Sélection du paquet linux-tools-4.4.0-53 précédemment désélectionné.
Préparation du dépaquetage de .../linux-tools-4.4.0-53_4.4.0-53.74_amd64.deb ...
Dépaquetage de linux-tools-4.4.0-53 (4.4.0-53.74) ...
Sélection du paquet linux-tools-4.4.0-53-generic précédemment désélectionné.
Préparation du dépaquetage de .../linux-tools-4.4.0-53-generic_4.4.0-53.74_amd64.deb ...
Dépaquetage de linux-tools-4.4.0-53-generic (4.4.0-53.74) ...
Préparation du dépaquetage de .../linux-tools-virtual_4.4.0.53.56_amd64.deb ...
Dépaquetage de linux-tools-virtual (4.4.0.53.56) sur (4.4.0.51.54) ...
Paramétrage de linux-headers-4.4.0-53 (4.4.0-53.74) ...
Paramétrage de linux-headers-4.4.0-53-lowlatency (4.4.0-53.74) ...
Paramétrage de linux-image-4.4.0-53-lowlatency (4.4.0-53.74) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-53-lowlatency /boot/vmlinuz-4.4.0-53-lowlatency
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-53-lowlatency /boot/vmlinuz-4.4.0-53-lowlatency
update-initramfs: Generating /boot/initrd.img-4.4.0-53-lowlatency
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-53-lowlatency /boot/vmlinuz-4.4.0-53-lowlatency
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-53-lowlatency /boot/vmlinuz-4.4.0-53-lowlatency
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-53-lowlatency /boot/vmlinuz-4.4.0-53-lowlatency
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-53-lowlatency /boot/vmlinuz-4.4.0-53-lowlatency
Création du fichier de configuration GRUB…
Attention : Définir GRUB_TIMEOUT à une valeur non nulle si GRUB_HIDDEN_TIMEOUT est définie n’est plus possible.
Image Linux trouvée : /boot/vmlinuz-4.4.0-53-lowlatency
Image mémoire initiale trouvée : /boot/initrd.img-4.4.0-53-lowlatency
Image Linux trouvée : /boot/vmlinuz-4.4.0-53-lowlatency
Image mémoire initiale trouvée : /boot/initrd.img-4.4.0-53-lowlatency
Image Linux trouvée : /boot/vmlinuz-4.4.0-51-lowlatency
Image mémoire initiale trouvée : /boot/initrd.img-4.4.0-51-lowlatency
Image Linux trouvée : /boot/vmlinuz-4.4.0-47-lowlatency
Image mémoire initiale trouvée : /boot/initrd.img-4.4.0-47-lowlatency
Adding boot menu entry for EFI firmware configuration
fait
Paramétrage de linux-image-lowlatency (4.4.0.53.56) ...
Paramétrage de linux-headers-lowlatency (4.4.0.53.56) ...
Paramétrage de linux-lowlatency (4.4.0.53.56) ...
Paramétrage de linux-tools-4.4.0-53 (4.4.0-53.74) ...
Paramétrage de linux-tools-4.4.0-53-generic (4.4.0-53.74) ...
Paramétrage de linux-tools-virtual (4.4.0.53.56) ...
lannelide@Lannelide-PC:~$ 

Je reboot, je teste mon php et je te dis.

Hors ligne

#8 Le 11/12/2016, à 13:00

jplemoine

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

Attention au nombre de noyaux (il semble que tu en ait 3) : il faudra donc faire le ménage dans un futur assez proche.


Membre de l'ALDIL (Association Lyonnaise pour le Développement de l'Informatique Libre)
- En pro, après 20 ans de développement, administrateur Linux / Unix depuis Avril 2019.
- En privé, sous Ubuntu-Xubuntu depuis 2009.

Hors ligne

#9 Le 11/12/2016, à 13:05

Lannelide

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

Du coup  les paquets sont à jour, et une demande de sudo apt autoremove

lannelide@Lannelide-PC:~$ sudo apt-get update
[sudo] Mot de passe de lannelide : 
Atteint:1 http://fr.archive.ubuntu.com/ubuntu xenial InRelease
Réception de:2 http://fr.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Atteint:3 http://repository.spotify.com stable InRelease                       
Atteint:4 http://ppa.launchpad.net/libreoffice/ppa/ubuntu xenial InRelease     
Réception de:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Atteint:6 http://archive.canonical.com/ubuntu xenial InRelease                 
Atteint:7 http://ppa.launchpad.net/nowrep/qupzilla/ubuntu xenial InRelease     
Atteint:8 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease
Atteint:9 https://deb.opera.com/opera-stable stable InRelease
204 ko réceptionnés en 1s (171 ko/s)
Lecture des listes de paquets... Fait
lannelide@Lannelide-PC:~$ sudo apt-get upgrade
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Calcul de la mise à jour... Fait
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
  linux-tools-4.4.0-51 linux-tools-4.4.0-51-generic
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
lannelide@Lannelide-PC:~$ 

-Pour les noyaux, je fais comment?  (je me suis remis à linux il ya peu, et j'ai fait plusieurs installations)

-pour ce qui est de php, j'ai toujours ma page blanche plus le code du premier post, et toujour aucune balise php de chargé sur mon site.

(merci pour ton aide)

Hors ligne

#10 Le 11/12/2016, à 14:04

jplemoine

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

Il faut que tu gardes le noyau 51.
donc

sudo /etc/kernel/postinst.d/apt-auto-removal $(uname -r)
sudo rm /var/run/reboot-required

Pour le php :
que donne

dpkg -l | grep apache | grep php

Membre de l'ALDIL (Association Lyonnaise pour le Développement de l'Informatique Libre)
- En pro, après 20 ans de développement, administrateur Linux / Unix depuis Avril 2019.
- En privé, sous Ubuntu-Xubuntu depuis 2009.

Hors ligne

#11 Le 11/12/2016, à 14:09

Lannelide

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

Ok, je fais ce que tu me dis et je reviens,

Je me demande si  ...  ... j'ai entendu parlé de problèmes avec Wamp  /et / skype pour une histoire de port 80...

Tu en penses quoi?

Dernière modification par Lannelide (Le 11/12/2016, à 14:13)

Hors ligne

#12 Le 11/12/2016, à 14:13

Lannelide

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

Voici la réponse à dpkg -l | grep apache | grep php:

lannelide@Lannelide-PC:~$ dpkg -l | grep apache | grep php
ii  libapache2-mod-php                            1:7.0+35ubuntu6                               all          server-side, HTML-embedded scripting language (Apache 2 module) (default)
ii  libapache2-mod-php7.0                         7.0.8-0ubuntu0.16.04.3                        amd64        server-side, HTML-embedded scripting language (Apache 2 module)
lannelide@Lannelide-PC:~$ 

Hors ligne

#13 Le 11/12/2016, à 15:35

jplemoine

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

As-tu essayer de mettre la page avec juste le php_info ? si oui, quel a été le résultat ?


Membre de l'ALDIL (Association Lyonnaise pour le Développement de l'Informatique Libre)
- En pro, après 20 ans de développement, administrateur Linux / Unix depuis Avril 2019.
- En privé, sous Ubuntu-Xubuntu depuis 2009.

Hors ligne

#14 Le 11/12/2016, à 15:49

Lannelide

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

voilà la réponse:

Forbidden

You don't have permission to access /test.php on this server.
Apache/2.4.18 (Ubuntu) Server at localhost Port 80

Hors ligne

#15 Le 11/12/2016, à 16:05

jplemoine

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

Tu as donc un soucis autre autre que phpmyadmin...
- soit l'utilisateur www-data n'a pas les droits en lecture sur le fichier
- soit il y a une erreur dans la configuration apache.
Il te faut donc vérifier ça et faire fonctionner cette page avant d’aller plus loin.


Membre de l'ALDIL (Association Lyonnaise pour le Développement de l'Informatique Libre)
- En pro, après 20 ans de développement, administrateur Linux / Unix depuis Avril 2019.
- En privé, sous Ubuntu-Xubuntu depuis 2009.

Hors ligne

#16 Le 11/12/2016, à 16:13

Lannelide

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

J'imagine que c'est cette partie du tuto:?
""
nous allons travailler avec l'utilisateur et le groupe www-data
on ajoute l'utilisateur principale au groupe

sudo gpasswd -a $USER www-data

pour le dossier /var/www/html

sudo chown -R www-data:www-data /var/www/html

s'assurer que les droits sont les bons

sudo chmod 775 /var/www/html

je suis certain de l'avoir fait, mais je vais le refaire.

Faut il que je remove & purge apache pour une réinstallation?

Hors ligne

#17 Le 11/12/2016, à 16:34

Lannelide

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

Pour cette ligne de commande (solution proposée pour les droits) : 

Définir www-data en groupe par défaut pour /srv/html/

lannelide@Lannelide-PC:~$ sudo chmod ug+s /srv/html/
[sudo] Mot de passe de lannelide : 
Désolé, essayez de nouveau.
[sudo] Mot de passe de lannelide : 

Donc ça ne marche pas.

Et pour un test de ce type:

lannelide@Lannelide-PC:~$ mkdir /srv/html/mon_site
mkdir: impossible de créer le répertoire «/srv/html/mon_site»: Permission non accordée
lannelide@Lannelide-PC:~$ echo "je met le texte que je veux !" | tee /srv/html/mon_site/index.html
tee: /srv/html/mon_site/index.html: Aucun fichier ou dossier de ce type
je met le texte que je veux !
lannelide@Lannelide-PC:~$ 

Permission non accordée

Dernière modification par Lannelide (Le 11/12/2016, à 16:34)

Hors ligne

#18 Le 11/12/2016, à 16:43

jplemoine

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

Là, tu essaies d'écrire avec l'utilisateur lannelide.
C'est l'utilisateur www-data qui doit avoir les droits de lecture....
Que donne

sudo -u www-data cat /srv/html/mon_site/test.php

Membre de l'ALDIL (Association Lyonnaise pour le Développement de l'Informatique Libre)
- En pro, après 20 ans de développement, administrateur Linux / Unix depuis Avril 2019.
- En privé, sous Ubuntu-Xubuntu depuis 2009.

Hors ligne

#19 Le 11/12/2016, à 16:51

Lannelide

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

lannelide@Lannelide-PC:~$ sudo -u www-data cat /srv/html/test.php
cat: /srv/html/test.php: Permission non accordée
lannelide@Lannelide-PC:~$ 

Hors ligne

#20 Le 11/12/2016, à 17:55

jplemoine

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

Donc, il y a un problème de droit au niveau du système!!!!
En fait, j'ai recréé la lecture du fichier avec le même utilisateur qu'Apache mais en l'excluant de façon à savoir si le problème est un problème de droit au niveau du système ou au niveau de la configuration d'apache.

ls -ld /srv
ls -ld /srv/html
ls -ld /srv/html/test.php

Membre de l'ALDIL (Association Lyonnaise pour le Développement de l'Informatique Libre)
- En pro, après 20 ans de développement, administrateur Linux / Unix depuis Avril 2019.
- En privé, sous Ubuntu-Xubuntu depuis 2009.

Hors ligne

#21 Le 11/12/2016, à 18:04

Lannelide

Re : Pas de visuel sur phpmyadmin // pas de php sur page web créée

Merci pour ton investissement,

Voilà la réponse du terminal :

lannelide@Lannelide-PC:~$ ls -ld /srv
drwxr-xr-x 3 root root 4096 déc.  11 08:43 /srv
lannelide@Lannelide-PC:~$ ls -ld /srv/html
drwsrwsr-x+ 3 www-data www-data 4096 déc.  11 14:47 /srv/html
lannelide@Lannelide-PC:~$ ls -ld /srv/html/test.php
-rw------- 1 lannelide lannelide 23 déc.  11 14:46 /srv/html/test.php
lannelide@Lannelide-PC:~$ 

Hors ligne