Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to have a newline character in an environment variable. I've tried

SetEnv DI_collection_clients_list "client1
client2"

which results in

Invalid command 'client2"', perhaps misspelled or defined by a module not included in the server configuration

when restarting Apache.

I've also tried

SetEnv DI_collection_clients_list "client1\nclient2"

which results in the variable of course having a \n instead of a newline.

share|improve this question
add comment

1 Answer

The setenv directive is part of mod_env.c which uses the apr function apr_table_setn to store the environment variables in a table. If you look at the source code you'll see that the table just stores the data that is passed to it without any character expansion.

Whatever it is you're trying to do, trying to do it this way is almost certainly wrong.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.