Or possibly PHP because I'm not entirely sure where the problem lies.... Hi Guys I'm having ridiculous difficulty in tracking down a problem I have with my wordpress installation. Wordpress is at the latest level (7.1.5) php is at 8.4.27 (patched since the php2shell problem) I'm running lighttpd 1.4.79 (ssl) on Debian 13.7 and mysql is 11.8.6-MariaDB For background I have been running wordpress for nearly 20 years on a similar setup (but of course earlier versions of everything in that stack) so I'm not entirely unaware of how to fix problems, But I'm baffled as to what is happening now. Scenario - I upgraded debian (and thus all installed packages including lighttpd, php, mysql (mariadb) etc in about July of this year. After upgrade I checked my wordpress installation (my blog) and all worked fine. I checked that I could still log in as admin but since I had nothing to add to the blog at that time I didn't try any editing. In fact I hadn't added anything to the blog since January (my bad, but I've had nothing much to say). This week I tried to add a new post and hit a major problem. I could not upload any media files. Wordpress threw the error "The uploaded file could not be moved to wp-content/uploads". Now this is almost always caused by a permissions problem (the web server needs write access to the "wp-content/uploads" directory in the web's document root. So I checked the perms - all safe and sane as they have always been. Wordpress likes directory mode 755 and files 644 with the "uploads" directory owned by the web server. Everything else is owned by root. On checking the wordpress admin tools/site-info I noted that neither the wp-content directory, nor its subdirectory "uploads" are writable by the server. So I checked the web server and php ownership was correct and sure enough both lightppd and php were running as www-data (and the directories in question are owned by www-data) so why can't it write to them? I have turned on WP-DEBUG, installed a variety of php debugging plugins, I have checked phpinfo() and come up baffled. Some of the php debugging plugins are themselves a little brain dead in my view because they try to write their logs to the web space (in either the docroot, the wp-admin or wp-content directories - NO!!!, who in their right mind would write sensitive log info to a space readable by the web? But the fact that they failed to write these logs merely confirms the problem - WP cannot write to directories I WANT it to write to. I have been tearing my hair out for the past four days and am getting nowhere. Any ideas chaps? Have I missed something blindingly obvious? Oh and in desperation I have also tried setting the directories in question to mode 777 with no joy. (Now changed back of course). TIA Mick
participants (1)
-
mick