Problem with Mod_rewrite after upgrading to 1.5.6

Hi all,
I'm running 2 sites with zenphoto. The first update from 1.5.1 to 1.5.6 went smoothly without problems. With the 2nd site, I have 2 problems and I assume, one depends from the other:
1) During upgrade, I get an error with Mod_Rewrite check: red bar, white cross in it in red circle and text "Mod_rewrite". The problem persists after a "chmod 644 .htaccess" and even after "chmod 666 .htaccess".
2) When sending a mail in the contact form, the confirmation page does not appear. I assume, this is dependent from the mod_rewrite problem.

How can I solve the problem 1) and am I right with my assumption?

Help is warm welcome, kind regards and many thanks to all
imagepet

Comments

  • acrylian Administrator, Developer

    For unknown reasons the check in Setup sometimes fails on servers. Nothing actually changed in this area since 1.5.1 as far as I remember.

    So far no idea why it sometimes fails. All the check does it does is sending a cURL request (if you server supports it) or an JS Ajax request using a modrewrite URL (there is no other way to check if it works). It does not really have to do with the htaccess file itself.

    If you are certain that your server supports it, try enabling the option on the backend. If it works on the front end all is fine. If not your server does not support it, then contact your host (note that if you are not using Apache but Nginx you need to do a few server side things youself to support modrewrite). The backend is always without modrewrite so you cannot break anything by testing the option.

    When sending a mail in the contact form, the confirmation page does not appear. I assume, this is dependent from the mod_rewrite problem.

    You can try that with the option above. Also review debug/error logs for any hints please.

  • imagepet Member
    edited March 2020

    Hi acrylian,
    Thanks for your answer.
    Dependig to the modrewrite problem, in debug.log I found:

    {29323:Tue, 24 Mar 2020 16:00:09 GMT}
    HINWEIS: cURL-Abfrage war nicht erfolgreich.
    /home/zzz/www/xxx/zenphoto/zp-core/functions-common.php:431:
    array (size=26)
    'url' => string 'https://mysite/page/setup_set-mod_rewrite/?z=setup&returnmode' (length=71)
    'content_type' => string 'text/html; charset=UTF-8' (length=24)
    'http_code' => int 503
    'header_size' => int 412
    'request_size' => int 197
    'filetime' => int -1
    'ssl_verify_result' => int 0
    'redirect_count' => int 1
    'total_time' => float 0,022431
    'namelookup_time' => float 0,002431
    'connect_time' => float 0,002485
    'pretransfer_time' => float 0,018542
    'size_upload' => float 0
    'size_download' => float 0
    'speed_download' => float 0
    'speed_upload' => float 0
    'download_content_length' => float -1
    'upload_content_length' => float -1
    'starttransfer_time' => float 0,02235
    'redirect_time' => float 0,019791
    'redirect_url' => string '' (length=0)
    'primary_ip' => string '217.26.53.48' (length=12)
    'certinfo' =>
    array (size=0)
    empty
    'primary_port' => int 443
    'local_ip' => string '217.26.53.48' (length=12)
    'local_port' => int 13762

    Sorry for german, the site and the server is running german...

    Depending to the mail problem, in debug.log too I found:

    {29323:Tue, 24 Mar 2020 15:56:09 GMT}
    WARNING: file_get_contents() [function.file-get-contents.php]: SSL operation failed with code 1. OpenSSL Error messages:
    error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading in /home/xxx/www/yyy/zenphoto/zp-core/zp-extensions/reCaptcha.php in Zeile 119
    file_get_contents called from reCaptcha->checkCaptcha (reCaptcha.php [119])
    from printContactForm (contact_form.php [309])
    from eval (template-functions.php(4551) : eval()'d code [1])
    from printCodeblock (template-functions.php [4551])
    from include (pages.php [52])
    from include (index.php [130])
    from index.php [45]
    {29323:Tue, 24 Mar 2020 15:56:09 GMT}
    WARNING: file_get_contents() [function.file-get-contents.php]: SSL: No error: 0 in /home/zzz/www/xxx/zenphoto/zp-core/zp-extensions/reCaptcha.php in Zeile 119
    file_get_contents called from reCaptcha->checkCaptcha (reCaptcha.php [119])
    from printContactForm (contact_form.php [309])
    from eval (template-functions.php(4551) : eval()'d code [1])
    from printCodeblock (template-functions.php [4551])
    from include (pages.php [52])
    from include (index.php [130])
    from index.php [45]

    Does this helps?

    Kind regards, thanks and stay healthy
    imagepet

  • acrylian Administrator, Developer

    About the cURL I have no idea right now. cURL behaves strangely apparently on some servers (like the precaching using cURL via the cachemanager on some as well). (btw. in fact I am German ;-))

    Regading reCaptcha. Are you sure you provided the right credentials for it as that line number in question calls an URL from Google itself.
    If you used the old captcha before you need new tokens for this version of Captcha. We use the plugin on our own site with the contact form (also German host andn nothing special) and it is working without issue. We do get mails via it successfully.

  • About cURL / modrewrite: in my opinion, this is the minor problem, so we can stop guessing...

    reCaptcha: yes, the new tokens were applied in 1.5.1 and after the upgrade, I had to apply them again. Even if I disable the confirmation page, no mail is sent.
    If we do not find any solution, I have to rewrite the contact form without sending a mail by zenphoto and refer to mail adresses :-(

    Btw: I know, that you are German but the forum is for anybody.

  • acrylian Administrator, Developer

    if we do not find any solution, I have to rewrite the contact form without sending a mail by zenphoto and refer to mail adresses :-(

    So far I have no idea sadly since it generally works (for me). Since the error is from recaptcha does mail sending work without it?

  • Sorry for the delay, I had to care about my household...

    What I did:

    • Turn off reCaptcha -> the problem persists, no message in the debug.log
    • Compare of reCaptcha.php and contact_form.php between the Download from zenphoto.org, the site on wich all is fine and the site on wich it does not work. No differences :-(

    There is only one solution for me: turn off the contact form and mention the mail adress on the contact site.

    Anyway, thanks for your support. Hope it will work with the next release.

  • acrylian Administrator, Developer

    Anyway, thanks for your support. Hope it will work with the next release.

    Well, I need to be able to reproduce a problem. Since it works on our site I can't work on anything.

    Are you sure that mailing in general works on your server? On some it is not enable. Also what mail plugin are you using? There are two, sendmail and phpmailer, and without them mailing will not work no matter of the server.

  • Thanks for the hint. Unfortunately, the zenphoto_sendmail plugin is activated and under V1.5.1 mailing worked well with this plugin.

  • acrylian Administrator, Developer

    I am really not aware of any changes since 1.5.1 that could cause any problems here and scanning our release posts since then lists no related changes. I can only assume some server sides issue unless you find any other actual error (the above is recaptcha only).

  • vincent3569 Member, Translator

    hi,

    i have the same issue with setup of 1.5.6.
    During upgrade, I get an error with Mod_Rewrite check (red bar, white cross in it in red circle and text "Mod_rewrite").

    in fact, this issue appears only if site is closed.
    if site if opened (or in test mode) during setup, I don't have the issue.

    something goes wrong in the setup process...

  • acrylian Administrator, Developer

    Not really, if the site is closed the test URL is simply not reachable so the check fails as all request are caught.

Sign In or Register to comment.