24. MediaLibrary 3.5.x Shop CAPTCHA

If you do not see a CAPTCHA image in the frontend (and all needed PHP extensions have been checked for the activation) the issue is related to an unwriteable session save path. Fix below.

Session variable in MediaLibrary Shop

MediaLibrary 3.5.x Shop uses a session variable to keep the typed review on screen if a user accidentally types the CAPTCHA wrong. So they don't loose everything they typed and can try again. Nobody wants receive complaints from their users.

To work CAPTCHA for Guest users (for submitting Media reviews), we need to make sure that the session save path is writeable, so the session variable for each user can be stored when he is working.

How to set the session save path and make it writeable

Options for setting "session save path" in your installation. These solutions were provided on forum.joomla.org by Dean Marshall. Preferred solution is to apply them in php.ini, but it can be apply in .htaccess too if you don't have access to the bowels of your OS installation.

Solution 1

Best solution is to make the needed change in your php.ini file.
If you have a dedicated server, you can set the variable in the php configuration (php.ini). Just uncomment (remove the ; ). In front of the line ;session.save_path = "/tmp" change to session.save_path = "/tmp".
If you don't have access to that file, the best solution is to ask your provider to make the session_save_path writable. If they won't or cannot do that for you, you can still try the options below.

REMARK:
You need to restart your Apache or other webserver for the changes to apply.

Solution 2

  • Create a subfolder called "sessions" in the same folder as the Joomla configuration.php file.
  • Find out the location of your Joomla folder by reading the $mosConfig_absolute_path entry from your configuration.php file.
  • Take the path from within the quotes on that line.
  • Put that value between the quotes on this line: session_save_path(''); and add a /sessions on the end of that entry - still inside the quotes.
    It should look something like this: session_save_path('/path/to/joomla/sessions'); but your real path will different of course. Put this line (with your path) with the other settings in configuration.php - on it's own line.

REMARK:
There is no such line ordinarily. You will need to create it - and remember that any time you change global config options it will be wiped - and you will have to recreate it.

Solution 3

Also you can solve the problem by adding a line to your .htaccess file (Apache only) that looks something like this: php_value_session.save_path /usr/local/www/Joomla/sessions.

Adapt the path according to your actual installation. An added advantage of changing the session path instead of using the default /tmp is to keep all your session data out of public.

After fixing the session save path and restarting your webserver, the CAPTCHA images will show as they should.

Media Review CAPTCHA for Guest Users

Media Review CAPTCHA for Guest Users



What are you looking for?
Anti-spam question: How many eyes has a typical person?