Fedora 8 如何重建自定义 PHP?
我正在为我的工作组运行一个 wiki 服务器,最近将其移至 Fedora 8 操作系统。 一切都很好,除了我编写的联系 MsSql 服务器的扩展失败了,因为函数 mssql_connect 不存在。
在我的旧服务器上,我使用“Free TDS”(使用 ./configure --prefix=/usr/local/freetds --enable-msdblib)并使用以下命令构建 PHP:
./配置\
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql \
--with-mssql=/usr/local/freetds \
--启用安全模式 \
--启用 ftp \
--启用内联优化 \
--enable-magic-quotes --enable-xml \
--with-gd \
--with-zlib-dir=/usr/lib \
--with-jpeg-dir=/usr/local/lib
有没有办法可以在 Fedora 上使用“--with-mssql=/usr/local/freetds”配置轻松重建 PHP? 我想使用 yum 来做到这一点,但我不知道如何做。 更重要的是,我想避免从头开始构建一切。 并不是我不知道如何,我只是想避免它。
感谢您的建议,
~埃里克
I am running a wiki server for my group at work and recently moved it to a Fedora 8 OS. Everything works great except that an extension I wrote that contacts an MsSql server fails because the function mssql_connect is not there.
On my old server I used "Free TDS" (with ./configure --prefix=/usr/local/freetds --enable-msdblib) and built PHP with:
./configure \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql \
--with-mssql=/usr/local/freetds \
--enable-safe-mode \
--enable-ftp \
--enable-inline-optimization \
--enable-magic-quotes --enable-xml \
--with-gd \
--with-zlib-dir=/usr/lib \
--with-jpeg-dir=/usr/local/lib
Is there a way I can easily rebuild PHP with the "--with-mssql=/usr/local/freetds" configuration on Fedora? I would like to use yum to do this, but I don't see how. More to the point, I would like to avoid having to build everything from scratch. It's not that I don't know how, I would just like to avoid it.
Thanks for your your advice,
~Eric
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
请发布您的构建的输出。 失败是因为 /usr/local/freetds 丢失吗?
如果是的话,可以用yum安装吗,或者自己下载编译freetds。 我还没有这样做,但它会是这样的...
然后找到 freetds 的安装位置并将该文件夹传递给 PHP 的 ./configure 命令。
Please post output from your build. Is it failing because /usr/local/freetds is missing?
If it is, can you use yum to install it, or download and compile freetds yourself. I haven't done this but it'll be something like this...
Then find where freetds is installed and pass that folder to the ./configure command for PHP.
因此,添加 mssql 的答案就像“yum install php-mssql”一样简单。 解决了我的问题,没有任何混乱。 FreeTDS 的安装和配置都很容易。 感谢所有尝试回答或留下评论的人。
So, the answer to adding mssql is as easy as "yum install php-mssql". Fixed my problem without any messing around. FreeTDS is installed an easily configurable. Thanks everyone who tried to answer or left a comment.
获取 PHP 的 SQL Server 驱动程序,我不不要认为您必须重建 php 才能使用此驱动程序。 我建议您使用供应商的驱动程序。
Get SQL Server Driver for PHP, I don't think that you have to rebuild php to use this driver. I suggest you to use vendor's driver.