添加到httpd.conf文件变量从工作停止阿帕奇 [英] Adding a variable to httpd.conf file stops Apache from working
问题描述
在我的努力来解决的OCI8错误,我已经带领相信这是一个不正确的设置环境变量的结果。
In my efforts to solve an OCI8 error, I've been led to believe it is the result of an improperly setup environment variable.
我试图做的:修正此Apache环境头痛,加入变量某个文件
What I'm trying to do: Fix this apache environment headache, by adding variables to a certain file.
我实际的问题是类似从另一个StackOverflow的用户。引用他的回答他的问题:
My actual problem is similar to this error from another StackOverflow user. To quote his answer to his problem:
问题解决了!
为了把变量Apache的环境部分,您只需要添加
他们在/ etc / sysconfig中/ Apache2的文件:
LD_LIBRARY_PATH = /路径/要/ ORACLE / lib目录下。
Problem solved! To put variables in Apache's Environment section you just have to add them in /etc/sysconfig/apache2 file: LD_LIBRARY_PATH=/path/to/oracle/lib.
值得注意的是,呼吁文件的修改解决方案的Apache2
。
Notably, the solution called for the modification of the file apache2
.
不过,我没有发现这样的Apache2文件我的系统上。
However, I found no such apache2 file on my system.
什么我迄今所做的:
我搜索过网,但我可以想出最接近的是 /etc/httpd/conf/httpd.conf中
文件。假设httpd.conf中的是的的Apache2,根据<一个href=\"http://forums.opensuse.org/english/get-technical-help-here/applications/393416-setting-apache2-environment-variables.html\"相对=nofollow>此线程,我应该变量添加到文件的末尾,它应该工作。
I searched over the net, but the closest I could come up with is /etc/httpd/conf/httpd.conf
file. Assuming the httpd.conf is apache2, according to this thread, I should add the variable to the end of the file, and it should work.
所以我添加导出LD_LIBRARY_PATH = / U01 /应用/ ORACLE /产品/ 11.2.0 / XE / lib目录
在文件的最后。
So I added export LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib
at the very end of the file.
和... Apache将无法再甚至开始。
And... apache won't even start anymore.
我的系统:
这是在Fedora 19的服务器与Oracle 11g中,PHP 5.5.4,2.4.6的Apache和PEAR 1.9.4。除了这个,我有OCI8插件PHP下载和激活,并下载MDB2和MDB2_Driver_oci8。
It's a Fedora 19 server, with Oracle 11g, PHP 5.5.4, Apache 2.4.6, and PEAR 1.9.4. In addition to this, I have the OCI8 plug-in for PHP downloaded and enabled, and have downloaded MDB2 and the MDB2_Driver_oci8.
Apache的自动启动,当我启动了我的系统,但如果由于某种原因,我需要停下来,重新启动或检查其状态,我用命令 systemctl启动httpd.service
,如果它意味着什么。
Apache starts automatically when I boot up my system, though if for some reason I need to stop, restart, or check its status, the command I use is systemctl start httpd.service
, if it means anything.
感谢。我一直在拉我的头发在这个问题上。
Thanks. I've been pulling my hair out on this problem.
推荐答案
有几件事情(希望答案是里面的地方)
A few things (hopefully an answer is somewhere inside)
首先,我不会这么做在Fedora。 Fedora是为红帽企业版/ CentOS的试验平台,并勤换。即使这仅仅是为你测试的目的,因此当你安装的CentOS 6 应该找到更好的支持。环境是几乎相同的,但CentOS是更好的支持,因为很多人用它来运行自己的服务器。
First off, I wouldn't do this on Fedora. Fedora is the testbed for RedHat Enterprise/CentOS and it changes frequently. Even if this is just for your testing purposes, you'll find better support if you install CentOS 6 instead. The environment is virtually identical, but CentOS is better supported because so many people use it to run their servers.
二,这听起来像你想运行OCI8连接器(有我插入的CentOS 6的一个原因)。 CentOS的有很多很好的回购像雷米。如果你安装CentOS 6,您可以使用他的库。因为这将节省您的头痛在路上了很多,这是非常重要的。一旦你已经安装了回购,你可以做到这一点。
Second, it sounds like you want to run the OCI8 connector (there's a reason I plugged CentOS 6). CentOS has many good repos like Remi. If you install CentOS 6 you can use his repository. This is important because this will save you a LOT of headaches down the road. Once you have his repo installed, you can do this
yum install php-oci8
和应该配置Apache来运行你的OCI8扩展。它就是这么简单。
And that should configure Apache to run your OCI8 extension. It's really that simple.
这篇关于添加到httpd.conf文件变量从工作停止阿帕奇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!