简体   繁体   English

Ubuntu 14.04 + Lamp 1.2.4 mssql_connect无法正常工作

[英]Ubuntu 14.04 + Lamp 1.2.4 mssql_connect is not working

I'm strugling with a linux to install serwer for older php app. 我正在努力用Linux为较早的php应用程序安装服务。 I have instaled ubuntu 14.04 + lamp 1.2.4 and I have made everything working except old mssql functions. 我安装了ubuntu 14.04 + lamp 1.2.4,并使所有功能都可以运行,但旧的mssql功能除外。

Obvioulsy I uncomented, and restarted apache: Obvioulsy我没来,并重新启动了apache:

extension=php_mssql.dll

and So far I tried: 到目前为止,我尝试了:

apt-get install php5-sybase php-pear
pear install --nodeps MDB2_Driver_mssql

from https://www.turnkeylinux.org/forum/support/20090708/enabling-ms-sql-support-lamp-stack 来自https://www.turnkeylinux.org/forum/support/20090708/enabling-ms-sql-support-lamp-stack

in phpinfo I don't have mssql section at all. 在phpinfo中,我根本没有mssql部分。

here is a litle bit more about how I instaled linux: php not working on ubuntu desktop 16.04.02 这是关于我如何安装linux的一点点信息: php在ubuntu桌面16.04.02上不起作用

This is not really answer to this question, but my goal was to have a linux with php 5 and working mssql* functions. 这并不是这个问题的真正答案,但是我的目标是拥有一个带有php 5和可运行的mssql *函数的linux。 And this is how I finaly did it. 这就是我最终完成的方式。 It's quite easy once you know that under windows mssql was out in php 5.3.x but in linux it's not until php 7 . 一旦知道Windows mssql在php 5.3.x中已经存在,这很容易,但是在Linux中直到php 7才出现 (all my attempts to install a choosen version of php with stuff I need failed, and from what I see nobody has answears so linux is much more difficult to work with then I anticipated). (我尝试用我需要的东西安装选定版本的php的所有尝试都失败了,从我看到的人都没有反抗的角度出发,因此Linux的工作难度比我预期的要大得多)。

This I think is really nice tutorial for total beginer, hope it helps somebody: 我认为这对于初学者来说真的是非常不错的教程,希望对您有所帮助:

Ubuntu must be 14.04 and NOT above (they switched to php 7). Ubuntu必须为14.04或更高版本 (它们已切换到php 7)。

SOME BASIC STUFF: 一些基本的东西:

sudo apt-get install mc /*midnight commander is REALLY helpfull*/
sudo apt-get install konqueror /*or conqueror if you have deskptop*/
sudo nano file /*this is how you easily edit file in xterminal*/
sudo nano gedit file /*and in desptop*/

APACHE: APACHE:

sudo apt-get install apache2    /*install*/
sudo nano /etc/apache2/apache2.conf
add this line: ServerName 192.168.0.xxxx    /*your ip or server name*/
sudo apache2ctl configtest /*if sth is wrong*/
sudo service apache2 restart

PHP 的PHP

sudo apt-get install php5 /*php itself*/
sudo apt-get install libapache2-mod-php5 /*mod that connects php with apache I belive*/
sudo apt-get install php5-sybase php5-odbc freetds-common /*all libraries are required*/
sudo service apache2 restart

FAQ for php.ini (location of file is in phpinfo() ) php.ini的常见问题(文件的位置在phpinfo()中)

error_reporting = E_ALL & ~E_NOTICE /*will disable notices*/
display_errors = On
short_open_tag=On /* <? will work instad of <?php only */

How do I install modules? 如何安装模块?

sudo apt-get install mcrypt php5-mcrypt
sudo php5enmod mcrypt
sudo service apache2 restart

That made it work for me. 那使它对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM