0

Wordpress installs without any issues. No error log in FPM, Nginx and WP-Debug. However it is not working. I believe the issue is related with FPM. When I carry all the WP code (no-change) into another host, it works even with the same db.

If I just install the Wordpress. The default admin account does not become available. The user is created in the MySQL but not as admin.

Sorry, you are not allowed to access this page.

If I systemctl reload php7.3-fpm then install it, I can login as an Admin but page and post create gives the error below.

PHP Notice: Trying to get property 'publicly_queryable'

After that if I systemctl reload php7.3-fpm then I can see page and post create but for a few minutes any second refresh. We are back to...

PHP Notice: Trying to get property 'publicly_queryable'

Everything installed freshly. My setup:

  • Ubuntu 16.04.6LTS
  • Nginx 1.17.6
  • Wordress 4.9 and 5.1 *tried both
  • MySQL 5.5 and 8.0*tried both

I install PHP with the commands below. add-apt-repository ppa:ondrej/php add-apt-repository ppa:ondrej/nginx apt-get install php7.3-bcmath php7.3-bz2 php7.3-cli php7.3-common php7.3-curl php7.3-fpm php7.3-gd php7.3-intl php7.3-json php7.3-mbstring php7.3-mysql php7.3-opcache php7.3-readline php7.3-xml php7.3-zip And my Nginx Configuration is coming from Digital Oceans nginxconfig.io

mydomain.com.conf

` location ~ .php$ { # 404 try_files $fastcgi_script_name =404;

# default fastcgi_params
include fastcgi_params;

# fastcgi settings
fastcgi_pass            unix:/var/run/php/php7.3-fpm.sock;
fastcgi_index           index.php;
fastcgi_buffers         8 16k;
fastcgi_buffer_size     32k;

# fastcgi params
fastcgi_param DOCUMENT_ROOT     $realpath_root;
fastcgi_param SCRIPT_FILENAME   $realpath_root$fastcgi_script_name;
fastcgi_param PHP_ADMIN_VALUE   "open_basedir=$base/:/usr/lib/php/:/tmp/";

} `

Full config: https://www.digitalocean.com/community/tools/nginx#?0.domain=mydomain.com&0.non_www=false&0.wordpress&php_server=%2Fvar%2Frun%2Fphp%2Fphp7.3-fpm.sock

0

Make sure you strip it down - no plugins and just a default theme, then see if you get the error. Also wou can add the following code to your functions.php file to show explicit error information.

// ----------------------------------------------------------------------------------------------------
// - Display Errors
// ----------------------------------------------------------------------------------------------------
ini_set('display_errors', 'On');
ini_set('html_errors', 0);

// ----------------------------------------------------------------------------------------------------
// - Error Reporting
// ----------------------------------------------------------------------------------------------------
error_reporting(-1);

// ----------------------------------------------------------------------------------------------------
// - Shutdown Handler
// ----------------------------------------------------------------------------------------------------
function ShutdownHandler()
{
    if(@is_array($error = @error_get_last()))
    {
        return(@call_user_func_array('ErrorHandler', $error));
    };

    return(TRUE);
};

register_shutdown_function('ShutdownHandler');

// ----------------------------------------------------------------------------------------------------
// - Error Handler
// ----------------------------------------------------------------------------------------------------
function ErrorHandler($type, $message, $file, $line)
{
    $_ERRORS = Array(
        0x0001 => 'E_ERROR',
        0x0002 => 'E_WARNING',
        0x0004 => 'E_PARSE',
        0x0008 => 'E_NOTICE',
        0x0010 => 'E_CORE_ERROR',
        0x0020 => 'E_CORE_WARNING',
        0x0040 => 'E_COMPILE_ERROR',
        0x0080 => 'E_COMPILE_WARNING',
        0x0100 => 'E_USER_ERROR',
        0x0200 => 'E_USER_WARNING',
        0x0400 => 'E_USER_NOTICE',
        0x0800 => 'E_STRICT',
        0x1000 => 'E_RECOVERABLE_ERROR',
        0x2000 => 'E_DEPRECATED',
        0x4000 => 'E_USER_DEPRECATED'
    );

    if(!@is_string($name = @array_search($type, @array_flip($_ERRORS))))
    {
        $name = 'E_UNKNOWN';
    };

    return(print(@sprintf("%s Error in file \xBB%s\xAB at line %d: %s\n", $name, @basename($file), $line, $message)));
};

$old_error_handler = set_error_handler("ErrorHandler");
|improve this answer|||||
  • After the script update "E_WARNING Error in file class-phpass.php at line 68: is_readable(): open_basedir restriction in effect.", I fixed it but still same issue is on going. Thank you for the script. – Bora Alp Arat Dec 7 '19 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.