免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 19357 | 回复: 15
打印 上一主题 下一主题

Linux命令行运行php文件 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-05-16 14:45 |只看该作者 |倒序浏览
本帖最后由 leej09 于 2011-05-16 14:57 编辑

如题

在安装目录php/bin/下的没有php可执行文件 只有php-config 和 phpize 这两个文件

源码编译安装的php

论坛徽章:
0
2 [报告]
发表于 2011-05-16 15:06 |只看该作者
能把你的configure的参数发出来看看不
你怎么configure的

论坛徽章:
0
3 [报告]
发表于 2011-05-16 15:15 |只看该作者
本帖最后由 leej09 于 2011-05-16 15:57 编辑

回复 2# 1jjk


    ./configure --prefix=/lamp/php --with-apxs2=/lamp/apache/bin/apxs --with-config-file-path=/lamp/php --enable-safe-mode --with-libxml-dir=/usr/lib --enable-mbstring --with-mysql=/lamp/mysql --with-mysql-sock=/lamp/mysql/tmp --with-mysqli=/lamp/mysql/bin/mysql_config --with-pdo-mysql=/lamp/mysql --enable-soap --enable-sockets --with-curl=/usr --with-xsl=/usr/lib  --with-zlib --with-zlib-dir=/usr --with-libexpat-dir=/user/lib --enable-short-tags --enable-static --with-gd=/usr --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-freetype-dir=/usr/include/freetype2 --enable-sysvshm --enable-sysvsem --with-pdflib-dir=/usr/local/lib --with-t1lib=/usr/local/t1lib --with-gettext=/usr/bin/ --enable-calendar --enable-ftp --enable-inline-optimization --disable-cgi --disable-cli --with-openssl=/usr --with-openssl-dir=/usr


求解

论坛徽章:
0
4 [报告]
发表于 2011-05-16 16:23 |只看该作者
  1. export PATH=/lamp/php:$PATH
复制代码
然后php -v就可以了

论坛徽章:
0
5 [报告]
发表于 2011-05-16 17:00 |只看该作者
回复 4# 1jjk


   
然后php -v就可以了
1jjk 发表于 2011-05-16 16:23


    我执行php -v  打印出:
        Configuring for:
        PHP Api Version:         20090626
        Zend Module Api No:      20090626
        Zend Extension Api No:   220090626

    当我执行 php /lamp/www/echo.php (echo.php中不存在语法问题) 提示如下
        Cannot find config.m4.
        Make sure that you run '/usr/bin/php' in the top level source directory of the module

是不是我的命令执行错误 还是什么问题?

论坛徽章:
0
6 [报告]
发表于 2011-05-16 17:08 |只看该作者
还是 --prefix=/usr/试试呢?

论坛徽章:
0
7 [报告]
发表于 2011-05-16 17:18 |只看该作者
回复 6# 1jjk


    兄台,实在不是很懂,叫我QQ详聊行吗  564968425  注意加个备注呀 呵呵

论坛徽章:
0
8 [报告]
发表于 2011-05-16 17:24 |只看该作者
./configure --prefix=/usr --with-apxs2=/lamp/apache/bin/apxs --with-config-file-path=/lamp/php --enable-safe-mode --with-libxml-dir=/usr/lib --enable-mbstring --with-mysql=/lamp/mysql --with-mysql-sock=/lamp/mysql/tmp --with-mysqli=/lamp/mysql/bin/mysql_config --with-pdo-mysql=/lamp/mysql --enable-soap --enable-sockets --with-curl=/usr --with-xsl=/usr/lib  --with-zlib --with-zlib-dir=/usr --with-libexpat-dir=/user/lib --enable-short-tags --enable-static --with-gd=/usr --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-freetype-dir=/usr/include/freetype2 --enable-sysvshm --enable-sysvsem --with-pdflib-dir=/usr/local/lib --with-t1lib=/usr/local/t1lib --with-gettext=/usr/bin/ --enable-calendar --enable-ftp --enable-inline-optimization --disable-cgi --disable-cli --with-openssl=/usr --with-openssl-dir=/usr

论坛徽章:
0
9 [报告]
发表于 2011-05-16 17:32 |只看该作者
回复 8# 1jjk


    哦,你指的是重新编译。  我的php /lamp/www/echo.php 没有问题吧

论坛徽章:
0
10 [报告]
发表于 2011-05-17 11:40 |只看该作者
删除 原来的p'h'p
重新编译
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP