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 3940824
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:27:59+00:00 2026-05-20T00:27:59+00:00

I have Linux Ubuntu 10.10 and when i run the below in a terminal:

  • 0

I have Linux Ubuntu 10.10 and when i run the below in a terminal:

php -i | grep php.ini

I got the loaded Configuration File => /etc/php5/cli/php.ini

While if I use phpinfo() in the browser it will be:

Loaded Configuration File /etc/php5/apache2/php.ini

Which means that there are different ini files according to php_sapi_name!!

now the question is how can i set the same php.ini for all user agents (browser, cli, etc) without copying the same file to different locations!?

  • 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-20T00:28:00+00:00Added an answer on May 20, 2026 at 12:28 am

    sometimes you can have more than one php.ini to manage different interfaces or websites
    for example you can have different php.ini for each website you host on your server by setting PHPINIDir in your virtualhost as below

    <VirtualHost 10.24.11.2:80>
    ServerName foo.com
    ServerAlias www.foo.com
    PHPINIDir /var/www/html/foo
    </VirtualHost>
    

    however, if you like to make only one php.ini for all interfaces, the only way is to use symlinks as below:
    ln -s /etc/php5/cli/php.ini /etc/php5/apache2/php.ini

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

Sidebar

Related Questions

I have written a server daemon (Linux, Ubuntu) which communicates with PHP as frontend
I have configured my Django app to run under Apache+FastCGI on Linux (Ubuntu, if
I have Ubuntu Linux. I found one command will let me download unread message
I have fresh installation of RabbitMQ on a linux/ubuntu server. Lets say the server
I have a following problem: I compiled my application on Linux Ubuntu 9.10 using
I have tried this both on Ubuntu Linux and on Windows. I can not
I have a server that is running Ubuntu Linux Server Edition. I once had
I have a (from what I can tell) perfectly working Linux setup (Ubuntu 8.04)
I have Eclipse SDK Version: 3.5.2 with EPIC 0.5.46 installed on Ubuntu Linux .
All, I have installed xampp for linux on ubuntu 9.10. The installation directory is

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.