Error depends on php mbstring support not found freebsd portinstall phpunknown version mbstring

Как установить php-mbstring под FreeBSD? Есть сервер с фрёй. Версия PHP 4.4.4. Кто знает как поставить mbstring под FreeBSD 6.2? Спасибо
===>  Vulnerability check disabled, database not found
===>  Found saved configuration for php5-extensions-1.1
===>  Extracting for php5-extensions-1.1
===>  Patching for php5-extensions-1.1
===>   php5-extensions-1.1 depends on file: /usr/local/include/php/main/php.h - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/ctype.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/curl.so - not found
===>    Verifying install for /usr/local/lib/php/20060613/curl.so in /usr/ports/ftp/php5-curl
"/usr/ports/ftp/php5-curl/../../lang/php5/Makefile", line 176: Could not find /usr/ports/ftp/php5-curl/../../lang/php5/Makefile.ext
"/usr/ports/Mk/bsd.port.mk", line 1886: Malformed conditional (${X_WINDOW_SYSTEM:L} == xorg)
"/usr/ports/Mk/bsd.port.mk", line 2206: Malformed conditional (${PREFIX} == ${X11BASE_REL} || defined(USE_X_PREFIX))
"/usr/ports/Mk/bsd.port.mk", line 2210: Malformed conditional (${PREFIX} == /usr)
"/usr/ports/Mk/bsd.port.mk", line 2215: if-less endif
-u: not found
"/usr/ports/Mk/bsd.port.mk", line 2221: warning: " -u" returned non-zero status
-e: not found
"/usr/ports/Mk/bsd.port.mk", line 2310: warning: "/usr/sbin/pkg_info -P 2>/dev/null |  -e 's/.*: //'" returned non-zero status
"/usr/ports/Mk/bsd.port.mk", line 2846: Malformed conditional (${PREFIX} == /usr)
"/usr/ports/Mk/bsd.port.mk", line 2848: if-less else
"/usr/ports/Mk/bsd.port.mk", line 2850: if-less endif
"/usr/ports/Mk/bsd.port.mk", line 2956: Malformed conditional (${PREFIX} == /usr)
"/usr/ports/Mk/bsd.port.mk", line 2958: if-less else
"/usr/ports/Mk/bsd.port.mk", line 2960: if-less endif
"/usr/ports/Mk/bsd.port.mk", line 5466: Malformed conditional ((${PREFIX} != ${LOCALBASE_REL} && ${PREFIX} != ${X11BASE_REL} && ${PREFIX} != ${LINUXBASE_REL} && ${PREFIX} != "/usr"))
"/usr/ports/Mk/bsd.port.mk", line 5471: if-less endif
"/usr/ports/Mk/bsd.port.mk", line 5947: if-less endif
make: fatal errors encountered -- cannot continue
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.

