PHP Snippets – could not read directory
-
Hi – I am having major trouble activating the php sippets plugin for wordpress 3.3.1 I have created 2 seperate subdomains, one with lower rights, and one with admin rights. However when ever I try to set the directory, no matter of the location I always end up with the error ‘Could not read directory /httpdocs/wp-content/snippets’
Any help will be greatly received. Thanks
-
I have even set the directory to 777, which although I know is a security risk, but still cannot get it to accept it.
What server OS are you using? Windows incorrectly does lots of stuff, including reporting directory permissions. I don’t have access to a Windows server, so I haven’t tested this plugin on Windows — are you running Windows?
When you say you have installed a couple “subdomains”, does that mean that you are running WP Multi-site? That brings up a whole other slew of permissions trickiness.
Hi fireproofsocks – it is a unix/linux hosted environment using Plesk. I am sorry for confusion but I am not running WP Multi-site, I have an unlimited hosting account which means I can create as many domains/sub domains as I like.
Thanks for your response, and I appreciate any help that can be given.
Michael
Ah Plesk. My nemesis. I still suspect this is an environment issue somehow. Is one site running as one user and the directory belongs to another? What’s chown doing for you?
Hi – the latest site is running under the owner id of the site folder, and the newly created snippets folder. I don’t have command line access to my hosting environment, so unable to run a chown command however when I change permissions over ftp, even all the way to 777, there is still no difference. I have even left it a few days between trying to ensure that it was not a replication issue.
Thanks for your help so far
if you can send me credentials I can look at it, but I’m pretty slammed at the moment and short on paying gigs, so this stuff tends to get back-burnered.
Hi that would be brilliant. I have also created a new website, using cpanel this time and have the same problem (which I think lies between the chair and keyboard)
The ftp details are:
FTP host name wrapajack.site88.net
FTP user name a4506725
FTP password uos123
Folder to upload files public_htmlwebsite:
UID cet206
pw uos123this is a completely independent from our main sites so feel free to do what you need.
Many thanks
Michael
HOLY SH$!%!#T DUDE DON’T PASTE THAT IN HERE. Delete that post and change your password immediately!
Contact me at the contact info @ http://fireproofsocks.com/contact/
Ok, the problem is that you need to put in an ABSOLUTE path, not just a URL. Of COURSE putting in
/httpdocs/wp-content/snippetsas the directory will fail BECAUSE THAT DIRECTORY DOES NOT EXIST. Do you understand the fundamental nature of this? You can’t just slap in a relative URL: PHP REQUIRES a FULL PATH. Huge difference.So what you needed was to first CREATE the snippets directory inside of
wp-contentand then usegetcwd()or if you have command line access, do a pwd command. The full path to that folder is:/home/a4506725/public_html/wp-content/snippetsAnd once you enter that in correctly, hey, it works. I guess I should update the label on that because more than one person has run into this, but just remember that PHP will always require absolute file-system paths.
Hi Fireproof socks – thanks for your help. It is much appreciated.
The site that you have had access to was completely separate (and different uid and pw to main site) and will be getting deleted when this is over π
Thanks again,
Michael
Hi,
Rather than start a new thread, even though this topic has been marked “resolved”, I’d like to chime in and say that I’m having the same problem.
I know that I’m using the absolute path, but the plugin won’t recognize it. I’ve tried putting the snippets folder in the root, and still no luck.Thanks for any response.
Please post your own topic.
File a bug report if needed, but I can’t reproduce this. The confusion seems to come from people confusing relative and absolute paths and relative and absolute URLS. E.g. saying you adjusted it to “root” is highly unlikely — chances are slim that you have access to the root (“/”) directory on your server. Far more likely is that you are thinking of the DOCUMENT root (i.e. the root URL), which is usually something like /home/youruser/public_html
The topic ‘PHP Snippets – could not read directory’ is closed to new replies.