geodesicsolutions-community / geocore-community

GeoCore Community, open source classifieds and auctions software
MIT License
9 stars 6 forks source link

SEO addon #183

Closed b3d123 closed 1 year ago

b3d123 commented 1 year ago

First off, I want thank everyone who works on this. I had 3 paid licenses and wondered if it was ever going to be updated. So I just installed ver. 20.0 and seems to be working. I haven't tried much yet but when I attempted to use SEO addon I get error about mod_rewrite (see below) which is installed. I tested by manually adding redirects to .htaccess. I tried changing permissions but still can't get it to work. Thanks for any help, Bob

SEO Wizard Warning - Unable to proceed: This add-on requires your server to handle url re-write procedures.

vicos59 commented 1 year ago

Hi Bob,

https://github.com/geodesicsolutions-community/geocore-community/blob/f9df5733c1cad8460c3574807561559d49353de0/src/addons/SEO/admin.php#L276-L287

The code is checking to see if Apache's 'mod_rewrite' is installed on your server, according to the referenced code above.

Either you don't have it, or the line of code that does the check is in error.

apache_get_modules() is a PHP function:

https://www.php.net/manual/en/function.apache-get-modules.php

There is an example there that you could put into a PHP file to see which modules you have.

This might also be your problem:

apache_get_modules() is only available when the PHP is installed as a module and not as a CGI == It doesn't work with php-fpm.

IF true, This would also be the problem on my server. The quick-n-dirty solution is just probably to comment out the code (L282) that is checking, referenced above. Not sure how to resolve for FPM servers.

b3d123 commented 1 year ago

PHP is running as CGI. Commenting out that line worked. Thank you!