Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6983977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:29:25+00:00 2026-05-27T18:29:25+00:00

Is it possible to set php.ini values from within PHP? Optimally with a limited

  • 0

Is it possible to set php.ini values from within PHP? Optimally with a limited scope?

Background: I want to force-allow short_open_tag for the duration of an include command to facilitate content writers’ jobs. The actual PHP web application uses long tags throughout (well, one at the beginning and one at the end, really) but for the content files I’d like to enable the more convenient shortcuts.

The content files are then rendered by a combination of output buffering and require, and the result of this is used to fill out a view-specific template. (I know about template engines such as Smarty but I don’t want to use them here.)

The php.ini documentation unfortunately doesn’t tell how to query/set the configuration values.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:29:26+00:00Added an answer on May 27, 2026 at 6:29 pm

    Would ini_set do the job ?

    string ini_set ( string $varname , string $newvalue )
    

    There’s also ini_get for querying the configuration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to set a cookie for http://www.example.com from a PHP file located
In an interpreted language like PHP it is possible in theory to set up
Is it possible to have just a single php.ini file, for example in the
I am trying to set open_basedir in php.ini globally to /tmp/ so that I
I am templatizing my php.ini using PHP. I have a script to set up
Possible Duplicate: Using a javascript variable to set PHP variable I need to do
It´s possible to set session timeout by user in php? Example: 2 users are
in php.ini and nginx configurations, there are limits that can be set which restrict
Using the PHP mail() function is it possible to set a fully-qualified hostname for
I'm developing an app in php and want to see how is set the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.