<?php $PALANG = []; require_once(‘common.php’); ?> <html lang=»»> <head> <meta charsetutf-8«> <meta http-equivX-UA-Compatible» contentIE=edge«> <meta nameviewport» contentwidth=device-width, initial-scale=1«> <meta http-equivContent-Type» contenttext/html; charset=UTF-8«/> <title>Postfix Admin — Setup</title> <link relshortcut icon» hrefimages/favicon.ico«/> <link relstylesheet» hrefcss/bootstrap-3.4.1-dist/css/bootstrap.min.css«/> <link relstylesheet» hrefcss/bootstrap.css«/> <!— https://www.srihash.org/ —> <script srcjquery-1.12.4.min.js« integritysha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ« crossoriginanonymous«></script> <script srccss/bootstrap-3.4.1-dist/js/moment-with-locales.min.js«></script> <script srccss/bootstrap-3.4.1-dist/js/bootstrap.min.js«></script> <script srccss/bootstrap-3.4.1-dist/js/bootstrap-datetimepicker.min.js«></script> </head> <body> <nav classnavbar navbar-default fixed-top«> <div classcontainer-fluid«> <div classnavbar-header«> <button typebutton» classnavbar-toggle collapsed» data-togglecollapse» data-target#navbar« aria-expandedfalse» aria-controlsnavbar«> <span classsr-only«>Toggle navigation</span> <span classicon-bar«></span> <span classicon-bar«></span> <span classicon-bar«></span> </button> <a classnavbar-brand» href=’main.php><img idlogin_header_logo» srcimages/postbox.png« altLogo«/></a> </div> </div> </nav> <?php /** * Postfix Admin * * LICENSE * This source file is subject to the GPL license that is bundled with * this package in the file LICENSE.TXT. * * Further details on the project are available at http://postfixadmin.sf.net * * @version $Id$ * @license GNU GPL v2 or later. * * File: setup.php * Used to help ensure a server is setup appropriately during installation/setup. */ $configSetupPassword = Config::read_string(‘setup_password’); $errors = []; $configSetupDone = false; $authenticated = false; $old_setup_password = false; if (strlen($configSetupPassword) == 73 && strpos($configSetupPassword, ‘:’) == 32) { $old_setup_password = true; } elseif ($configSetupPassword != ‘changeme’ && $configSetupPassword != ») { $configSetupDone = true; $pass = safepost(‘setup_password’, ‘invalid’); if ($pass != ‘invalid’) { if (password_verify(safepost(‘setup_password’, ‘invalid’), $configSetupPassword)) { $authenticated = true; } else { error_log(«PostfixAdmin setup login failed (ip_address: {$_SERVER[‘REMOTE_ADDR’]})«); $errors[‘setup_login_password’] = «Password verification failed.«; } } } ?> <?php $todo = ‘<span class=»font-weight-bold text-warning»>TODO</span>’; $tick = ‘ ✅ ‘; ?> <div classcontainer«> <div classrow«> <h1 classh1«>Configure and Setup Postfixadmin</h1> <p>This page helps you setup PostfixAdmin. For further help see <a hrefhttps://github.com/postfixadmin/postfixadmin/tree/master/DOCUMENTS«>the documentation</a>.</p> <?php if (!isset($_SERVER[‘HTTPS’])) { echo «<h2 class=’h2 text-danger’>Warning: connection not secure, switch to https if possible</h2>«; } ?> <div classcol-12«> <ul> <li> <?php if ($configSetupDone) { echo $tick . « setup_password configured«; } else { echo $todo . « You need to have a setup_pasword hash configured in a <code>config.local.php</code> file«; } ?> </li> <li> <?php if ($authenticated) { echo $tick . « You are logged in with the setup_password, some environment and hosting checks are displayed below.«; } else { echo $todo . « You need to authenticate using the setup_password before you can perform some environment and hosting checks.«; } ?> </li> </ul> <?php if (!$authenticated) { ?> <p> One you have logged in with the setup_password, this page will … </p> <ul> <li> run some simple hosting/environment checks which may help identify problems with your environment </li> <li> create/update your database of choice,</li> <li> allow you to list / add super user accounts</li> </ul> <?php } ?> </div> </div> <?php if ($configSetupDone && !$authenticated) { ?> <div classrow«> <div classcol-12«> <h2 classh2«>Login with setup_password</h2> <form nameauthenticate» classcol-2 form-horizontal» methodpost«> <div classform-group«> <label forsetup_password» classcol-sm-4 control-label«>Setup password</label> <div classcol-sm-4«> <input classform-control» typepassword» namesetup_password» minlength=5 idsetup_password« value=»»/> <?= _error_field($errors, ‘setup_login_password’); ?> </div> </div> <div classform-group«> <div classcol-sm-offset-4 col-sm-4«> <button classbtn btn-primary» typesubmit» namesubmit» valuesetuppw«>Login with setup_password. </button> </div> </div> </form> <p>If you’ve forgotten your super-admin password, you can generate a new one using the <em>Generate</em> form and update your <code>config.local.php</code></p> </div> </div> <?php } ?> <div classrow«> <div classcol-12«> <?php if (!$configSetupDone) { echo <<<EOF <p><strong>For a new installation, you must generate a ‘setup_password’ to go into your config.local.php file.</strong></p> <p>You can use the form below, or run something like the following in a shell — <code>php -r ‘echo password_hash(«password», PASSWORD_DEFAULT);'</code><p> EOF; } if ($old_setup_password) { echo ‘<p class=»text-danger»><strong>Your setup_password is in an obsolete format. As of PostfixAdmin 3.3 it needs regenerating.</strong>’; } if (!$authenticated || !$configSetupDone) { ?> <h2>Generate setup_password</h2> <?php $form_error = »; $result = »; if (safepost(‘form’) === «setuppw«) { $errors = []; # «setup password» form submitted if (safepost(‘setup_password’, ‘abc’) != safepost(‘setup_password2’)) { $errors[‘setup_password’] = «The two passwords differ!«; $form_error = ‘has-error’; } else { $msgs = validate_password(safepost(‘setup_password’)); if (empty($msgs)) { // form has been submitted; both fields filled in, so generate a new setup password. $hash = password_hash(safepost(‘setup_password’), PASSWORD_DEFAULT); $result = ‘<p>If you want to use the password you entered as setup password, edit config.inc.php or config.local.php and set</p>’; $result .= «<pre>$CONF[‘setup_password’] = ‘$hash‘;</pre><p>After adding, refresh this page and log in using it.</p>«; } else { $form_error = ‘has-error’; $errors[‘setup_password’] = implode(‘, ‘, $msgs); } } } ?> <form namesetuppw» methodpost» classform-horizontal» actionsetup.php«> <input typehidden» nameform» valuesetuppw«/> <div classform-group <?= $form_error ?>«> <label forsetup_password» classcol-sm-4 control-label«>Setup password</label> <div classcol-sm-4«> <input classform-control» typepassword» namesetup_password» minlength=5 idsetup_password« autocompletenew-password« value=»»/> <?= _error_field($errors, ‘setup_password’); ?> </div> </div> <div classform-group <?= $form_error ?>«> <label forsetup_password2» classcol-sm-4 control-label«>Setup password (again)</label> <div classcol-sm-4«> <input classform-control» typepassword» namesetup_password2« minlength=5 idsetup_password2« autocompletenew-password« value=»»/> <?= _error_field($errors, ‘setup_password2’); ?> </div> </div> <div classform-group«> <div classcol-sm-offset-4 col-sm-4«> <button classbtn btn-primary» typesubmit» namesubmit» valuesetuppw«>Generate setup_password hash </button> </div> </div> </form> <?= $result ?> <?php } // end if(!$authenticated)?> </div> </div> <div classrow«> <div clascol-12«> <h2 classh2«>Hosting Environment Check</h2> <?php $check = do_software_environment_check(); if ($authenticated) { if (!empty($check[‘info’])) { echo «<h3>Information</h3><ul>«; foreach ($check[‘info’] as $msg) { echo «<li>{$tick} {$msg}</li>«; } echo «</ul>«; } if (!empty($check[‘warn’])) { echo «<h3>Warnings</h3><ul>«; foreach ($check[‘warn’] as $msg) { echo «<li class=’text-warning’>⚠ {$msg}</li>«; } echo «</ul>«; } if (!empty($check[‘error’])) { echo «<h3>Errors (MUST be fixed)</h3><ul>«; foreach ($check[‘error’] as $msg) { echo «<li class=’text-danger’>⛔{$msg}</li>«; } echo «</ul>«; } $php_error_log = ini_get(‘error_log’); } else { if (!empty($check[‘error’])) { echo ‘<h3 class=»text-danger»>Hosting Environment errors found. Login to see details.</h3>’; } if (!empty($check[‘warn’])) { echo ‘<h3 class=»text-warning»>Hosting Environment warnings found. Login to see details.</h3>’; } } ?> </div> </div> <div classrow«> <div classcol-12«> <h2 classh2«>Database Update</h2> <?php $db = false; try { $db = db_connect(); } catch (Exception $e) { echo «<p class=’h3 text-danger’>Something went wrong while trying to connect to the database. A message should be logged — check PHP’s error_log (» . ini_get(‘error_log’) . ‘)</p>’; error_log(«Couldn’t perform PostfixAdmin database update — failed to connect to db? » . $e->getMessage() . « Trace: » . $e->getTraceAsString()); } if ($db) { echo «<p>Everything seems fine… attempting to create/update database structure</p>n»; try { require_once(dirname(__FILE__) . ‘/upgrade.php’); } catch (Exception $e) { if ($authenticated) { echo «<p class=’h3 text-danger’>Exception message: {$e->getMessage()} — check logs!</p>«; } echo «<p class=’h3 text-danger’>Something went wrong while trying to apply database updates, a message should be logged — check PHP’s error_log (» . ini_get(‘error_log’) . ‘)</p>’; error_log(«Couldn’t perform PostfixAdmin database update via upgrade.php — » . $e->getMessage() . « Trace: » . $e->getTraceAsString()); } } else { echo «<h3 class=’h3 text-danger’>Could not connect to database to perform updates; check PHP error log.</h3>«; } ?> </div> </div> <?php if ($authenticated) { $setupMessage = »; if (safepost(«submit«) === «createadmin«) { echo «<div class=row><div class=’col-12′>«; # «create admin» form submitted, make sure the correct setup password was specified. // XXX need to ensure domains table includes an ‘ALL’ entry. $table_domain = table_by_key(‘domain’); $rows = db_query_all(«SELECT * FROM $table_domain WHERE domain = ‘ALL’«); if (empty($rows)) { // all other fields should default through the schema. db_insert(‘domain’, array(‘domain’ => ‘ALL’, ‘description’ => », ‘transport’ => »)); } $values = array( ‘username’ => safepost(‘username’), ‘password’ => safepost(‘password’), ‘password2’ => safepost(‘password2’), ‘superadmin’ => 1, ‘domains’ => array(), ‘active’ => 1, ); list($error, $setupMessage, $errors) = create_admin($values); if ($error == 1) { $tUsername = htmlentities($values[‘username’]); error_log(«failed to add admin — » . json_encode([$error, $setupMessage, $errors])); echo «<p class=’text-danger’>Admin addition failed; check field error messages or server logs.</p>«; } else { // all good!. $setupMessage .= «<p>You are done with your basic setup. <b>You can now <a href=’login.php’>login to PostfixAdmin</a> using the account you just created.</b></p>«; } echo «</div>«; } $table_admin = table_by_key(‘admin’); $bool = db_get_boolean(true); $admins = db_query_all(«SELECT * FROM $table_admin WHERE superadmin = ‘$bool‘ AND active = ‘$bool«); if (!empty($admins)) { ?> <div classrow«> <div classcol-12«> <h2 classh2«>Super admins</h2> <p>The following ‘super-admin’ accounts have already been added to the database.</p> <ul> <?php foreach ($admins as $row) { echo «<li>{$row[‘username’]}</li>«; } ?> </ul> </div> </div> <?php } ?> <div classrow«> <div classcol-12«> <h2>Add Superadmin Account</h2> <form namecreate_admin» classform-horizontal» methodpost«> <div classform-group«> <label forsetup_password» classcol-sm-4 control-label«>Setup password</label> <div classcol-sm-4«> <input classform-control» typepassword» requiredrequired« namesetup_password« minlength=5 value=»»/> </div> </div> <div classform-group«> <label forusername» classcol-sm-4 control-label«><?= $PALANG[‘admin’] ?></label> <div classcol-sm-4«> <input classform-control» typetext» requiredrequired» nameusername« minlength=5 idusername« value=»»/> <?= _error_field($errors, ‘username’); ?> </div> </div> <div classform-group«> <label forpassword» classcol-sm-4 control-label«><?= $PALANG[‘password’] ?></label> <div classcol-sm-4«> <input classform-control» typepassword» required=required namepassword» minlength=5 idpassword» autocompletenew-password« value=»»/> <?= _error_field($errors, ‘password’); ?> </div> </div> <div classform-group«> <label forpassword2« classcol-sm-4 control-label«><?= $PALANG[‘password_again’] ?></label> <div classcol-sm-4«> <input classform-control» typepassword» required=required namepassword2» minlength=5 idpassword2» autocompletenew-password« value=»»/> <?= _error_field($errors, ‘password2’); ?> </div> </div> <div classform-group«> <div classcol-sm-offset-4 col-sm-4«> <button classbtn btn-primary» typesubmit» namesubmit« valuecreateadmin«><?= $PALANG[‘pAdminCreate_admin_button’] ?> </button> </div> </div> </form> </div> </div> <div classrow«> <div classcol-12«> <p classtext-success«><?= $setupMessage ?></p> </div> </div> <?php } ?> </div> <footer classfooter mt-5 bg-dark«> <div classcontainer text-center«> <a target_blank» relnoopener» hrefhttps://github.com/postfixadmin/postfixadmin/blob/master/DOCUMENTS/«>Documentation</a> // <a target_blank» relnoopener« hrefhttps://github.com/postfixadmin/postfixadmin/«>Postfix Admin</a> </div> </footer> </body> </html> <?php function _error_field($errors, $key) { if (!isset($errors[$key])) { return »; } return «<span style=’color: #ff0000′>{$errors[$key]}</span>«; } function create_admin($values) { define(‘POSTFIXADMIN_SETUP’, 1); # avoids instant redirect to login.php after creating the admin $handler = new AdminHandler(1, ‘setup.php’); $formconf = $handler->webformConfig(); if (!$handler->init($values[‘username’])) { return array(1, «», $handler->errormsg); } if (!$handler->set($values)) { return array(1, «», $handler->errormsg); } if (!$handler->save()) { return array(1, «», $handler->errormsg); } return array( 0, $handler->infomsg[‘success’], array(), ); } /** * @return array like: [‘info’ => string[], ‘warn’ => string[], ‘error’ => string[] ] */ function do_software_environment_check() { $CONF = Config::getInstance()->getAll(); $warn = []; $error = []; $info = []; // // Check for availability functions // $f_phpversion = function_exists(«phpversion«); $f_apache_get_version = function_exists(«apache_get_version«); $m_pdo = extension_loaded(«PDO«); $m_pdo_mysql = extension_loaded(«pdo_mysql«); $m_pdo_pgsql = extension_loaded(‘pdo_pgsql’); $m_pdo_sqlite = extension_loaded(«pdo_sqlite«); $f_session_start = function_exists(«session_start«); $f_preg_match = function_exists(«preg_match«); $f_mb_encode_mimeheader = function_exists(«mb_encode_mimeheader«); $f_imap_open = function_exists(«imap_open«); $file_local_config = realpath(__DIR__ . «/../config.local.php«); // Fall back to looking in /etc/postfixadmin for config.local.php (Debian etc) // this check might produce a false positive if someone has a legacy PostfixAdmin installation. if (!file_exists($file_local_config) && is_dir(‘/etc/postfixadmin’)) { if (file_exists(‘/etc/postfixadmin/config.local.php’)) { $file_local_config = ‘/etc/postfixadmin/config.local.php’; } } // Check for PHP version $phpversion = ‘unknown-version’; if ($f_phpversion) { if (version_compare(PHP_VERSION, ‘7.0.0’, ‘<‘)) { $error[] = «Error: Depends on: PHP v7.0+. You must upgrade.«; } else { $info[] = «PHP version — » . phpversion(); } } else { $error[] = «Unable to check for PHP version. (PHP_VERSION not found?)«; } // Check for Apache version if ($f_apache_get_version) { $info[] = «Webserver — » . apache_get_version(); } $info[] = «Postfixadmin public url detected as » . getSiteUrl($_SERVER) . « use $CONF[‘site_url’] to override«; $info[] = «Postfixadmin installed at — » . realpath(__DIR__); $error_log_file = ini_get(‘error_log’); if (file_exists($error_log_file) && is_writable($error_log_file)) { $info[] = «PHP Error log (check your php.ini for <code>error_log</code>) is — $error_log_file«; } if (file_exists($error_log_file) && !is_writeable($error_log_file)) { $warn[] = «PHP Error log (<code>error_log</code>) is — $error_log_file, but is not writeable. Postfixadmin will be unable to log error(s). <a href=’https://www.php.net/manual/en/errorfunc.configuration.php#ini.error-log’>PHP docs on configuring</a>.«; } if (file_exists($file_local_config)) { $info[] = «config.local.php file found : » . realpath($file_local_config); } else { $warn[] = «Warning: config.local.php — NOT FOUND — It’s Recommended to store your own settings in config.local.php instead of editing config.inc.php«; } // Check if there is support for at least 1 database if (!($m_pdo && ($m_pdo_mysql || $m_pdo_sqlite || $m_pdo_pgsql))) { $error[] = «There is no database (PDO) support in your PHP setup, you MUST install a suitable PHP PDO extension (e.g. pdo_pgsql, pdo_mysql or pdo_sqlite).«; } if ($m_pdo_mysql) { $info[] = «Database — MySQL support available«; } else { $info[] = «Database — MySQL (pdo_mysql) extension not found«; } // PostgreSQL functions if ($m_pdo_pgsql) { $info[] = «Database — PostgreSQL support available «; } else { $warn[] = «Database — PostgreSQL (pdo_pgsql) extension not found«; } if ($m_pdo_sqlite) { $info[] = «Database — SQLite support available«; } else { $warn[] = «Database support — SQLite (pdo_sqlite) extension not found«; } if (empty($CONF[‘encrypt’])) { $error[] = ‘Password hashing — <code>$CONF[«encrypt»]</code> is empty. Please check your config.inc.php / config.local.php file.’; } else { $info[] = ‘Password hashing — <code>$CONF[«encrypt»] = ‘ . $CONF[‘encrypt’] . «</code>«; try { $output = pacrypt(‘foobar’); if ($output == ‘foobar’) { $warn[] = «You appear to be using a cleartext <code>$CONF[‘encrypt’]</code> setting. This is insecure. You have been warned. Your users deserve better«; } $info[] = ‘Password hashing — <code>$CONF[«encrypt»]</code> — hash generation OK’; } catch (Exception $e) { $error[] = «Password Hashing — attempted to use configured encrypt backend (<code>{$CONF[‘encrypt’]}</code>) triggered an error: » . $e->getMessage(); if (is_writeable($error_log_file)) { $err = «Possibly helpful error_log messages — » . htmlspecialchars( implode(«», array_slice(file($error_log_file), —4, 3) // last three lines, might fail miserably if error_log is large. ) ); $error[] = nl2br($err); } $error[] = «You will have problems logging into PostfixAdmin.«; if (preg_match(‘/^dovecot:/’, $CONF[‘encrypt’])) { $error[] = «Check out our Dovecot documentation at https://github.com/postfixadmin/postfixadmin/blob/master/DOCUMENTS/DOVECOT.txt, specifically around ‘3. Permissions’.«; } } } if (empty($CONF[‘admin_email’])) { $warn[] = ‘Admin Email — From address missing. Please add specify an admin_email in your config.inc.php or config.local.php e.g. <code>$CONF[«admin_email»] = «Support Person &lt;support@yourdomain.com&gt;»;</code>’; } $link = null; $error_text = null; $dsn = ‘Could not generate’; try { $dsn = db_connection_string(); $info[] = «Database connection configured OK (using PDO <code>$dsn</code>)«; $link = db_connect(); $info[] = «Database connection — Connected OK«; } catch (Exception $e) { $error[] = «Database connection string : » . $dsn; $error[] = «Problem connecting to database, check database configuration ($CONF[‘database_*’] entries in config.local.php)«; $error[] = $e->getMessage(); } // Session functions if ($f_session_start) { $info[] = «Depends on: PHP session support — OK«; } else { $error[] = «Error: Depends on: PHP session support — NOT FOUND. (FreeBSD: portinstall php$phpversion-session ?)«; } // PCRE functions if ($f_preg_match) { $info[] = «Depends on: PHP pcre support — OK«; } else { $error[] = «Error: Depends on: PHP pcre support — NOT FOUND. (FreeBSD: portinstall php$phpversion-pcre)«; } // Multibyte functions if ($f_mb_encode_mimeheader) { $info[] = «Depends on: PHP mbstring support — OK«; } else { $error[] = «Error: Depends on: PHP mbstring support — NOT FOUND. (FreeBSD: portinstall php$phpversion-mbstring?)«; } // Imap functions if ($f_imap_open) { $info[] = «Optional — PHP IMAP functions — OK«; } else { $warn[] = «Warning: Optional dependency — PHP ‘imap’ extension missing. Without this you may not be able to automate creation of sub-folders for new mailboxes«; } return [‘error’ => $error, ‘warn’ => $warn, ‘info’ => $info]; }

установил php mysql и apache из портов

запускаю phpmyadmin и он мне говорит —

При работе с многобайтными кодировками без установленного расширения PHP «mbstring», phpMyAdmin не в состоянии производить корректное разбиение строк, что может привести к непредсказуемым результатам. Установите расширение PHP «mbstring».

когда я набираю

# cd /usr/ports/lang/php5-extensions/

# make install

===> Installing for php5-extensions-1.4

===> php5-extensions-1.4 depends on file: /usr/local/include/php/main/php.h — found

===> php5-extensions-1.4 depends on file: /usr/local/lib/php/20090626/mcrypt.so — found

===> Generating temporary packing list

===> Checking if lang/php5-extensions already installed

===> php5-extensions-1.4 is already installed

You may wish to «make deinstall» and install this port again

by «make reinstall» to upgrade it properly.

If you really wish to overwrite the old port of lang/php5-extensions

without deleting it first, set the variable «FORCE_PKG_REGISTER»

in your environment or the «make install» command line.

*** Error code 1

Stop in /usr/ports/lang/php5-extensions.

*** Error code 1

Stop in /usr/ports/lang/php5-extensions.

# make reinstall

тоже не помогает

Hi All,

I have issues with postfixadmin installation. I’ve spent last two days on that.
Day 1 with postgres
Day 2 with mysql

