duanbinian2243 2013-03-06 09:34
浏览 149

PHP安装 - 无法运行任何功能,甚至phpinfo()

SHORT STORY

PHP seems to work, simple "hello world" inside PHP brackets works.
However, other functions fail.
Even 'phpinfo()' fails with Fatal error: Call to undefined function phpinfo() in ...

LONG STORY

I'm trying to compile and install PHP manually, on a machine that I don't have root access to. I've been following this script: https://github.com/minghuascode/UserLAMP
I had to make some tweaks to it, but Apache Server seems to run successfully and serves simple HTML files.

PHP had many problems in compilation, some warnings regarding gawk, and errors in PHAR and PEAR. I've tried several versions: 5.2.17, 5.3.22, 5.4.12 and finally php5.3-201303060830

The only way that compile finishes without errors is with these flags:

  ./configure --prefix=$(SERVERS)/$(DSTPHPDIR) \
      --with-mysql=$(SERVERS)/$(DSTMYSQLDIR) \
      --with-pdo-mysql=$(SERVERS)/$(DSTMYSQLDIR) \
      --with-apxs2=$(SERVERS)/$(DSTAPACHEDIR)/bin/apxs \
      --disable-phar   \
      --without-pear   \

However, it fails even to execute phpinfo()

Please advice.
Thanks :)

EDIT

When I tried to run php -i I've found that there is already an old version PHP in my system, installed by the administrators. Maybe that's causing a conflict?

$ php -ver
PHP 4.3.8 (cli) (built: Aug  9 2004 14:33:18)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

$ ./php -ver
PHP 5.3.24-dev (cli) (built: Mar  6 2013 10:50:33)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies

2nd EDIT

This might be helpful:

$ ./php -m
[PHP Modules]
Core

[Zend Modules]

$ ./php --rf phpinfo
Segmentation fault
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测