Permalinks errors 404 in ubuntu 16.04 with php7

3 posts / 0 new
Last post
#1 Sat, 11/12/2016 - 16:08
xtz

Permalinks errors 404 in ubuntu 16.04 with php7

Hey there, i made a webserver ubuntu 16.04/php7 default install with virtualmin/webmin, i created virtual servers for every single websites. Automatically was installed websites in /home directory. After installing wordpress for all websites when i change permalinks to post-name i get errors on post's links , but home page works ok. From what i searched on web for last 2 days, i found out that /etc/apache2/apach2.conf shows directories was set for /var/www and my sites are isntalled by virtualmin to home/tld.xxx/public_html This is my output of last lines in apache2

 <Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>
 
<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>
 
<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

My apache acces log: 192.168.1.1 - - [12/Nov/2016:23:47:32 +0200] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 455 "http://www.xtz.ro/wp-admin/options-permalink.php" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0" 192.168.1.1 - - [13/Nov/2016:00:00:39 +0200] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 455 "http://www.xtz.ro/wp-admin/options-permalink.php" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0" 192.168.1.1 - - [13/Nov/2016:00:01:11 +0200] "GET / HTTP/1.1" 200 6918 "http://www.xtz.ro/?p=1" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0" 192.168.1.1 - - [13/Nov/2016:00:01:12 +0200] "GET /test/ HTTP/1.1" 404 495 "http://www.xtz.ro/" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0" 192.168.1.1 - - [13/Nov/2016:00:01:12 +0200] "GET /favicon.ico HTTP/1.1" 404 501 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0"

And apache log errors for php

[Sat Nov 12 22:02:16.048382 2016] [core:alert] [pid 4476] [client 192.168.1.1:55569] /home/xtz/public_html/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://www.xtz.ro/wp-admin/themes.php?page=theme_options&tab=1 [Sat Nov 12 22:02:16.250377 2016] [core:alert] [pid 4141] [client 192.168.1.1:55570] /home/xtz/public_html/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration [Sat Nov 12 22:15:49.241027 2016] [fcgid:warn] [pid 5611] (32)Broken pipe: [client 192.168.1.1:56135] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: http://www.xtz.ro/wp-admin/themes.php?page=theme_options [Sat Nov 12 23:35:09.977414 2016] [core:error] [pid 1808] (13)Permission denied: [client 192.168.1.1:59229] AH00035: access to / denied (filesystem path '/home/xtz/public_html') because search permissions are missing on a component of the path [Sat Nov 12 23:35:11.367343 2016] [core:error] [pid 1808] (13)Permission denied: [client 192.168.1.1:59229] AH00035: access to /favicon.ico denied (filesystem path '/home/xtz/public_html') because search permissions are missing on a component of the path [Sat Nov 12 23:35:25.478390 2016] [core:error] [pid 1474] (13)Permission denied: [client 192.168.1.1:59234] AH00035: access to / denied (filesystem path '/home/xtz/public_html') because search permissions are missing on a component of the path [Sat Nov 12 23:35:25.493364 2016] [core:error] [pid 1805] (13)Permission denied: [client 192.168.1.1:59245] AH00035: access to /favicon.ico denied (filesystem path '/home/xtz/public_html') because search permissions are missing on a component of the path

It seems header is not working properly, i installed it and restarted apache and still doesnt work. The only one option to work if i put /index.php/%year%/%monthnum%/%day%/%postname%/ custom or plain /?p=123 permalinks. I really want postname for permalinks to be seo friendly. Anyone got these problems here? Is there a fix?

Sat, 11/12/2016 - 17:12
xtz

OMG, i solved so simple that permalink. Seems is a wordpress bug for new mysql 5.7 , when u hit save after changing permalink option it will mess the tables in mysql. The most easy fix after 3 days of searching and testing solutions. Nothing works. Here is the miracle.

Go to your WP-ADMIN-->Settings-->Permalink and Select Plain Redo Option and Save. Problem will be solved.

Note: when u change to sample-post DO NOT HIT SAVE BUTTON. First u hit default option or simple option mark then mark the permalink for post-name and then hit save button. Try several times to switch those radio buttons. It seems this is a bug for manual installing wordpress with php 7 and mysql 5.7.

Tue, 08/29/2017 - 20:07
Limebot

I know this is old but has anyone else found a solution to this? Ubuntu 16.04 Php 7.0 Wordpress Permalinks stuck and 404 page not working unless plain option is selected.

Topic locked