WordPress.org

Ready to get started?Download WordPress

Forums

Easy Watermark
[resolved] I got an error. Also screenshoots would be helpfull. (22 posts)

  1. 3x7
    Member
    Posted 1 year ago #

    I wanted to give it a try since I use other watermark plugin, therefore some screenshots would be helpful.

    While activating I got this, possibly cause by server conf.:
    Parse error: syntax error, unexpected T_STRING in /www/htdocs/v034115/wp-content/plugins/easy-watermark/index.php on line 11

    Is it possible to set position of watermark?

    Suggestion: different sizes of watermark on "original" and "thumbnail" images.

    Cheers!

    http://wordpress.org/extend/plugins/easy-watermark/

  2. szaleq
    Member
    Plugin Author

    Posted 1 year ago #

    Hello 3x7,

    This error is caused by the fact, that you are using PHP lower than 5.3. In plugin version 0.2 I used some code structures introduced in PHP 5.3 so older PHP versions simply don't understand the code. But I realised, that most virtual servers still have PHP 5.2 as a default version, so I'm going to give up all the benefits of PHP 5.3 and make it more compatibilile. Please try to install the next version which should appear tomorrow or the day after.

    About the screenshots: I have uploaded some images but they did not appeared on the plugin page. Now I'm trying to figure out, why this is so.

    It's possibile to set position of watermark. Please, see the FAQ section.

    Thanx for your suggestion, I will implement that. For now this plugin adds watermark only to fullsize images, but I'm creating it for my own and the current version doesn't satisfy me at all, so you can be pretty sure that it'll become a powerful tool after few upgrades.

    Regards,
    szaleq

  3. 3x7
    Member
    Posted 1 year ago #

    Thanks for quick support...

    I'm also looking for a solution to optimize the image from few MB to smaller size while uploading, so having this implemented as a feature in your plugin might be a great deal...

    Cheers!

  4. szaleq
    Member
    Plugin Author

    Posted 1 year ago #

    I think that this feature you mentioned would be really useful. And now I consider creating a separate plugin for image optimalisation (including auto-resizing and changing jpeg quality "in the fly"). If my plan comes to fruition I'll let you now.

    Regards,
    szaleq

  5. 3x7
    Member
    Posted 1 year ago #

    Yes this would be great, there are several plugins for resizing, optimizing etc, just like for watermarking... but having it all in one would be perfect solution to many users...

    Cheers!

  6. Regis B
    Member
    Posted 1 year ago #

    While activating the plugin, I got the same error error :
    Parse error: syntax error, unexpected T_STATIC in www/WordPress/wp-content/plugins/easy-watermark/lib/EWPlugin.php on line 47

    Following instructions given in a previous post, I switched PHP from version 5.2 to 5.3. Plugin is now active but I still have errors showing on top of admin page (3 times):
    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in www/WordPress/wp-content/plugins/easy-watermark/lib/EasyWatermarkSettings.php on line 84

    I also got this error on the settings page :
    Warning: extract() expects parameter 1 to be array, null given in www/WordPress/wp-content/plugins/easy-watermark/lib/EasyWatermarkSettings.php on line 256

    Any idea of what's going wrong ?

    Best regards

  7. szaleq
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Regis B,

    The first error is probably caused by some non-standard configuration on your server. Is it gone after switching php version?

    This error prevented registering activation hook which is a function called when activating plugin. In this function plugin default settings are entered into the database. It didn't happen and this is the reason of the next errors (settings are empty so it couldn't be merged or extracted). Please try to remove the plugin and install it again, then let me know if the first error has occurred. If so, I'll try to improve the code to make it working for you. But if not, it should already work correctly.

    Regards

  8. szaleq
    Member
    Plugin Author

    Posted 1 year ago #

    BTW, it isn't the same error. In original topic there was a problem with T_STRING, and you have some issue with T_STATIC :) The error from user 3x7 only occurred in the plugin version 0.2. This problem with compatibility was completely eliminated.

    However, if your php 5.3 has a standard configuration (unlike 5.2, that's possible), it should work.

  9. Regis B
    Member
    Posted 1 year ago #

    Hi,

    Thanks for your quick answer.

    The T_STATIC error occurs while trying to activate the plugin with php 5.2. The plugin can't be activated actually.

    After switching to php 5.3, plugin activation is ok. The T_STATIC error is gone. But the array_merge() warnings appear.

    I suppose my php configuration is standard. It's provided by my web hoster (OVH.net, very popular in France) and I haven't changed anything on it...

    Regis

  10. szaleq
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, but have you tried to remove and install the plugin after switching php version? I explained, that all this errors are caused by the fact, that plugin installation failed. You shouldn't get this errors after new installation, if te T_STATIC error didn't occurred.
    Otherwise, maybe there is some mess in the database after this invalid installation. If you can see the Easy Watermark Settings page, try to do some settings and save it, so your settings should override this mess and errors should disapear. (But first reinstall the plugin if you haven't already done so)

    Regards,
    szaleq

  11. Regis B
    Member
    Posted 1 year ago #

    Hi szaleq,

    Good news !

    So I've tried to remove and install the plugin with php 5.3 version. The warnings are still here.

    Then, saving some settings in the Easy Watermark Settings page actually solved the problem and everything works fine now.

    Thanks for your time.
    Great plugin !

    Best Regards,

    Regis

  12. leslieyeung
    Member
    Posted 1 year ago #

    Hi,
    I encounter the following errror when i activate the plugin. Can you shed me some lights?

    Parse error: syntax error, unexpected '}' in /var/www/html/wp-content/plugins/easy-watermark/lib/EasyWatermarkPlugin.php on line 536

  13. szaleq
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    I had the same error when I tried to run this plugin on windows (despite the fact that the code is valid). Does your server run windows? If not, some information about your PHP configuration would be helpful (can you send me the result of the phpinfo() function? If you don't know what it is, I can give you some instructions).

    I made the new version of this plugin today and by the way I changed few things around this line that caused your error so maybe it will work now. Please, try to install the latest version.

    Regards

  14. leslieyeung
    Member
    Posted 1 year ago #

    Hi szaleq,

    Many thanks for your response. I just tried an it prompt the same error but just different line number.

    <QUOTE>
    Plugin could not be activated because it triggered a fatal error.
    Parse error: syntax error, unexpected '}' in /var/www/html/appopa_test/wp-content/plugins/easy-watermark/lib/EasyWatermarkPlugin.php on line 537
    <UNQUOTE>

    I am running Linux in AWS. Here is the phpinfo
    http://ec2-54-235-200-226.compute-1.amazonaws.com/

    Grateful if you can give further advise. Many thanks! : )

  15. szaleq
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    I still have no idea why this error has occurred, it should work. I have not found anything in your phpinfo. But I probably know what causes this error, think I could make it work. The file with error has been updated, please try to download this plugin again.

    If anything does not work, please let me know. Your information helps me make this plugin more compatible and available for a larger number of users so I am grateful for that.

    Regards

  16. leslieyeung
    Member
    Posted 1 year ago #

    Hi szaleq,
    I am highly impressed by your attitude! : )
    Just tried again, unfortunately, it still run into the same errors with line number 539.
    I checked my apache error log, it showed a PHP Parse error. Hope this give you more hints.

    Fri May 03 04:14:46 2013] [error] [client 61.93.52.207] PHP Parse error: syntax error, unexpected '}' in /var/www/html/appopa_test/wp-content/plugins/easy-watermark/lib/EasyWatermarkPlugin.php on line 539, referer: http://ec2-54-235-200-226.compute-1.amazonaws.com/appopa_test/wp-admin/plugins.php?error=true&plugin=easy-watermark%2Findex.php&_error_nonce=43ea1f972a

    don't hesitate to let me know if you need any further information. I really like to use Easy Watermark plugin!

    Good Luck

  17. szaleq
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    I just uploaded the new version. Still have no idea why this error occurred, but I think it's finally fixed. Please install the latest version and let me know if it works.

    Regards

  18. leslieyeung
    Member
    Posted 1 year ago #

    Thanks for your continued effort. Still have the following error when i activate in WP. Also attach the apache log error log.

    Parse error: syntax error, unexpected $end in /var/www/html/appopa_test/wp-content/plugins/easy-watermark/lib/EasyWatermarkPlugin.php on line 709

    Apache log file.
    [Sun May 05 16:32:52 2013] [error] [client 61.93.52.207] PHP Parse error: syntax error, unexpected $end in /var/www/html/appopa_test/wp-content/plugins/easy-watermark/lib/EasyWatermarkPlugin.php on line 709, referer: http://ec2-54-235-200-226.compute-1.amazonaws.com/appopa_test/wp-admin/update.php?action=upgrade-plugin&plugin=easy-watermark%2Findex.php&_wpnonce=3deaea9b16
    [Sun May 05 16:32:56 2013] [error] [client 61.93.52.207] PHP Parse error: syntax error, unexpected $end in /var/www/html/appopa_test/wp-content/plugins/easy-watermark/lib/EasyWatermarkPlugin.php on line 709, referer: http://ec2-54-235-200-226.compute-1.amazonaws.com/appopa_test/wp-admin/plugins.php?error=true&plugin=easy-watermark%2Findex.php&_error_nonce=cff63acf36
    [Sun May 05 16:32:59 2013] [error] [client 61.93.52.207] PHP Parse error: syntax error, unexpected $end in /var/www/html/appopa_test/wp-content/plugins/easy-watermark/lib/EasyWatermarkPlugin.php on line 709, referer: http://ec2-54-235-200-226.compute-1.amazonaws.com/appopa_test/wp-admin/plugins.php?error=true&plugin=easy-watermark%2Findex.php&_error_nonce=cff63acf36

    Thanks

  19. szaleq
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, this is really strange... This error suggests that PHP has finished analyzing the file and some closing bracket or quote is missing... But in the code everything is in its place. I have tested this plugin on three different servers, people are using it and it works...
    Can you edit the file that causes this error? Please try to add an empty line and the following string: '?>' at the end of this file. Maybe this will help.

    BTW, please tell me, what kind of server are you using? Is it your own, dedicated or virtual one? Who is the provider?

    Regards
    szaleq

  20. leslieyeung
    Member
    Posted 1 year ago #

    I tried to add ?> at the end of the file and problem still persists with same errors. : (
    I am using Amazon Web Services (AWS) as provider. Have my own apache web server and php installed.
    If you think access to my wordpress would help, pls let me know your email.
    Again, thanks for your continued effort to troubleshoot. I really want to use Easy Watermark.

  21. Christian_Alles
    Member
    Posted 1 year ago #

    Hey there szaleq!
    Your plugin seems to be quite what I'm looking for, sadly it can't get it to work completely.
    I'm using wordpress 3.5.1, testing on MampPro, PHP 5.4.4,
    Whenever I try to watermark a fullsize Image(about 3500x2500) i get an Internal ServerError. When only watermarking smaller Images it works, though I think the JPG compression is a bit low, but maybe thats just me being picky. But an option to chose select the compression rate would be great.
    Well, I'm not sure if this is a problem with the configuration of my testing environment or if it is a problem within the plugin, but any help would be appreciated? Maybe somebody else encountered the same problem.
    Anyways great work as far as I can tell right now.

    Greetings
    Christian
    P.S.: Another great feature would be if one could store Presets to chose from when marking individual images...just an idea

  22. szaleq
    Member
    Plugin Author

    Posted 1 year ago #

    Hi everyone,

    @Christian_Alles please create a new topic, it'll be more clear and legible to other people.

    @leslieyeung, if you could give me an access to your wordpress, maybe I could find some solusion for you... Please write to my e-mail: wojtek( at )szalkiewicz( dot )pl.

    Regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.