Skip to content
This repository was archived by the owner on Jun 11, 2019. It is now read-only.
This repository was archived by the owner on Jun 11, 2019. It is now read-only.

Multiple ini declarations #71

Open

Description

@meecect

what syntax do I use if I want to set more than one ini setting? For example, I want this:

upload_max_filesize = 200M
memory_limit=512M

Originally, I had this defined:

php::ini { "memory_limit":
value => 'memory_limit=512M'
}

which set the memory limit, but maybe I was doing it wrong. When I tried this:

php::ini { "memory_limit":
value => 'memory_limit=512M'
}

php::ini { "upload_max_filesize":
value => 'upload_max_filesize = 200M'
}

I get a duplicate declaration error, which makes sense, I guess. I'm just too new to puppet syntax to figure this out, but it's probably something simple. Any help?

Activity

  1. alvagante commented on Oct 4, 2014

    @alvagante
    Member

    I hink you should use a syntax like:
    php::ini { "memory_limit":
    value => '512M'
    }

    and be sure you have an unique title (here 'memory_limit') for each php::ini resource

  2. meecect commented on Oct 15, 2014

    @meecect
    Author

    I had tried that first. In that case all I get in the ini file is '512M'. I currently have this:

    php::ini { "ini_settings":
    value => '
    memory_limit=512M
    upload_max_filesize = 200M'
    }

    and that works, but it seems clunky. I agree it probably should work as you proposed, but it doesn't seem to.

  3. alvagante commented on Oct 16, 2014

    @alvagante
    Member

    Uhm, sorry, I didn't look well at the define.
    It's intended to create single .ini files, not to manage lines inside the php.ini file:

    """
    With this you can alter/add a php ini file for a specific sapi target
    or for both cli and apache2 (default for Ubuntu|Debian|Mint|SLES|OpenSuSE)
    """

  4. catalinpan commented on Feb 23, 2015

    @catalinpan

    Why not use augeas?

                php::augeas {
                        'php-memorylimit':
                                        entry  => 'PHP/memory_limit',
                                        value  => 512M,
                        'php-date_timezone':
                                        entry  => 'Date/date.timezone',
                                        value  => 'Europe/London',
                        }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions