doumo6356 2014-04-02 20:52
浏览 72
已采纳

PHP命令行版本与apache不同

PHP command line on my OS X has the built in Mavericks version: 5.4.24

I have compiled and configured my own php to work with apache, which is version: 5.5.9

The command line version is sitting in /usr/bin and I can rename it to stop it working but don't have a clue where or how to get my compiled (5.5.9) version working through the command line

The 5.5 version has a libphp5.so file that sits under /usr/libexec/apache2

Guys this is a compiled version on a MAC so I did not install it with yum or apt-get or homebrew or ports.

To be clear I am trying to work out how to run the 5.5.9 version from the command line.

Adding COMPOSER-PHP tag as I want to use composer on this Mavericks build which does not support mcrypt without my lovely compiled php, which I can't find!!!!

Here is the configure info:

'./configure' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/private/etc' '--with-apxs2=/usr/sbin/apxs' '--enable-cli' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/Library/Server/Web/Config/php' '--with-libxml-dir=/usr' '--with-openssl=/usr' '--with-kerberos=/usr' '--with-zlib=/usr' '--enable-bcmath' '--with-bz2=/usr' '--enable-calendar' '--disable-cgi' '--with-curl=/usr' '--enable-dba' '--enable-exif' '--enable-fpm' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/BinaryCache/apache_mod_php/apache_mod_php-87~65/Root/usr/local' '--with-png-dir=/BinaryCache/apache_mod_php/apache_mod_php-87~65/Root/usr/local' '--enable-gd-native-ttf' '--with-icu-dir=/usr' '--with-ldap=/usr' '--with-ldap-sasl=/usr' '--with-libedit=/usr' '--enable-mbstring' '--enable-mbregex' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--without-pear' '--with-pdo-mysql=mysqlnd' '--with-mysql-sock=/var/mysql/mysql.sock' '--with-readline=/usr' '--enable-shmop' '--with-snmp=/usr' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--with-tidy' '--enable-wddx' '--with-xmlrpc' '--with-iconv-dir=/usr' '--with-xsl=/usr' '--enable-zip' '--with-pcre-regex' '--with-mcrypt' '--with-freetype-dir=/usr/X11R6' '--enable-builtin-freetype'

The Mavericks (5.4.24) version is here:

/usr/bin/php -v

Where is my (5.5.9) version??

.so files:

/Users/lisa/src/php-5.5.9/libs/libphp5.so  
/usr/libexec/apache2/libphp5.so  
  • 写回答

1条回答 默认 最新

  • dongxuan2577 2014-04-25 11:14
    关注

    If you compiled it yourself, give us the command you used for that. From there, we can give you some idea as to where it is.

    Alternatively, from a command prompt, type

    find / -type f -iname '*php*' -print
    

    which will find every file with PHP in the name.

    If you're only looking for the libphp5.so file then use

    find / -type f -iname 'libphp5.so' -print
    

    It's probably best to run this with higher privileges than normal (sudo it)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