Both on Freebsd 11.2
php version: PHP 7.2.21 (cli) (built: Sep 3 2019 12:52:02) ( ZTS ) — installed via ports
postfix version: postfixadmin-3.2_3 via ports
apache version: apache24-2.4.41 via ports

when runnign setup.php I get following:

Running software:

PHP version 7.2.21
Apache
Checking for dependencies:

Magic Quotes: Disabled — OK
Depends on: presence config.inc.php — OK
Checking $CONF[‘configured’] — OK
Depends on: presence config.local.php — OK
Error: There is no database support in your PHP setup
To install MySQL 3.23 or 4.0 support on FreeBSD:
% cd /usr/ports/databases/php5-mysql/
% make clean install
— or with portupgrade —
% portinstall php5-mysql
To install MySQL 4.1 support on FreeBSD:
% cd /usr/ports/databases/php5-mysqli/
% make clean install
— or with portupgrade —
% portinstall php5-mysqli
To install PostgreSQL support on FreeBSD:
% cd /usr/ports/databases/php5-pgsql/
% make clean install
— or with portupgrade —
% portinstall php5-pgsql
Error: Can’t connect to database
Please edit the $CONF[‘database_*’] parameters in config.local.php.
DEBUG INFORMATION:
MySQL 4.1 functions not available! (php5-mysqli installed?)
database_type = ‘mysqli’ in config.inc.php, are you using a different database?

