Support » Plugin: PHP Snippets » [Plugin: PHP Snippets] Can't figure out "full path" requirement

  • I have followed the installation instructions to the letter, which say:

    1. Upload the php-snippets directory to the /wp-content/plugins/ directory
    2. Activate the plugin through the ‘Plugins’ menu in WordPress
    3. Create a new post or page
    4. Notice the new <?php button in the TinyMCE toolbar — click it to get a list of available PHP Snippets, then select the one you want to insert it into your post.
    5. Optionally, configure your custom snippet directory under the Settings –> PHP Snippets directory and put in the /full/path/to/your/directory

    I have activated the plugin in the Network Dashboard, and thus am able to see “PHP Snippets” as an option on my subsites’ Settings modules.

    However, “PHP Snippets” does not appear on the list in the subsites’ Plugins modules. (And there is no new button in my TinyMCE toolbar as promised at step 3.) So I assume that’s because I must first enter a “Snippet Directory” on the Settings page. But that requires a “full path”–a physical directory, not a url.

    So I’ve tried all the variations I could think of:
    /wp-content/plugins/php-snippets/chunker (the directory I created for my own snippets)
    /wp-content/plugins/php-snippets/snippets (the directory that comes with the plugin)
    /home/wp-content/plugins/php-snippets/snippets
    /home/mysite.com/wp-content/plugins/php-snippets/snippets
    /mysite.com/wp-content/plugins/php-snippets/snippets
    /username/mysite.com/wp-content/plugins/php-snippets/snippets
    /home/username/mysite.com/wp-content/plugins/php-snippets/snippets
    /plugins/php-snippets/snippets
    /php-snippets/snippets
    I even tried: http://mysite.com/wp-content/plugins/php-snippets/snippets

    But all of these yield the message: “Could not read directory: …” I’m logged in and all other aspects of the site are accessible to me, and the CHMOD for all folders involved is 755 like most others on the site, so it should not be a permissions issue.

    I’m sure I’m overlooking something very basic here. Can someone please tell me what “full path” I should use for this?

    http://wordpress.org/extend/plugins/php-snippets/

Viewing 1 replies (of 1 total)
  • You say “sub-sites” — so are you on a multi-site install? I haven’t tested this on WP multi-site.

    You should see a new TinyMCE button — so if you aren’t seeing that my first guess would be you have a conflicting plugin (or some conflict with the WP multi-site stuff).

    As for your full path: this is a PATH, not a URL. This is what a “pwd” will cough up if you are on a Unix shell, or whatever Windows’ copy of it is. On a shared host, it’s often something like:

    /home/myuser/public_html/path/to/your/dir

    It’s all a matter of where you want to put YOUR directory. You don’t need to map the directory back to the built-in directory — that’s pointless. Do you understand the whole purpose of this configurable directory? This is a directory you control where you put your snippets, somewhere outside of the WP plugins directory because WP’s directories can get overwritten when you update the plugin and that would potentially erase all your php scripts.

    If you want to hit me up with an FTP login and an Admin username/password, you can send them to me @ http://fireproofsocks.com/contact/ and then I could verify whether you’ve got conflicts in your environment.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: PHP Snippets] Can't figure out "full path" requirement’ is closed to new replies.