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/03/2017, à 19:26

Fencer

Comment installer php et wordpress sous ubuntu 16.04 LTS?

Bonjour à tous,

depuis quelques semaines, j'essaie d'installer wordpress pour enfin commencer le développement de sites web (ma nouvelle passion). Seulement voila :

   sudo apt-get install php5 mysql-server mysql-client apache2

tout se passe sans souci.

Dans le navigateur je fais localhost "parfait la page par défaut de apache apparait"

   sudo apt-get install phpmyadmin

l'installation se fait sans souci mais quand je fais localhost/phpmyadmin .... problème. j'obtient ce joli messge

[i]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 '
'; } // 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 '
' . "\n"; // Anchor for favorite tables synchronization. echo PMA_RecentFavoriteTable::getInstance('favorite')->getHtmlSyncFavoriteTables(); echo '
'; if ($server > 0 || count($cfg['Servers']) > 1 ) { if ($cfg['DBG']['demo']) { echo '
'; echo '
' . __('phpMyAdmin Demo Server') . '
'; echo '[/i]

[i]'; 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.' ), 'demo.phpmyadmin.net' ); echo '
'; echo '
'; } echo '
'; echo '
' . __('General settings') . '
'; echo '[/i]

[i]    '; /** * Displays the MySQL servers choice form */ if ($cfg['ServerDefault'] == 0 || (! $cfg['NavigationDisplayServers'] && (count($cfg['Servers']) > 1 || ($server == 0 && count($cfg['Servers']) == 1))) ) { echo '
    '; include_once 'libraries/select_server.lib.php'; echo PMA_Util::getImage('s_host.png') . " " . PMA_selectServer(true, true); echo '
    '; } /** * 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') . " " . __('Change password'), 'li_change_password', 'user_password.php' . $common_url_query, null, null, 'change_password_anchor', "no_bullets", $conditional_class ); } } // end if echo '
    '; echo '
    ' . "\n" . PMA_URL_getHiddenInputs(null, null, 4, 'collation_connection') . ' ' . "\n" . ' ' . PMA_Util::getImage('s_asci.png') . " " . __('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" . ' ' . "\n" . PMA_generateCharsetDropdownBox( PMA_CSDROPDOWN_COLLATION, 'collation_connection', 'select_collation_connection', $collation_connection, true, true ) . '
    ' . "\n" . '
    ' . "\n"; } // end of if ($server > 0 && !PMA_DRIZZLE) echo '[/i]

[i]'; echo '
'; } echo '
'; echo '
' . __('Appearance settings') . '
'; echo '[/i]

[i]    '; // Displays language selection combo if (empty($cfg['Lang']) && count($GLOBALS['available_languages']) > 1) { echo '
    '; include_once 'libraries/display_select_lang.lib.php'; echo PMA_Util::getImage('s_lang.png') . " " . PMA_getLanguageSelectorHtml(); echo '
    '; } // ThemeManager if available if ($GLOBALS['cfg']['ThemeManager']) { echo '
    '; echo PMA_Util::getImage('s_theme.png') . " " . $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox(); echo '
    '; } echo '
    '; echo PMA_Config::getFontsizeForm(); echo '
    '; echo '[/i]

[i]'; // User preferences if ($server > 0) { echo '[/i]

[i]    '; PMA_printListItem( PMA_Util::getImage('b_tblops.png') . " " . __('More settings'), 'li_user_preferences', 'prefs_manage.php' . $common_url_query, null, null, null, "no_bullets" ); echo '[/i]

[i]'; } echo '
'; echo '
'; echo '
'; if ($server > 0 && $GLOBALS['cfg']['ShowServerInfo']) { echo '
'; echo '
' . __('Database server') . '
'; echo '[/i]

[i]    ' . "\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 '
    '; echo ' ' . __('Server charset:') . ' ' . ' '; if (! PMA_DRIZZLE) { echo ' ' . $mysql_charsets_descriptions[$mysql_charset_map['utf-8']]; } echo ' (' . $mysql_charset_map['utf-8'] . ')' . ' ' . '
    ' . ' [/i]

[i]' . '
'; } if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) { echo '
'; echo '
' . __('Web server') . '
'; echo '[/i]

[i]    '; 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 ' [/i]

[i]'; echo '
'; } echo '
'; echo '
phpMyAdmin
'; echo '[/i]

[i]    '; $class = null; // We rely on CSP to allow access to [url]http://www.phpmyadmin.net[/url], 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:') . ' ' . PMA_VERSION . '', '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 ' [/i]

[i]'; echo '
'; echo '
'; echo '
'; /** * 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 .= '
      ' . __( 'Or alternately go to \'Operations\' tab of any database ' . 'to set it up there.' ); } $msg = PMA_Message::notice($msg_text); $msg->addParam( '', false ); $msg->addParam('', 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, ) ); } [/i]

