Solved

Easy question... /etc/php.ini versus /usr/local/zend/etc/php.ini and include_path

Posted on 2014-03-03
5
638 Views
Last Modified: 2014-03-12

WHICH FILE?

Which php.ini should be the authority in CentOS 6 with Zend Server CE installed? Is one for browser and one for CLI? Can I just symlink one to the other so I can maintain one file?

1. Default

/etc/php.ini

2. Zend

/usr/local/zend/etc/php.ini

WHAT INCLUDE PATHS?

There are two different include paths... how do I merge them when it appears there are two separate pear paths? Can I include both pear paths or is one the correct one?

1. Default

include_path = ".:/usr/share/pear"

2. Zend

include_path=".:/usr/local/zend/var/libraries/Zend_Framework_1/default/library:/usr/local/zend/share/pear"
0
Comment
Question by:matt1237
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
ID: 39901429
You probably should not try to combine them.  It is not unusual for there to be more than one 'php.ini' file.  And yes, the first reason is one for the web server and one for the command line.  In 'php.ini' for the command line, you do not want to reference features that are only available thru the web server.

I seem to have at least two copies of 'php.ini' on all my systems.
0
 
LVL 2

Author Comment

by:matt1237
ID: 39901499
So to be clear, are these statements true?

/etc/php.ini is for command line
Do NOT merge the two include_path strings as they are used for two purposes
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39901612
Yes, I believe so.  'httpd.conf' or 'apache2.conf' will show which one is being loaded for the web server.  I have never installed Zend but for other reasons I have two separate 'php.ini' files on most of my machines.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39901649
I booted up my Ubuntu Linux system and checked it.  It installs with separate 'php.ini' files in different directories.  I also found out that my 'cli' version never got updated when I upgraded the machine!  Shows a bunch of errors!
0
 
LVL 13

Accepted Solution

by:
Sandy earned 250 total points
ID: 39902564
Q.  /etc/php.ini is for command line ?

A. not exactly but yes default php parameters  are being read from this file.


Q.  Do NOT merge the two include_path strings as they are used for two purposes

A. Yes, Zend include_path does work specific with zend framework calls

TY/SA
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
RHEL6 + dockers - No route to host 7 97
MySQL - Adding an incremented value to a duplicate string 30 50
history of pages 7 50
Code planning methods/tools? 5 55
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question