Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is the path relative to the drupal root? Might be nice to add to the field description text.
Need some changes for private:// and public://
Comments
Comment #1
lee20 CreditAttribution: lee20 commentedpath to which file? Please clarify your question :)
Comment #2
gg4 CreditAttribution: gg4 commentedSorry. Should have said "Path To Keyfile " in admin/settings/aes.
Comment #3
gg4 CreditAttribution: gg4 commentedComment #4
dpovshed CreditAttribution: dpovshed commentedYou may use both relative and absolute path. To use absolute you need it to be enabled in PHP settings.
In Drupal 7 you may even use constructions like private://... or public://...
Module assumed moderate Drupal/OS admin skills so it is obvious for most users.
Comment #5
2ndmile CreditAttribution: 2ndmile commentedThis is important to anyone using Pantheon or another cloud hosting solution. dpovshed, you should not assume the skill level of user installing this module as it is a recommended/required module for other modules such as Commerce UPS. Not criticizing, just FYI.
Comment #6
dpovshed CreditAttribution: dpovshed commentedThank you 2ndmile to pointing my attention to this, will keep this in mind!
Comment #7
ecj CreditAttribution: ecj commentedTo use private:// or public:// the following fixes are needed:
diff aes.admin.inc*
33c33
< if (file_exists(variable_get("aes_key_path", "")) && is_writable(drupal_realpath(variable_get("aes_key_path", ""))) == FALSE && variable_get("aes_key_storage_method", "Database") == "File") {
---
> if (file_exists(variable_get("aes_key_path", "")) && is_writable(variable_get("aes_key_path", "")) == FALSE && variable_get("aes_key_storage_method", "Database") == "File") {
182c182
< $fp = @fopen(drupal_realpath($form_state['values']['aes_key_path']), "a");
---
> $fp = @fopen($form_state['values']['aes_key_path'], "a");
and the .module:
diff aes.module*
344c344
< $key = file_get_contents(drupal_realpath(variable_get("aes_key_path", "")));
---
> $key = file_get_contents(variable_get("aes_key_path", ""));
376c376
< $fp = fopen(drupal_realpath(variable_get("aes_key_path", "")), "w");
---
> $fp = fopen(variable_get("aes_key_path", ""), "w");
378c378
< drupal_set_message(t("Couldn't write key to file '" . drupal_realpath(variable_get("aes_key_path", "")))."'", "error");
---
> drupal_set_message(t("Couldn't write key to file " . variable_get("aes_key_path", "")), "error");
397c397
< $result = unlink(drupal_realpath(variable_get("aes_key_path", "")));
---
> $result = unlink(variable_get("aes_key_path", ""));