I then wanted to see if I had some windows-specific misbehavior by doing the "same" xampp 5.6.28-1 setup on my linux laptop (Ubuntu 16.04 LTS) where I'm much more comfortable. I followed the SAME steps, with 2 slight additions.
(1) I had to uncomment the inclusion of httpd-vhosts.conf in httpd.conf to set my new subdomain. I have done NO other customization to the default xampp installation.
(2) Because we have to be careful with permissions, I needed to carefully set permission. I used the same script that I use on my linux site, where everything is working just fine. Details of fix-wordpress-permission.sh are at https://gist.github.com/Adirael/3383404.
When I go to http://sdbikecoalition.localhost (my subdomain) in chrome, I get
- Code: Select all
[b]Warning[/b]: require_once(/opt/vhost/sdbikecoalition/wp-config.php): failed to open stream: Permission denied in /opt/vhost/sdbikecoalition/wp-load.php on line 37
[b]Fatal error[/b]: require_once(): Failed opening required '/opt/vhost/sdbikecoalition/wp-config.php' (include_path='.:/opt/lampp/lib/php') in /opt/vhost/sdbikecoalition/wp-load.php on line 37
Note that changing permissions on that file have no effect on the issue. In fact, if the permissions on wp-config.php are too wild (like 775 or 777) it just throws me to http://localhost/dashboard, the XAMPP welcome page. So, I figure it's an owner:group issue. I first encountered it for me:mygroup. I then changed it to www-data:www-data as in the origifinal fix-wordpress-permissions.sh (and also added MYSELF to the www-data group). That didn't work. I then set it to daemon:daemon which is the user:group set in my httpd.conf. I even tried root:root
I then searched this forum and found a situation that I thought "might" be similar to mine, solved and locked Dec 2011
https://community.apachefriends.org/f/viewtopic.php?f=17&t=49184&p=189640&hilit=wordpress+permission#p189640
I tried usr:pwd = root:nobody as recommended there and still get the same fatal error.
I haven't done anything exotic and I'm quite familiar with dealing with ownership, groups and permission on linux, so I'm not sure what is going on.
Any help would be welcome
For reference, these are my lines in httpd-vhosts.conf
- Code: Select all
# This is where we place all the files, as subdirectories for local websites
<Directory /opt/vhost>
AllowOverride All
Require all granted
</Directory>
#this is the default address of XAMPP
<VirtualHost *:80>
DocumentRoot "/opt/lampp/htdocs"
ServerName localhost
</VirtualHost>
# test site for sdbikecoalition.org
<VirtualHost *:80>
DocumentRoot "/opt/vhost/sdbikecoalition"
ServerName sdbikecoalition.localhost
</VirtualHost>