Windows系统服务只在机器重启后接受环境变量变化

在一台windows机器上装apache+php
重启动机器有限制,所以安装过程中改了环境变量PATH(加上php的路径)。
没有重启。

结果启动后,没办法加载扩展库。
查了半天怎么让 系统刷新环境变量。
但是对于apache来说,还是不能接收到新的环境变量

看到一个英文帖子:
[url]http://serverfault.com/questions/8855/how-do-you-add-a-windows-environment-variable-without-rebooting[/url]

"This problems affects ALL SERVICES, even a restarted service will not see new environment variables. "

"A possible solution for services is to run them temporarily as another user (other than LocalSystem, LocalService, NetworkService). For example for Apache service this works without any problems. To change service account open services.msc console, select service, click service properties and on second tab enter logon credentials for a user. Restart the service and it's environment variables should be up to date."

才知道 环境变量改变,对于以LocalSystem账户运行的windows服务器不起作用。

Microsoft网站上对此问题的描述:
[url]http://support.microsoft.com/kb/821761/en-us[/url]

最后,还是重启吧。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值