update setup and install documents for PDO and the freebsd issue with

dns_get_record()
This commit is contained in:
zotlabs 2016-10-27 19:02:27 -07:00
parent b5c72611b4
commit 9c05f37c0f
2 changed files with 31 additions and 7 deletions

View File

@ -501,7 +501,7 @@ class Setup extends \Zotlabs\Web\Controller {
$this->check_add($ck_funcs, t('libCurl PHP module'), true, true); $this->check_add($ck_funcs, t('libCurl PHP module'), true, true);
$this->check_add($ck_funcs, t('GD graphics PHP module'), true, true); $this->check_add($ck_funcs, t('GD graphics PHP module'), true, true);
$this->check_add($ck_funcs, t('OpenSSL PHP module'), true, true); $this->check_add($ck_funcs, t('OpenSSL PHP module'), true, true);
$this->check_add($ck_funcs, t('mysqli or postgres PHP module'), true, true); $this->check_add($ck_funcs, t('PDO database PHP module'), true, true);
$this->check_add($ck_funcs, t('mb_string PHP module'), true, true); $this->check_add($ck_funcs, t('mb_string PHP module'), true, true);
$this->check_add($ck_funcs, t('xml PHP module'), true, true); $this->check_add($ck_funcs, t('xml PHP module'), true, true);
@ -531,9 +531,9 @@ class Setup extends \Zotlabs\Web\Controller {
$ck_funcs[2]['status'] = false; $ck_funcs[2]['status'] = false;
$ck_funcs[2]['help'] = t('Error: openssl PHP module required but not installed.'); $ck_funcs[2]['help'] = t('Error: openssl PHP module required but not installed.');
} }
if(! function_exists('mysqli_connect') && !function_exists('pg_connect')) { if(! class_exists('PDO')) {
$ck_funcs[3]['status'] = false; $ck_funcs[3]['status'] = false;
$ck_funcs[3]['help'] = t('Error: mysqli or postgres PHP module required but neither are installed.'); $ck_funcs[3]['help'] = t('Error: PDO database PHP module required but not installed.');
} }
if(! function_exists('mb_strlen')) { if(! function_exists('mb_strlen')) {
$ck_funcs[4]['status'] = false; $ck_funcs[4]['status'] = false;

View File

@ -156,12 +156,21 @@ but may be an issue with nginx or other web server platforms.
3. Create an empty database and note the access details (hostname, username, 3. Create an empty database and note the access details (hostname, username,
password, database name). The MySQL client libraries will fallback to socket password, database name). The PDO database libraries will fallback to socket
communication if the hostname is 'localhost' and some people have reported communication if the hostname is 'localhost' and some people have reported
issues with the socket implementation. Use it if your requirements mandate. issues with the socket implementation. Use it if your requirements mandate.
Otherwise if the database is served on the local server, use '127.0.0.1' for Otherwise if the database is served on the local server, use '127.0.0.1' for
the hostname. See https://dev.mysql.com/doc/refman/5.0/en/connecting.html the hostname.
for more information.
Internally we now use the PDO library for database connections. If you
encounter a database configuration which cannot be expressed on the setup form
(for instance using MySQL with an unusual socket location); you can supply
the PDO connection string as the database hostname. For instance
mysql:unix_socket=/my/special/socket_path
You should still fill in all other applicable form values as needed.
4. If you know in advance that it will be impossible for the web server to 4. If you know in advance that it will be impossible for the web server to
write or create files in your web directory, create an empty file called write or create files in your web directory, create an empty file called
@ -223,7 +232,7 @@ You should also be sure that App::$config['system']['php_path'] is set correctly
in your .htconfig.php file, it should look like (changing it to the correct in your .htconfig.php file, it should look like (changing it to the correct
PHP location): PHP location):
App::$config['system']['php_path'] = '/usr/local/php55/bin/php'; App::$config['system']['php_path'] = '/usr/local/php56/bin/php';
##################################################################### #####################################################################
@ -296,6 +305,21 @@ a lot of help available on the web. Google "mod-rewrite" along with the
name of your operating system distribution or Apache package. name of your operating system distribution or Apache package.
#####################################################################
- If you see an error during database setup that DNS lookup failed
#####################################################################
This is a known issue on some versions of FreeBSD, because
dns_get_record() fails for some lookups. Create a file in your top webserver
folder called '.htpreconfig.php' and inside it put the following:
<?php
App::$config['system']['do_not_check_dns'] = 1;
This should allow installation to proceed. Once the database has been
installed, add the same config statement (but not the '<?php' line) to the
.htconfig.php file which was created during installation.
##################################################################### #####################################################################
- If you are unable to write the file .htconfig.php during installation - If you are unable to write the file .htconfig.php during installation
due to permissions issues: due to permissions issues: