这个问题在过去几天一直困扰着我.
我一直在努力在Amazon EC2上设置LAMP服务器.主要问题是我正在为需要大量高端处理的客户端编写应用程序,而Amazon EC2似乎是一个不错的选择.
最初,我开始使用基本的AMI,它真的没有任何东西.我尝试使用root访问权限登录SSH(使用WinSCP),我被告知要使用ec2-user.
我尝试使用ec2-user,我能够登录.但是,我仍然没有root访问权限,无法安装apache.我做了一些理由,我发现了"sudo"命令,几乎我在这个问题上阅读的每篇文章都说要么使用root访问权限,要么登录ec2-user和用户sudo.
我已经尝试了另一个已经安装了LAMP的AMI.我能够让它工作,建立一个数据库并开始运行一个网站.但是,我仍然需要安装一些扩展.也就是说,我试图用于此应用程序的API需要安装SOAP.
这是我的困境:
/$ whereis soap
soap:
/$ whereis yum
yum: /usr/bin/yum /etc/yum /etc/yum.conf /usr/share/man/man8/yum.8.gz
/$ yum install php-soap
Loaded plugins: fastestmirror, priorities, security
You need to be root to perform this command.
/$ sudo yum install php-soap
sudo: sorry, you must have a tty to run sudo
Command 'sudo yum install php-soap' failed with return code 1 and error message sudo: sorry, you must have a tty to run sudo
Run Code Online (Sandbox Code Playgroud)
我不能使用yum因为我没有root访问权限,每当我登录root时它会告诉我使用ec2-user或提供我没有的密码.另一个选择是使用sudo让ec2-user像root一样,但我总是得到错误'抱歉,你必须有一个tty来运行sudo.我在网上运行了这个错误消息,似乎我需要将用户添加到sudoers ...我不能没有root访问权限.
这个完全相同的问题困扰着我两个独立的AMI.在第一次我收到一条消息说我必须以ec2-user身份登录(我必须有一个tty才能运行sudo),而第二个(安装了LAMP)要求我输入root用户的密码,并为用户输入密码我得到了同样的sudo错误.
以下是我使用的AMI的ID: …
好的,这是我的困境.
我一直在为Medical Marcom制作 Wordpress插件,以自动更新他的美国推特医生名单.基本上,它提供了创建表单的功能,用户可以请求将其添加到列表中,可以在管理面板中确认请求,添加时可以在Excel文件中使用并填写初始数据,最后,某些字段会在一周内自动更新.
这是问题所在.
我的代码使用PHPExcel使用PHP生成Excel文件.但是,我需要在启动时将一个简单的自动过滤器应用于工作表(老实说,我不知道重要的是什么......任何人都可以轻松地在Excel中应用自动过滤器,但他希望从一开始就可以使用它).所以,我尝试应用我发现的代码:
$excel->getActiveSheet()->setAutoFilter('A1:J' . $row);
Run Code Online (Sandbox Code Playgroud)
$ excel是我的PHPExcel实例.$ row是从数据库输出的最后一行.单击url时会立即生成该文件,并将PHP的标题设置为将输出转换为Excel文件,如下所示:
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=" . $file);
Run Code Online (Sandbox Code Playgroud)
但是当我打开文件时,没有设置自动过滤器 ......我尝试在PHPExcel的网站上发布一个问题,但我没有得到任何回复,所以我决定在这里问.
有谁知道我可能做错了什么?目前他正在使用原始文件(尽管有所更新),直到此问题得到解决.
Okay, I'm having some serious issues here. I'm new to this site, and new to dealing with importing CSV data via PHP, but I'm not new to programming.
Currently, I'm working on building a Customer Relationship Manager. I need to create a script to import a file that will populate the database with leads. The main issue here is that the Lead data consists of Companies and Employees of said Company. Also, a few other tables are split off, such …
我一直在用laravel遇到一百个问题.我最近将laravel 3网站升级到了laravel 4,我将整个项目保存到Github上的存储库中.由于我经常无意中编辑错误文件夹中的文件,我只是在我的工作目录中创建了本地git存储库,所以我只有一个目录要处理.
一切都工作正常,直到我尝试安装一些laravel包,我以前能够安装.每当我运行composer update时,我的所有工匠脚本都会返回错误.即使在我确定使用开发PHP.ini文件之后,错误消息本身(可能是PHP错误)也不会显示.
fatal: No names found, cannot describe anything.
* master [KEY REMOVED] Remove mPDF Library
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
Status for device CON:
----------------------
Lines: 300
Columns: 80
Keyboard rate: 31
Keyboard delay: 1
Code page: 437
Status for device CON:
----------------------
Lines: 300
Columns: 80
Keyboard rate: 31
Keyboard delay: 1
Code page: 437
[RuntimeException]
Error Output:
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] …Run Code Online (Sandbox Code Playgroud) php ×3
amazon-ec2 ×1
autofilter ×1
codeigniter ×1
composer-php ×1
csv ×1
git ×1
import ×1
lamp ×1
laravel-4 ×1
mysql ×1
phpexcel ×1
ssh ×1