FlatPress 1.5.1 - problem after installation

This is the right place to report general bugs, make suggestions or ask for help.
lantaca
Posts: 29
Joined: Thu May 23, 2024 9:02 pm

Re: FlatPress 1.5.1 - problem after installation

Post by lantaca » Fri Aug 28, 2026 2:42 pm

OOOKK

sorry for the problems of my host...

User avatar
fraenkiman
FlatPress Coder
Posts: 541
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: FlatPress 1.5.1 - problem after installation

Post by fraenkiman » Fri Aug 28, 2026 11:03 pm

You don't need to feel bad about that. Altervista isn't small or unknown. The goal is to make FlatPress 1.6 compatible with Altervista without compromising compatibility with other web hosts.

The final patch for 1.6 is quite extensive and currently comprises 15 files.

I don’t have access to a wide variety of public web hosting environments for testing. Testing locally is one thing, but it doesn’t prove that the changes will actually work everywhere in the real world. I’m counting on the community again to provide me with strong support during the release candidate phase.

I currently have 4 public test instances available: two from Lubomír (CZ) with APCu support, one from UD-Media (DE), and yours (IT).
I’d like to take this opportunity to thank everyone who’s making it possible for me to test on public web hosts.

The rest are running locally on my machine and on a Raspberry Pi via DynDNS.

User avatar
fraenkiman
FlatPress Coder
Posts: 541
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: FlatPress 1.5.1 - problem after installation

Post by fraenkiman » Sat Aug 29, 2026 3:41 pm

So, the patch is in the GitHub repo and, barring any major issues, will be released with version 1.6.

PR #948 makes FlatPress’s network and URL detection significantly more robust for modern hosting topologies. PrettyURLs now detects rewrite support more conservatively, retains manually configurable Pretty for NGINX, and tests the three routing methods—PATH Info, HTTP GET, and Pretty—using real browser probes.

Have a relaxing weekend, and best regards,
Frank

lantaca
Posts: 29
Joined: Thu May 23, 2024 9:02 pm

Re: FlatPress 1.5.1 - problem after installation

Post by lantaca » Tue Sep 01, 2026 6:47 am

great job, congratulations and thans!

FreeMax
Posts: 2
Joined: Sat Sep 26, 2026 7:41 am
Location: Palazzuolo sul Senio (Italia)
Contact:

Re: FlatPress 1.5.1 - problem after installation

Post by FreeMax » Sat Sep 26, 2026 7:52 am

Hello,

I am experiencing the usual issues with my site hosted on Altervista following the update to version 1.5.1. I have already discussed the matter with the web host administrator, but the solutions implemented did not yield good results. Is there a temporary workaround available while waiting for the new release?
Thanks,
Massimiliano

Viva Flatpress ;)

lantaca
Posts: 29
Joined: Thu May 23, 2024 9:02 pm

Re: FlatPress 1.5.1 - problem after installation

Post by lantaca » Mon Sep 28, 2026 11:49 am

Ciao
risolto sostituendo il file default.php con quello dalla versione 1.6 DEV
prova e facci sapere

Code: Select all

<?php
/**
 * defaults.php
 *
 * This file defines standard positions of some important
 * dirs or files.
 *
 * For security reasons
 * these can't be modified in the common settings panels
 * but only through this file.
 * If you want to change these constants, just change
 * the second parameter.
 *
 * We suggest not to define here your owns, but instead
 * inmplementing them as plugins
 */

// legacy mode; needed with some ill-formed spb files
define('DUMB_MODE_ENABLED', false);

/**
 * Default file permissions
 * https://binary-butterfly.de/artikel/dateirechte-wie-stelle-ich-das-bei-meinem-hoster-ein/
 * Note: Lowering the directory and file permissions may result in FlatPress or some additional plugins not working correctly.
 */
// For the directory fp-content and its subdirectories including the files
define('FILE_PERMISSIONS', 0644); // 0644 is recommended
define('DIR_PERMISSIONS', 0755); // 0755 is recommended