Error: Depends on: session — NOT FOUND
To install session support on FreeBSD:
% cd /usr/ports/www/php5-session/
% make clean install
— or with portupgrade —
% portinstall php5-session
Depends on: pcre — OK
Error: Depends on: multibyte string — NOT FOUND
To install multibyte string support, install php5-mbstring
Warning: Depends on: IMAP functions — NOT FOUND
To install IMAP support, install php5-imap
Without IMAP support, you won’t be able to create subfolders when creating mailboxes.

Modules are installed:
php72-7.2.21
php72-mysqli-7.2.21
php72-pdo_mysql-7.2.21
php72-mbstring-7.2.21
php72-imap-7.2.21

and are loaded:
:/usr/local/www/postfixadmin# php -m
[PHP Modules]
bcmath
Core
ctype
date
dom
gd
gettext
hash
iconv
imap
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
scrypt
session
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
zlib

[Zend Modules]

PHP connection works firn with database and password is correct for database:
:# php -r ‘var_dump(mysqli_connect(«localhost», «postfixusr», «XXXXXXXXX», «postfixdb»));’
object(mysqli)#1 (19) {
[«affected_rows»]=>
int(0)
[«client_info»]=>
string(79) «mysqlnd 5.0.12-dev — 20150407 — $Id: 3591daad22de08524295e1bd073aceeff11e6579 $»
[«client_version»]=>
int(50012)
[«connect_errno»]=>
int(0)
[«connect_error»]=>
NULL
[«errno»]=>
int(0)
[«error»]=>
string(0) «»
[«error_list»]=>
array(0) {
}
[«field_count»]=>
int(0)
[«host_info»]=>
string(25) «Localhost via UNIX socket»
[«info»]=>
NULL
[«insert_id»]=>
int(0)
[«server_info»]=>
string(10) «5.7.27-log»
[«server_version»]=>
int(50727)
[«stat»]=>
string(135) «Uptime: 6046 Threads: 1 Questions: 419 Slow queries: 1 Opens: 182 Flush tables: 1 Open tables: 144 Queries per second avg: 0.069»
[«sqlstate»]=>
string(5) «00000»
[«protocol_version»]=>
int(10)
[«thread_id»]=>
int(22)
[«warning_count»]=>
int(0)
}

Edit forgot to add config:
config.local.php:
<?php
$CONF[‘configured’] = true;
$CONF[‘setup_password’] = ‘changeme’;
$CONF[‘database_type’] = ‘mysqli’;
$CONF[‘database_host’] = ‘localhost’;
$CONF[‘database_user’] = ‘postfixusr’;
$CONF[‘database_password’] = ‘XXXXXXXXx’;
$CONF[‘database_name’] = ‘postfixdb’;
….
?>

I’ve searched the net all all i can find is that one:
https://github.com/postfixadmin/postfixadmin/issues/237
which was closed without really any solution.
I tried same thing with postgress and got exactly same issues — cant pass this moment of installation.

Any help, tips, pointers are much appreciated

Haz

 

Last edit: PavK 2019-09-03

Люди. Помогите)))

Да бы не плодить новую тему напишу здесь. Просто — это все относится к одной проблеме, но разное направление)))

Во общем след. мой шаг после всего этого (что я делал выше) был установка postfixadmin. Поставил из портов его и далее по адресу типа — 192.168.1.100:3132/postfixadmin попадаю в вебинтерфейс. Далее нажимаю setup и он мне выдает след.

Checking for dependencies:

Magic Quotes: Disabled — OK

Depends on: presence config.inc.php — OK

Warning: $CONF[‘configured’] is ‘false’.

You must edit your config.inc.php and change this to true (this indicates you’ve created the database and user)

Depends on: MySQL 3.23, 4.0 — OK

Depends on: MySQL 4.1 — OK (change the database_type to ‘mysqli’ in config.inc.php!!)

Error: Can’t connect to database

Please edit the $CONF[‘database_*’] parameters in config.inc.php.

DEBUG INFORMATION:

Connect: Access denied for user ‘admin’@’localhost’ (using password: YES)

Depends on: session — OK

Depends on: pcre — OK

Error: Depends on: multibyte string — NOT FOUND

To install multibyte string support, install php5-mbstring

Warning: Depends on: IMAP functions — NOT FOUND

To install IMAP support, install php5-imap

Without IMAP support, you won’t be able to create subfolders when creating mailboxes.

Не много не могу понять, что надо делать, т.к. не могу понять, что толком от меня хотят))))

$CONF[‘configured’] is ‘false’. — это менял на true, только еще хуже становилось))))

«I need help» ))))

Кстати, это

Error: Depends on: multibyte string — NOT FOUND

To install multibyte string support, install php5-mbstring

Warning: Depends on: IMAP functions — NOT FOUND

To install IMAP support, install php5-imap

Without IMAP support, you won’t be able to create subfolders when creating mailboxes.

Я уже исправил)) Поэтому остается только это — config.inc.php

root@mail:/usr/local/www/postfixadmin # pkg info
apache24-2.4.20_1  Version 2.4.x of Apache web server
apr-1.5.2.1.5.4  Apache Portability Library
autoconf-2.69_1  Automatically configure source code on many Un*x platforms
autoconf-wrapper-20131203  Wrapper script for GNU autoconf
automake-1.15_1  GNU Standards-compliant Makefile generator
automake-wrapper-20131203  Wrapper script for GNU automake
ca_root_nss-3.22.2  Root certificate bundle from the Mozilla Project
cclient-2007f_2,1  C-client mail access routines by Mark Crispin
cmake-3.5.2_1  Cross-platform Makefile generator
cmake-modules-3.5.2  Modules and Templates for CMake
curl-7.49.0  Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
cyrus-sasl-2.1.26_12  RFC 2222 SASL (Simple Authentication and Security Layer)
db5-5.3.28_4  Oracle Berkeley DB, revision 5.3
dialog4ports-0.1.5_2  Console Interface to configure ports
expat-2.1.1_1  XML 1.0 parser written in C
gdbm-1.12  GNU database manager
gettext-runtime-0.19.8.1  GNU gettext runtime libraries and programs
gettext-tools-0.19.8.1  GNU gettext development and translation tools
gmake-4.2.1  GNU version of 'make' utility
gmake-lite-4.2.1  Minimalist version of gnu make
help2man-1.43.3_1  Automatically generating simple manual pages from program output
icu-55.1  International Components for Unicode (from IBM)
indexinfo-0.2.4  Utility to regenerate the GNU info page index
jsoncpp-1.7.2_1  JSON reader and writer library for C++
libarchive-3.2.1,1  Library to create and read several streaming archive formats
libedit-3.1.20150325_2,1  Command line editor library
libffi-3.2.1  Foreign Function Interface
libiconv-1.14_9  Character set conversion library
liblz4-131  LZ4 compression library, lossless and very fast
libtool-2.4.6  Generic shared library support script
libxml2-2.9.3  XML parser library for GNOME
lmdb-0.9.18  OpenLDAP Lightning Memory-Mapped Database
lzo2-2.09  Portable speedy, lossless data compression library
m4-1.4.17_1,1  GNU m4
mod_php56-5.6.23  PHP Scripting Language
mysql56-client-5.6.30  Multithreaded SQL database (client)
mysql56-server-5.6.30  Multithreaded SQL database (server)
oniguruma5-5.9.6_1  BSDL Regular Expressions library compatible with POSIX/GNU/Perl
p5-CPAN-Meta-2.150005  Distribution metadata for a CPAN dist
p5-DBI-1.636  Perl5 Database Interface, required for DBD::* modules
p5-Data-OptList-0.110  Parse and validate simple name/value option pairs
p5-Devel-GlobalDestruction-0.13_1 Expose PL_dirty, the flag which marks global destruction
p5-Digest-HMAC-1.03_1  Perl5 interface to HMAC Message-Digest Algorithms
p5-Dist-CheckConflicts-0.11_1  Declare version conflicts for your dist
p5-Email-Valid-1.192_1  Check validity of Internet email addresses
p5-IO-Socket-IP-0.37  Drop-in replacement for IO::Socket::INET supporting IPv4 and IPv6
p5-Locale-gettext-1.06  Message handling functions
p5-Log-Dispatch-2.56  Suite of OO modules for logging messages to multiple outputs
p5-Log-Log4perl-1.47  Log4j implementation for Perl
p5-MIME-Charset-1.012  Charset Informations for MIME
p5-MIME-EncWords-1.014.3  Deal with RFC 2047 encoded words (improved)
p5-Mail-Sender-0.8.23  Module for sending mails with attachments through an SMTP server
p5-Mail-Sendmail-0.79_1  Perl module implementing a simple, platform-independent mailer
p5-Mail-Tools-2.14  Perl5 modules for dealing with Internet e-mail messages
p5-Module-Build-0.4218  Build and install Perl modules
p5-Module-Implementation-0.09_1 Loads one of several alternate underlying implementations for a module
p5-Module-Runtime-0.014_1  Runtime module handling
p5-Net-DNS-1.06_2,1  Perl5 interface to the DNS resolver, and dynamic updates
p5-Net-Domain-TLD-1.74  Look up and validate TLDs
p5-Params-Util-1.07_2  Utility functions to aid in parameter checking
p5-Params-Validate-1.24  Validate method/function parameters
p5-Socket-2.021  Networking constants and support functions
p5-Sub-Exporter-0.987_1  Sophisticated exporter for custom-built routines
p5-Sub-Exporter-Progressive-0.001011 Only use Sub::Exporter if you need it
p5-Sub-Install-0.928_1  Install subroutines into packages easily
p5-TimeDate-2.30_2,1  Perl5 module containing a better/faster date parser for absolute dates
p5-Try-Tiny-0.24  Minimal try/catch with proper localization of $@
pcre-8.38_1  Perl Compatible Regular Expressions library
perl5-5.20.3_13  Practical Extraction and Report Language
php56-5.6.23  PHP Scripting Language
php56-ctype-5.6.23  The ctype shared extension for php
php56-dom-5.6.23  The dom shared extension for php
php56-extensions-1.0  "meta-port" to install PHP extensions
php56-filter-5.6.23  The filter shared extension for php
php56-hash-5.6.23  The hash shared extension for php
php56-iconv-5.6.23  The iconv shared extension for php
php56-imap-5.6.23  The imap shared extension for php
php56-json-5.6.23  The json shared extension for php
php56-mbstring-5.6.23  The mbstring shared extension for php
php56-mysql-5.6.23  The mysql shared extension for php
php56-mysqli-5.6.24  The mysqli shared extension for php
php56-opcache-5.6.23  The opcache shared extension for php
php56-pdo-5.6.23  The pdo shared extension for php
php56-pdo_sqlite-5.6.23  The pdo_sqlite shared extension for php
php56-pgsql-5.6.24  The pgsql shared extension for php
php56-phar-5.6.23  The phar shared extension for php
php56-posix-5.6.23  The posix shared extension for php
php56-session-5.6.24  The session shared extension for php
php56-simplexml-5.6.23  The simplexml shared extension for php
php56-sqlite3-5.6.23  The sqlite3 shared extension for php
php56-tokenizer-5.6.23  The tokenizer shared extension for php
php56-xml-5.6.23  The xml shared extension for php
php56-xmlreader-5.6.23  The xmlreader shared extension for php
php56-xmlrpc-5.6.24  The xmlrpc shared extension for php
php56-xmlwriter-5.6.23  The xmlwriter shared extension for php
pkg-1.8.7  Package manager
pkgconf-0.9.12_1  Utility to help to configure compiler and linker flags
postfix-3.1.1,1  Secure alternative to widely-used Sendmail
postfixadmin-2.93  PHP web-based management tool for Postfix virtual domains and users
postgresql93-client-9.3.13  PostgreSQL database (client)
py27-Babel-2.3.4  Collection of tools for internationalizing Python applications
py27-Jinja2-2.8  Fast and easy to use stand-alone template engine
py27-MarkupSafe-0.23  Implements XML/HTML/XHTML Markup safe string for Python
py27-alabaster-0.7.6  Modified Kr Sphinx theme
py27-docutils-0.12  Python Documentation Utilities
py27-imagesize-0.7.1  Python image size library
py27-pygments-2.1.3  Syntax highlighter written in Python
py27-pystemmer-1.3.0_1  Snowball Stemming Algorithms for Information Retrieval
py27-pytz-2016.4,1  World Timezone Definitions for Python
py27-setuptools27-20.0  Python packages installer
py27-six-1.10.0  Python 2 and 3 compatibility utilities
py27-snowballstemmer-1.2.0_1  Snowball stemming library collection for Python
py27-sphinx-1.4.4  Python documentation generator
py27-sphinx_rtd_theme-0.1.9  Mobile-friendly py-sphinx theme
python2-2_3  The "meta-port" for version 2 of the Python interpreter
python27-2.7.11_3  Interpreted object-oriented programming language
scons-2.5.0  Build tool alternative to make
sqlite3-3.13.0  SQL database engine in a C library
root@mail:/usr/local/www/postfixadmin #