sudo apt-get install wordpress  egalement bien avec le déplacement du dossier décompresse de wordpress dans /var/www/html  mais au lancement de la page /localhost/wordpress j'obtiens une page blanche. Mais voici le code source de la page

<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );

la plus part des solutions en ligne recommendent d'éditer le fichier /etc/apache2/apache2.conf. Mais le probleme persiste.

J'ai supprimer les paquets et réinstallé a plusieurs reprises mais les resultats sont toujours les memes.  Je vous remercie grandement de votre aide.


Modération : merci à l'avenir d'utiliser les balises code (explications ici).

Dernière modification par cqfd93 (Le 11/03/2017, à 19:50)

Hors ligne

#2 Le 11/03/2017, à 19:28

Fencer

Re : Comment installer php et wordpress sous ubuntu 16.04 LTS?

Excusez moi si mon message semble toufu mais je suis  désespéré. vous etes ma derniere option

Hors ligne

#3 Le 11/03/2017, à 20:35

GammaDraconis

Re : Comment installer php et wordpress sous ubuntu 16.04 LTS?

pourquoi PHP5 et pas PHP7 ? car en plus sur la 16.04 ce n'est pas la V5 mais la V7 donc si tu as installé la V5 je suppose que tu as ajouté un PPA pour forcer la version précédente ?


Discussion sur mon script de post-install pour Ubuntu 20.04LTS : https://forum.ubuntu-fr.org/viewtopic.php?id=2026344
Lien direct script : https://github.com/simbd/Ubuntu_20.04LTS_PostInstall
Démo vidéo (peertube) : https://video.ploud.fr/videos/watch/fb7 … 0d252ed2db

Hors ligne

#4 Le 11/03/2017, à 20:51

Fencer

Re : Comment installer php et wordpress sous ubuntu 16.04 LTS?

merci pour ta reponse. c'est exactement ce que j'ai fais. Sur un autre pc avec ubuntu 15.10 j'avais réussi a installer php5 mais comme maintenent ca ne marche pas, je me suis di qu'il y avait disfonctionnemenet au niveau des paquet de php7. J'ai donc voulu essayer avec le php5. Meme résultat? ce qui m'à conduit a supposer que le probleme se situe au niveau de apache2.

Hors ligne

#5 Le 11/03/2017, à 21:34

GammaDraconis

Re : Comment installer php et wordpress sous ubuntu 16.04 LTS?

La version 7 de PHP de dysfonctionne pas, par contre évidemment certaine appli web doivent se mettre a jour pour être compatible.

Je te prend un exemple : la version 3.1 de PhpBB n'est pas compatible avec la version PHP7 par contre ils ont sortie une nouvelle version (3.2) qui elle est compatible PHP7.
Ce que je veux dire par là c'est que c'est a l'appli web de s'adapter a la version de PHP et non l'inverse.

Quand a Apache, pas de problème non plus.


Discussion sur mon script de post-install pour Ubuntu 20.04LTS : https://forum.ubuntu-fr.org/viewtopic.php?id=2026344
Lien direct script : https://github.com/simbd/Ubuntu_20.04LTS_PostInstall
Démo vidéo (peertube) : https://video.ploud.fr/videos/watch/fb7 … 0d252ed2db

Hors ligne

#6 Le 11/03/2017, à 23:01

Fencer

Re : Comment installer php et wordpress sous ubuntu 16.04 LTS?

GammaDraconis a écrit :

Ce que je veux dire par là c'est que c'est a l'appli web de s'adapter a la version de PHP et non l'inverse.

Dans le cas présent, quel serait l'appli web qui doit s'adapter? Le navigateur?

Hors ligne

#7 Le 11/03/2017, à 23:41

GammaDraconis

Re : Comment installer php et wordpress sous ubuntu 16.04 LTS?

c'était un exemple.

Wordpress est compatible PHP7.


Discussion sur mon script de post-install pour Ubuntu 20.04LTS : https://forum.ubuntu-fr.org/viewtopic.php?id=2026344
Lien direct script : https://github.com/simbd/Ubuntu_20.04LTS_PostInstall
Démo vidéo (peertube) : https://video.ploud.fr/videos/watch/fb7 … 0d252ed2db

Hors ligne

#8 Le 12/03/2017, à 00:04

Fencer

Re : Comment installer php et wordpress sous ubuntu 16.04 LTS?

oui mais le probleme est que je n'arrive meme pas a lancer l'interface de php

Hors ligne

#9 Le 02/04/2017, à 09:49

Fencer

Re : Comment installer php et wordpress sous ubuntu 16.04 LTS?

j'ai parfaitement reussi linstallation sous 15.10. Mais toujours les memes erreurs sous 16.04. Quelqu'un peut il maider

Hors ligne