// FlatPress core: This includes this file, recursively the directories FP_INCLUDES, CONFIG_DIR, USERS_DIR, LANG_DIR and SHARED_TPLS
define('CORE_FILE_PERMISSIONS', 0640); // 0640 for productive operation
define('CORE_DIR_PERMISSIONS', 0750); // 0750 for productive operation

// For all other files and directories, e.g. ADMIN_DIR, FP_INTERFACE, THEMES_DIR and PLUGINS_DIR
define('RESTRICTED_FILE_PERMISSIONS', 0644); // 0644 is recommended
define('RESTRICTED_DIR_PERMISSIONS', 0755); // 0755 is recommended

/**
 * First some webserver setup...
 */

/**
 * Here's where your server save session-related stuff.
 * If you don't experience any session-related problem, you
 * you can leave it blank and it will default to standard webserver config
 */
define('SESSION_PATH', '');

// Absolute path to your webserver dir; if you don't experience any problem
// you can leave this as it is
define('ABS_PATH', str_replace('\\', '/', dirname(__FILE__)) . '/');
// Here was blog root in earlier versions. This has been moved to config_load()

// Is required so that the file and directory permissions can be set when executing the setup
define('BASE_DIR', str_replace('\\', '/', dirname(__FILE__)));

// Here are default config files
define('FP_DEFAULTS', 'fp-defaults/');

// All writable directories go here.
define('FP_CONTENT', 'fp-content/');

// Blog configurations files
define('CONFIG_DIR', FP_CONTENT . 'config/');
define('CONFIG_FILE', CONFIG_DIR . 'settings.conf.php');

/**
 * @deprecated as of FlatPress 1.2 - still here only to be able to update pre-1.2 credentials
 */
define('HASHSALT_FILE', CONFIG_DIR . 'hashsalt.conf.php');
define('CONFIG_DEFAULT', FP_DEFAULTS . 'settings-defaults.php');
define('USERS_DIR', FP_CONTENT . 'users/');

// Here we'll store all your entries, comments, static pages and blocks
// Comments are stored automatically in subdirs of the dir CONTENT_DIR
define('CONTENT_DIR', FP_CONTENT . 'content/');
// define('BLOCKS_DIR', CONTENT_DIR . 'blocks/');

// !!! CRITICAL !!!
// all includes file
define('FP_INCLUDES', 'fp-includes/');

// core include scripts
define('INCLUDES_DIR', FP_INCLUDES . 'core/');

// smarty engine
define('COMPILE_DIR', FP_CONTENT . 'compile/');
define('CACHE_DIR', FP_CONTENT . 'cache/');
// FlatPress specific Smarty plugins
define('FP_SMARTYPLUGINS_DIR', ABS_PATH . FP_INCLUDES . 'fp-smartyplugins/');

define('FP_INTERFACE', 'fp-interface/');

// theme dir
define('THEMES_DIR', FP_INTERFACE . 'themes/');

// language files
define('LANG_DIR', FP_INTERFACE . 'lang/');

// misc forms
define('SHARED_TPLS', ABS_PATH . FP_INTERFACE . 'sharedtpls/');

// Here is where all plugins are saved
define('PLUGINS_DIR', 'fp-plugins/');

define('ADMIN_DIR', 'admin/');

// Cache file name and path.
define('CACHE_FILE', '%%cached_list.php');

define('INDEX_DIR', FP_CONTENT . 'index/');

define('LOCKFILE', FP_CONTENT . '%%setup.lock');

// Here is where all the uploaded images will be saved
define('IMAGES_DIR', FP_CONTENT . 'images/');

// Here is where all the attachments will be saved
define('ATTACHS_DIR', FP_CONTENT . 'attachs/');

set_include_path(ABS_PATH);

include (LANG_DIR . 'browserlang.php');
define('LANG_DEFAULT', $browserLang);
define('BPT_SORT', SORT_DESC);

/**
 * Generates for your scripts in plugins and templates
 * a random hexadecimal value for the nonce attribute
 * https://wiki.selfhtml.org/wiki/HTML/Attribute/nonce
 */
