Support » Plugin: Slider » Error–Register.txt

Viewing 15 replies - 1 through 15 (of 15 total)
  • Error Fixed, try to install again.=)

    Thread Starter Peter

    (@hardpeter4u)

    Hi,
    Sorry but errors still exist.

    Warning: filesize(): stat failed for http://127.0.0.1/wordpress3.8/wp-content/plugins/gallery-slider/register.txt in C:\xampp\htdocs\wordpress3.8\wp-content\plugins\gallery-slider\galleryslider.php on line 35
    
    Warning: fread(): Length parameter must be greater than 0 in C:\xampp\htdocs\wordpress3.8\wp-content\plugins\gallery-slider\galleryslider.php on line 35
    
    Warning: fopen(C:/xampp/htdocs/wp-content/plugins/gallery-slider/register.txt): failed to open stream: No such file or directory in C:\xampp\htdocs\wordpress3.8\wp-content\plugins\gallery-slider\galleryslider.php on line 42
    
    Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\wordpress3.8\wp-content\plugins\gallery-slider\galleryslider.php on line 43
    
    Warning: fclose() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\wordpress3.8\wp-content\plugins\gallery-slider\galleryslider.php on line 44

    ??????

    Peter

    Can you please download the latest version of wordpress, thanks.

    Thread Starter Peter

    (@hardpeter4u)

    Hi
    I have the latest version of wordpress installed (3.8.1) If you look to the right you will see that that is the version I stated when starting this.
    thanks

    have the same problem. it works on local machine (MAMP) but doesn’t work on the server and pulling the same errors

    @tonioexp

    I installed your plugin on one of my client’s website and it runs perfectly with no errors. However, on another client’s website I run into the same errors described by Peter above.

    The only difference between the two sites is that one is installed in the root directory and the other is installed in a subdirectory. In tracking the error I found your plugin is using $_SERVER[‘DOCUMENT_ROOT’] in your program gallery-slider.php when you are referring to the path for your register.txt file. The website I have installed in a subdirectory is the one showing the error because the subdirectory folder name is not in the document root.

    You need to be referencing the WordPress function plugins_url() in order to get the path to the plugins folder. That would insure your plugin works for websites installed off the document root.

    Lisa

    @tonioexp

    Scratch my reference to plugins_url(); … that function doesn’t get the server path but the url path. There should be a function that will get you the server path to the plugins folder, though.

    Lisa

    @tonioexp

    Please forgive all my posts but I just found that

    $pathtoplugin = plugin_dir_path(__FILE__ );

    will give you the path to your plugin folder. I added it to the gallery-slider.php on my one installation that was getting the error and replaced the path references with the variable and the plugin runs without errors … so far. Yay!

    Maybe you can go through your plugin and use the plugin_dir_path(__FILE__); code to get the server path to your plugin folder (it includes the trailing /) then those of us who have installed in subdirectories will be able to use your plugin! Which, by the way, works great!

    Lisa

    Removed.

    If you require assistance then, as per the Forum Welcome, please post your own topic.

    Thread Starter Peter

    (@hardpeter4u)

    @esmi Theme Diva & Forum Moderator

    What is your post supposed to mean? These posts and replies are all on topic. The plugin doesn’t work and throws errors. Don’t get why you’d say post your own topic????

    @peter: I agree that your posts and those of the plugin’s author are “on topic” but the 4 other people who decided to chime in with their issues need to post their own topics and stop hijacking yours.

    @esmi … Wow … didn’t consider myself hijacking the post. Was only trying to help. Please feel free to remove all my posts to this topic. I was able to correct the error with the suggestions I made (which I thought were very relevant to @peter’s post) but I guess you need to do it your way.

    Thread Starter Peter

    (@hardpeter4u)

    @tonioexp

    So what code did you change exactly? Was it this?
    $filename = $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins/gallery-slider/register.txt';

    to this?
    $pathtoplugin = plugin_dir_path(__FILE__ ) . '/wp-content/plugins/gallery-slider/register.txt';

    And every other place that $_SERVER['DOCUMENT_ROOT'] occurs and just replace that with $pathtoplugin = plugin_dir_path(__FILE__ );

    Thanks for your help. Your solution seems absolutely logical since my test site is in a subfolder like this: http://mysite.com/wp/

    Peter

    Thread Starter Peter

    (@hardpeter4u)

    @lisabeewd
    I meant the above post for YOU. Sorry I labeled it incorrectly.

    If you’re there, can you see if you can answer please.
    Thanks
    Peter

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Error–Register.txt’ is closed to new replies.