I am still new to php and linux but i try to give you all information I know. We got a PHP web application using pear and smarty. It's runing on PHP 4 on a Linux system and with XAMP and PHP5 on my PC. I am trying to move the application on a new server with PHP7 and updated PEAR and all extensions (it's the same version as on XAMP), but all I get is: DB Error: extension not found. I tried to find a solution but wasn't able to find anything which could help me. The database we are using is a normal mysql database. I'm not sure if there is still a path missing or what went wrong.
我还是php和linux的新手但是我试着给你我所知道的所有信息。我们使用pear和smarty获得了一个PHP Web应用程序。它在Linux系统上运行PHP 4,在我的PC上运行XAMP和PHP5。我试图在PHP7的新服务器上移动应用程序并更新PEAR和所有扩展(它与XAMP上的版本相同),但我得到的是:DB错误:找不到扩展名。我试图找到一个解决方案,但无法找到任何可以帮助我的东西。我们使用的数据库是一个普通的mysql数据库。我不确定是否还有路径丢失或出了什么问题。
Maybe someone of you got a clue what the problem could be.
也许你有人知道问题可能是什么。
1 个解决方案
#1
1
It sounds like your very old PHP4 code is using the mysql_
database extension?
听起来你的旧PHP4代码使用mysql_数据库扩展?
If so that extension has been deprecated for years and was completely removed from PHP7. You wont be able to move that code to any version of PHP higher than PHP5.6 and even trying to do that you will almost definitely come across lots of other incompatibilities
如果是这样,扩展已被弃用多年并完全从PHP7中删除。您将无法将该代码移动到高于PHP5.6的任何PHP版本,甚至尝试这样做几乎肯定会遇到许多其他不兼容性
I suggest you read http://php.net/manual/en/migration70.php in the menu on this page there is a section on migrating from all sorts of versions of PHP.
我建议您阅读本页菜单中的http://php.net/manual/en/migration70.php,其中有一节介绍从各种版本的PHP迁移。
You will have to work out how far up the migration levels your code will actually move without major amendments. I would guess, not very far!
您将不得不计算出代码在没有重大修改的情况下实际移动的迁移级别。我猜,不是很远!
#1
1
It sounds like your very old PHP4 code is using the mysql_
database extension?
听起来你的旧PHP4代码使用mysql_数据库扩展?
If so that extension has been deprecated for years and was completely removed from PHP7. You wont be able to move that code to any version of PHP higher than PHP5.6 and even trying to do that you will almost definitely come across lots of other incompatibilities
如果是这样,扩展已被弃用多年并完全从PHP7中删除。您将无法将该代码移动到高于PHP5.6的任何PHP版本,甚至尝试这样做几乎肯定会遇到许多其他不兼容性
I suggest you read http://php.net/manual/en/migration70.php in the menu on this page there is a section on migrating from all sorts of versions of PHP.
我建议您阅读本页菜单中的http://php.net/manual/en/migration70.php,其中有一节介绍从各种版本的PHP迁移。
You will have to work out how far up the migration levels your code will actually move without major amendments. I would guess, not very far!
您将不得不计算出代码在没有重大修改的情况下实际移动的迁移级别。我猜,不是很远!