Skip to content

unsubscribe.php giving 500 error on php 7.4.33

edited December 4 in GSA Website Contact
@Sven

https://docu.gsa-online.de/website_contact/unsubscribe_blacklist

Apache 2.4.37, php 7.4.33 different RHEL linux distros

i used unsubscribe.php on 2 different servers to test , both have working php websites and it is giving 500 error on both servers. Other sites are working fine.

i have changed ownership, permissions on file. Options in virtualhost but nothing seems to work

passed domain in argument http://www.mywebsite.com/unsubscribe.php?d=%domain%

but nothing registers in blacklist.txt

both unsubscribe, blacklist are in root folder

this is content of .htaccess file server 1

# BEGIN YOURLS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /yourls-loader.php [L]
</IfModule>
# END YOURLS


this is content of .htaccess file server 2

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


I know Just a minor tweak is needed somewhere , i can't point my finger at it at the moment






Comments

  • SvenSven www.GSA-Online.de
    Well, have a look in the log files. I can say that the script as such works fine for me.
  • edited December 5
    does your work on apache <2.4 or >2.4 ?


    can you show me .htaccess

    and

    virtualhost  lines inside tags

    issue is with one of above



    error logs register only this

    No matching DirectoryIndex (index.html,index.php,index.php) found, and server-generated directory index forbidden by Options directive
    [Thu Dec 05 15:01:36.567907 2024] [autoindex:error] [pid 1*****:tid ***



  • SvenSven www.GSA-Online.de
    This has nothing to do with the script I wrote!?
  • edited December 5
    Sven said:
    This has nothing to do with the script I wrote!?
    This error is for the single domain that has this file. Server error on only this file

    Anyone else having this issue or working for anyone ?



  • SvenSven www.GSA-Online.de
    just checked things and indeed there was an error in a previous code correction I did. It's fixed now. Please take the new version from the docu page.
    Thanked by 1ksatul
  • yes it is working now but the domain is not saved to the blacklist.txt


    this is in the GET

    /unsubscribe.php?d=%http://example.com%&amp;real=yes
  • SvenSven www.GSA-Online.de
    no wrong...%domain% is the macro. It is replaced with the domain. You need to leave out the %-signs.
Sign In or Register to comment.