简体   繁体   English

我应该安装xampp还是wamp?

[英]Should I install xampp or wamp?

So I have IIS manager already installed in my computer, and I want to update to php7 then install laravel, but the video tutorials, articles and documentations online is mostly geared towards people who use xampp and wamp I couldn't find a tutorial for IIS.所以我的电脑上已经安装了 IIS 管理器,我想更新到 php7 然后安装 laravel,但是网上的视频教程、文章和文档主要是针对使用 xampp 和 wamp 的人我找不到 IIS 的教程. I really want to download and install xampp or wamp, but our professor said to us"to dont ever install xampp or wamp in our computer, something bad will happen to the computer and it will just complicates everything".我真的很想下载并安装xampp或wamp,但是我们的教授对我们说“永远不要在我们的计算机中安装xampp或wamp,计算机会发生一些不好的事情,它只会使一切复杂化”。 so I am stuck, what should I do?所以我卡住了,我该怎么办?

If required you can install but need to make sure few things please check below the whole case:如果需要,您可以安装,但需要确保几件事,请在下面查看整个案例:

I am facing this problem I have Xampp and WAMP both in separate drive and XAMPP work with its default port 80 for PHP and 3306 for MySQL.我正面临这个问题,我在单独的驱动器中都有 Xampp 和 WAMP,XAMPP 使用其默认端口 80 用于 PHP 和 3306 用于 MySQL。 So I configured the Wampp of a separate directory and different PHP and MySQL versions.所以我配置了单独目录的Wampp和不同的PHP和MySQL版本。

I also change the default port from 80 to 8080 and 3306 to 3307 for WAMP and now I am able to access the PHPMyAdmin but not able to access the project with an older version ie PHP 5.6我还将 WAMP 的默认端口从 80 更改为 8080,将 3306 更改为 3307,现在我可以访问 PHPMyAdmin 但无法使用旧版本(即 PHP 5.6)访问项目

When trying to access the project folder on localhost:8080/project_name it threw me the error ie " No connection could be made because the target machine actively refused it. "当尝试访问 localhost:8080/project_name 上的项目文件夹时,它向我抛出了错误,即“无法建立连接,因为目标机器主动拒绝了它。

STEPS: 1) Xampp was already installed so I did not make any changes over there keep the default port 80 for apache and 3306 for the MySQL So your localhost will work something like this http://localhost/ http://localhost/phpmyadmin/index.php步骤: 1) Xampp 已经安装,所以我没有做任何更改,保留默认端口 80 用于 apache 和 3306 用于 MySQL 所以你的本地主机将像这样 http://localhost/ http://localhost/phpmyadmin /index.php

2) And I change the default post in WAMP that is 80 to 8080 for apache and MySQL default port from 3306 to 3307 for MYSAL http://localhost:8080/ http://localhost:8080/phpmyadmin/index.php 2)我将 WAMP 中的默认帖子从 80 更改为 8080 用于 Apache 和 MySQL 默认端口从 3306 更改为 3307 用于 MYSAL http://localhost:8080/ http://localhost:8080/phpmyadmin/index.php

3) How does the MySQL Connectivity you need to do in this case 3)这种情况下你需要做的MySQL Connectivity怎么做

define('DB_HOST', 'localhost:3307');
define('DB_USER', 'root');
define('DB_PASSWORD', '');    
define('DB_DATABASE', 'databasename');
$connection=mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die(mysql_error());
mysql_select_db(DB_DATABASE,$connection);

but our professor said to us"to dont ever install xampp or wamp in our computer, something bad will happen to the computer and it will just complicates everything"但是我们的教授对我们说“永远不要在我们的计算机中安装 xampp 或 wamp,计算机会发生不好的事情,它只会使一切复杂化”

so I am stuck, what should I do?所以我卡住了,我该怎么办?

For starters, find a new professor.首先,找一位新教授。 Anyone that tells you to do something with such absolute statements and without explanation has no business trying to teach.任何告诉你用这种绝对的陈述做某事而没有解释的人都没有资格尝试教书。

There are plenty of reasons WAMP and such aren't all that useful, but they certainly won't cause something bad to happen to your computer.有很多原因 WAMP 等并不是那么有用,但它们肯定不会对您的计算机造成不良影响。

Apache HTTPD is a web server that's been used for an eternity, but we have better alternatives. Apache HTTPD 是一个已经被使用了很长时间的 Web 服务器,但我们有更好的选择。 Nginx for example is typically much more efficient due to its threading model.例如,由于其线程模型,Nginx 通常效率更高。

MySQL is a database server that's also been in use for a long time, but PostgreSQL has surpassed it in capability, and it's also available under an open source license. MySQL 是一个也使用了很长时间的数据库服务器,但 PostgreSQL 在能力上已经超越了它,而且它也可以在开源许可下使用。 Particularly, it's JSON-B types allow for a document model inside of a record, with complete query support.特别是,它的 JSON-B 类型允许记录内的文档模型,并具有完整的查询支持。 Pretty amazing stuff, and comes in handy.非常神奇的东西,并且派上用场。

PHP... well that's a valid option if you want to use PHP, and it sounds like you do. PHP...好吧,如果您想使用 PHP,那么这是一个有效的选择,听起来您就是这样做的。

So I have IIS manager already installed in my computer, and I want to update to php7所以我的电脑上已经安装了 IIS 管理器,我想更新到 php7

There's actually an installer available that does everything for you.实际上有一个安装程序可以为您完成所有工作。 Really, you should be choosing a web server based on its functionality and efficiency, not based on how hard it is to install PHP.实际上,您应该根据其功能和效率来选择 Web 服务器,而不是根据安装 PHP 的难易程度。 In any case, since you already have IIS, there's no reason you can't use it.无论如何,既然您已经拥有 IIS,那么您没有理由不能使用它。 IIS works just fine with PHP. IIS 与 PHP 一起工作得很好。

then install laravel然后安装 laravel

You might have to set up some rewrite rules differently than your tutorials say, but otherwise it shouldn't matter so much what web server you're using.您可能需要设置一些不同于教程所说的重写规则,但除此之外,您使用的 Web 服务器应该没有那么重要。 If you want to use IIS, it would be a good exercise for you to learn how to set up this sort of project.如果您想使用 IIS,学习如何设置此类项目将是一个很好的练习。

video tutorials, articles and documentations online is mostly geared towards people who use xampp and wamp在线视频教程、文章和文档主要面向使用 xampp 和 wamp 的人

Don't follow tutorials step-by-step, learn what they're having you do.不要一步一步地遵循教程,了解他们让你做什么。 Then, learn how to do those things in the setup you want.然后,学习如何在您想要的设置中执行这些操作。

what should I do?我该怎么办?

If it were me, I'd set up a VM with Vagrant, and use a repeatable configurable setup process which is scripted, so you can then repeat it exactly on production servers.如果是我,我会使用 Vagrant 设置 VM,并使用可重复的可配置设置过程,该过程是脚本化的,因此您可以在生产服务器上完全重复它。 Having a VM also gives you a convenient snapshot that you can roll back to as you configure your system and make mistakes.拥有 VM 还为您提供了方便的快照,您可以在配置系统和出错时回滚到该快照。 (You should still be using version control for your code.) (您仍然应该对代码使用版本控制。)

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

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