IN Wordpress, .php files in the theme folder do not start, but return 404 error

I am in a VPS environment, so I have root access, by the way.

So take a look at these issues: http://www.sonikastudios.com/wp-content/themes/sonikas/scripts/timthumb.php?src=/wp-content/uploads/tedleescreenshot1.jpg&w=100&h=100&zc=1&q= 100

This returns a 404 error.

However, when I move timthumb.php to the root of the site, it works.

I checked file / folder permissions, this is not a problem. Also, another generated PHP image that I use for Captcha does the same ...

Thus, essentially it comes down to the lack of .php files running from folders. However, this is not a problem, because the PHP scripts that I have under / admin / on other sites work fine.

So ... what can cause this? Most of the forum posts I've read are prone to mod_security, but I don’t even know where to start, as I am not an Apache expert.

+3
source share
5 answers

Once you have root access, try to find what happens in the Apache logs. To fulfill the last request, you can use the tail.

What version of Apache are you using? In my Apache 2.2 configuration, you can monitor the error log in the terminal by calling:

tail -f /var/log/httpd/error_log

It looks like Apache 2.2 has a default error log in the default setting /usr/local/apache2/logs/error_log, so my configuration is not the default.

, , /usr/local/apache2/logs/access_log.

+4

, . , 644 NOT 666!

+3

Wordpress, , mod_rewrite index.php. 404, .

+2

.htaccess, WordPress. , wp-admin/ uploads, index.php WordPress ( , ..).

+1

PERMISSION (Timthumb.php):

  • PHP script "644".
  • "755"; "775", "777".
0

Source: https://habr.com/ru/post/1731276/


All Articles