Доброго времени суток! Прошу сильно не пинать ибо почту делаю первый раз. собсно имеется?

freebsd 7.2

mysql50-server

apache22

php5

php5-mysql

php5-extensions

courier_imap_pop3d_enable

courier_authdaemond_enable

postfix

postfixadmin

sqwebmail

почту настривал согласно статье http://www.inattack.ru/article/447.html

php mysql i apache курил сам и дажеработает:

tail -f /var/log/httpd-error.log

[Tue Dec 08 01:34:05 2009] [notice] caught SIGTERM, shutting down

[Tue Dec 08 01:34:08 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]

[Tue Dec 08 01:34:09 2009] [notice] Digest: generating secret for digest authentication …

[Tue Dec 08 01:34:09 2009] [notice] Digest: done

[Tue Dec 08 01:34:09 2009] [notice] Apache/2.2.11 (FreeBSD) mod_ssl/2.2.11 OpenSSL/0.9.8e DAV/2 PHP/5.2.11 mod_perl/2.0.4 Perl/v5.8.9 configured — resuming normal operations

в httpd.conf в самый конец добавил

Alias /postfix-admin/ «/usr/local/www/postfixadmin/»

<Directory «/usr/local/www/postfixadmin»>

Options Indexes

AllowOverride Authconfig

Order deny,allow

Allow from all

</Directory>

Внимание вопрос: при попытке зайти на страницу http://192.168.1.60/postfixadmin/ вижу

Not Found

The requested URL /postfixadmin/ was not found on this server.

при попытке зайти на http://192.168.1.60/postfix-admin/index.php вижу

/**

* Postfix Admin

*

* LICENSE

* This source file is subject to the GPL license that is bundled with

* this package in the file LICENSE.TXT.

*

* Further details on the project are available at :

* http://www.postfixadmin.com or http://postfixadmin.sf.net

*

* @version $Id: index.php 299 2008-02-21 21:43:58Z GingerDog $

* @license GNU GPL v2 or later.

*

* File: index.php

* Shows a sort-of welcome page.

* Template File: -none-

*

* Template Variables: -none-

*

* Form POST GET Variables: -none-

*/

$CONF[‘configured’] = FALSE;

@include_once(‘config.inc.php’); # hide error message because only $CONF[‘configured’] is checked here

if (!file_exists (realpath («./setup.php»)) || $CONF[‘configured’] == ‘I_know_the_risk_of_not_deleting_setup.php’)

{

header («Location: login.php»);

exit;

}

?>

<html>

<head>

<title>Welcome to Postfix Admin</title>

</head>

<body>

<img id=»login_header_logo» src=»images/logo-default.png» />

<h1>Welcome to Postfix Admin</h1>

<h2>What is it?</h2>

<p>Postfix Admin is a web based interface to configure and manage a Postfix based email server for many users.</p>

<p>Postfix Admin can also be used to </p>

<ul>

<li>Forward email to other addresses</li>

<li>Configure vacation/out-of-office auto responses</li>

<li>Add/edit/remove mail accounts</li>

<li>Add/edit/remove domains</li>

<li>Broadcast emails to all users of the system</li>

<li>Set quota on mailboxes</li>

<li>And more…</li>

</ul>

<h2>Licensing</h2>

<p>Postfix admin is released under the following license :</p>

<code>

This program is free software; you can redistribute it and/or modify

it under the terms of the GNU General Public License 2 as published by

the Free Software Foundation.

</code>

<p>See the following <a href=»http://www.fsf.org/licenses/gpl-2.0.txt»>FSF GPL2 page</a> for further information on the license.</p>

<h2>What now?</h2>

<ol>

<li>Read the <a href=’INSTALL.TXT’>INSTALL.txt</a> file</li>

<li>Configure Postfix to use your chosen database — see (for example) the following pages :

<ul>

<li><a href=»http://codepoets.co.uk/postfixadmin-postgresql-courier-squir…

<li><a href=»http://bliki.rimuhosting.com/space/knowledgebase/linux/mail/…

<li><a href=»http://gentoo-wiki.com/HOWTO_Setup_a_Virtual_Postfix/Courier…

</ul>

<li>Use it</li>

</ol>

<p><b>When you have configured Postfixadmin, this page will be replaced with a login page.</b></p>

<p>You can now run <a href=»setup.php»>setup</a> to make sure that all the PHP functions are available for Postfix Admin to run.<br />

<p> If you still encounter any problems, please check the documentation and website for more information.</p>

<h2>Postfix Admin Web sites</h2>

<p>For further help, or documentation please check out —

<a href=»http://postfixadmin.org»>Postfix Admin</a> web site<br />

<a href=»http://sourceforge.net/forum/forum.php?forum_id=676076″… Base</a>

</p>

</p>

</body>

</html>

и что-то не вкурю что не работает постфиксадмин или пхп. наеюсь на поомощь.

Понравилась статья? Поделить с друзьями:
  • Error dependency pixman 1 not found tried pkgconfig
  • Error dependency is not satisfiable
  • Error dependency colorama is missing install via pip3 install colorama
  • Error dep policy is not enabled due system configuration
  • Error delta double java