define('RANDOM_HEX', bin2hex(random_bytes(18)));

$fp_script_name = (string)($_SERVER ['SCRIPT_NAME'] ?? '/');
define('BLOG_ROOT', ('/' === ($v = dirname($fp_script_name)) ? $v : $v . '/'));

/**
 * APCu support
 * For detailed information, see:
 * docs/APCu_Installation_and_Activation.md
 * docs/FlatPress_APCu_Cache_Overview.md
 *
 * For small APCu pools (< 32 MiB), set to 600–1800 s;
 * for standard pools, set it to 1800–3600 s;
 * for large pools, set it to 3600–7200 s.
 */
$_ENV ['FP_APCU_IO_TTL'] = 3600;

// Core APCu Helpers and Namespacing
include (INCLUDES_DIR . 'core.apcu.php');

/**
 * AlterVista HTTPS compatibility
 *
 * AlterVista may terminate TLS in front of the PHP backend. In that case PHP
 * can see an HTTP origin request even though the browser used HTTPS. AlterVista
 * forwards the external scheme through X-Forwarded-Proto. Restrict this bridge
 * to AlterVista hostnames so forwarded scheme headers are not trusted on other
 * hosting environments.
 */
if (PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') {
	$fp_server_name = strtolower((string)($_SERVER ['SERVER_NAME'] ?? ''));
	$fp_x_forwarded_proto = strtolower((string)($_SERVER ['HTTP_X_FORWARDED_PROTO'] ?? ''));
	$fp_is_altervista = (bool)preg_match('/(^|\.)altervista\.org$/', $fp_server_name);
	$fp_forwarded_https = in_array('https', array_map('trim', explode(',', $fp_x_forwarded_proto)), true);

	if ($fp_is_altervista && $fp_forwarded_https) {
		$_SERVER ['HTTPS'] = 'on';
	}

	unset($fp_server_name, $fp_x_forwarded_proto, $fp_is_altervista, $fp_forwarded_https);
}

// Adding security and HTTPS support (and determining BLOG_BASEURL)
include (INCLUDES_DIR . 'core.connection.php');
?>

lantaca
Posts: 29
Joined: Thu May 23, 2024 9:02 pm

Re: FlatPress 1.5.1 - problem after installation

Post by lantaca » Mon Sep 28, 2026 12:50 pm

Another problem arose after the installation and the correction of the default files:
I cannot add new items or save configuration changes; an error message appears.
Attachments
Screenshot 2026-09-28 145156.png
Screenshot 2026-09-28 145156.png (40.99 KiB) Viewed 138 times
Screenshot 2026-09-28 145128.png
Screenshot 2026-09-28 145128.png (28.61 KiB) Viewed 138 times

lantaca
Posts: 29
Joined: Thu May 23, 2024 9:02 pm

Re: FlatPress 1.5.1 - problem after installation

Post by lantaca » Mon Sep 28, 2026 1:12 pm

risolto...

FreeMax
Posts: 2
Joined: Sat Sep 26, 2026 7:41 am
Location: Palazzuolo sul Senio (Italia)
Contact:

Re: FlatPress 1.5.1 - problem after installation

Post by FreeMax » Mon Sep 28, 2026 5:28 pm

lantaca wrote: Mon Sep 28, 2026 11:49 am Ciao
risolto sostituendo il file default.php con quello dalla versione 1.6 DEV
prova e facci sapere

Salve,
Ho risolto il problema.
Grazie Lantaca e fraenkiman ;)

Evviva Flatpress 8-)

User avatar
fraenkiman
FlatPress Coder
Posts: 541
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: FlatPress 1.5.1 - problem after installation

Post by fraenkiman » Mon Sep 28, 2026 6:00 pm

Hi everyone,

For anyone struggling with this issue who uses Altervista as their web host, here’s the workaround for FlatPress 1.5.1.
FP_1.5.1_Altervista_defaults.zip
(2.65 KiB) Downloaded 11 times
In 1.6.dev, the patch is much more extensive, since PrettyURLs in the underlying system are also affected.

Best regards,
Frank

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests