LAMP

debian5/6下部署LAMP

ε祈祈猫儿з 提交于 2019-12-05 22:01:10
1、安装Lamp软件 apt-get install mysql-server-5.0 apt-get install apache2 apt-get install php5 apt-get install php5-gd apt-get install php5-mysql 软件的依赖关系会自动配置好。 *安装顺序为mysql、apache、php,这样不容易出错。 2、修改配置文件 vim /etc/apache2/apache2.conf 找到AddDefaultCharset,把iso9660改成gb2312,把前面的#去掉 vim /etc/php5/apache2/php.ini 找到default_charset,把后面内容改为gb2312。 来源: oschina 链接: https://my.oschina.net/u/1420/blog/13011

How to call REC Registery API and store returned JSONs into some kind of database

删除回忆录丶 提交于 2019-12-05 21:58:58
I'd like to break this into smaller, tighter questions but I don't know what I don't know enough to do that yet. So hopefully a can get specific answers to help do that. The scope of the solution requires receiving & parsing a lot of records, 2013 had ~17 million certificate(s) transactions while I'm only interested in very small subsets of the order 40,000 records. In pseudo code: iterate dates(thisDate) send message to API for thisDate receive JSONS as todaysRecords examine todaysRecords to look for whatever criteria match inside the structure append a subset of todaysRecords to recordsOut

LAMP兄弟连PHP课程学习笔记 第二天 PHP中使用变量

ε祈祈猫儿з 提交于 2019-12-05 20:45:01
一、变量的介绍 变量:是指临时储存值的容器,这个值可以是数字或者文本或者其他组合。可以在程序使用的过程中更改。 二、变量的声明 1、如果用到的数据需要多次被调用时就声明为变量,PHP是弱类型语言,变量的类型由所赋给的值决定,所以可以不用指定变量类型。 格式:$变量名 = 值 isset() 函数用于判断一个变量是否已经声明 eg: <?php /* * 创建时间 2011-4-8 * * 作者:梁小波 * 文件: * 功能: * */ $a = 10; if(isset($a)){ echo $a; }else{ echo "变量未赋值"; } ?> unset() 释放一个变量 eg: <?php /* * 创建时间 2011-4-8 * * 作者:梁小波 * 文件: * 功能: * */ $a = 10; unset($a); if(isset($a)){ echo $a; }else{ echo "变量未赋值"; } ?> 三、变量的命名 1、变量前一定要使用"$"符号,声明和使用都必须要使用。 2、变量不能以数字开头 3、不能使用PHP或者其他语言的运算符号”+、-、*、/”等等 4、PHP可以使用系统关键字作为变量名 5、PHP的变量区分大小写(变量、常量其他不区分) 6、尽量将变量名起成有意义,可以使用英文或者汉语拼音 四、可变变量 很少使用,可以仅作了解 eg: <

How can I force GPG to accept input from STDIN instead of trying to open a file?

此生再无相见时 提交于 2019-12-05 19:34:16
I am trying to incorporate GPG clear-signing of text in a string in a PHP script. I can cause GPG to encrypt text in a string like this: $encrypted = shell_exec("echo '$text' | gpg -e -a -r foo@bar.com --trust-model always"); and that works perfectly, with the encrypted text being sent to the $encrypted variable. This proves GNUPGHOME and GNUPG are set up correctly. However, when I try to produce a clear-signed message in the same way with this: $text = "googar"; $signature = exec("echo $passphrase | gpg -v --clearsign --no-tty --passphrase-fd 0 '$text' 2>&1 1> /dev/null", $output); I am

Linux系统学习 九、日志、命令、身份鉴别、目录、文件查看、控制台终端、文件属性

北慕城南 提交于 2019-12-05 19:07:21
一、配置静态IP地址 输入ifconfig后没有配置IP地址,接下来进行手动配置。 输入以下命令进入IP配置文件进行配置 原始内容 进入vi后,输入i进入编辑状态,编辑完成后,按esc键退出编辑状态,输入:wq进行保存退出。 编辑后的内容 重新启动一下 遇到的问题: IP配置完成,重启后,可以和本机ping通,但是无法ping通百度。 原因猜测: IP地址冲突;网关不对 解决: 最后经检查是网关配置错误 二、history命令 该命令可以回显从开机到当前时间输入过的所有指令 三、 在刚进入系统时所处的当前目录是root目录下 四、日志 存在于/var/log目录下 日志文件 日志文件 含义 /var/log/secure Linux系统安全日志,记录用户和工作组的情况、用户登陆认证情况 /var/log/boot.log 该文件记录了系统在引导过程中发生的事件 /var/log/messages 内核及公共信息日志,是许多进程日志文件的汇总 /var/log/dmesg 系统引导日志,该日志使用dmesg命令快速查看最后一次系统引导的引导日志 /var/log/lastlog 该日志不能用诸如cat、tail等查看,因为该日志里面是二进制文件,可以用lastlog命令查看,它根据UID排序显示登录名、端口号(tty)和上次登录时间。如果一个用户从未登录过,lastlog显示

CakePHP 2.x GROUP BY within Containable

不问归期 提交于 2019-12-05 18:34:34
I am going nuts trying to find a good solution, either using the set::extract() or something. I want to add a GROUP BY within my containable: $params = array( 'conditions'=>array( 'Project.id'=>$ProjectId ), 'contain'=>array( //Gets the User Who owns the Project 'User'=>$user, 'Bid'=>array( //The User Who owns the Bid 'User'=>$user ), 'ProjectType', 'Os', 'Comment'=>array( 'To'=>$user, 'From'=>$user, 'group'=>"Comment.from_id" ), ), ); //debug($params); return $this->find('first',$params); I do not want to hack to get around this issue - is there an easier way to do this? For anyone else that

are there any gotchas for hosting a Silverlight app on a Linux server?

风流意气都作罢 提交于 2019-12-05 17:56:10
I'm building a new Silverlight app for a photography studio. I was about to say "you have to have a Windows-based server hosting it" and then I thought, wait is that right? Looks like it's not. So I could point him toward a Linux host. I know you have to register the MIME types (from a different SO thread). Are there any other caveats or gotchas that I need to know about? Assume for a second that I know next to nothing about Linux. Edit: what if the app needs to talk to a database (mySQL)? Seems like I'd need to have Moonlight to get that going, which isn't gonna fly. The only thing you have

Set up and access the PHP-FPM status page in Bitnami LAMP stack

假装没事ソ 提交于 2019-12-05 15:18:03
I'd like to see the PHP-FPM status page on a Bitnami LAMP stack system. However, when I try I get a blank page, or an error saying: Request exceeded the limit of 10 internal redirects due to probable configuration error. So what do I need to do to get it working? There are two parts to this answer. The first is that you need to enable the status page handler in the PHP-FPM configuration and then you need to set up Apache to route a given URL through to that handler. To set up PHP-FPM: cd /path/to/bitnami cd php/etc sudo nano php-fpm.conf (Or whatever command to use your favourite editor. Also,

Load balancing web servers + keeping content synced

狂风中的少年 提交于 2019-12-05 12:13:01
I'm considering implementing EC2's Elastic Load Balancing features, but I'm running a web application (on the LAMP stack) that has frequent changes and wondering what the most common strategy is for keeping the application in sync between the servers that are load balanced. The database would live elsewhere, so I'm only worried (at this point) about keeping the actual scripts in sync when I make changes. The one way of addressing this problem is using a continuous integration which can transfer your files with rsync and build the project on the servers, this is not just yet. There are quite a

通过LAMP部署phpMyAdmin、wordpress(https)、discuz

自作多情 提交于 2019-12-05 12:02:49
1、安装启动LAMP 安装环境:   CentOS Linux release 7.5.1804 安装包:   # yum -y install httpd php php-mysql mariadb-server 启动服务:   systemctl start mariadb   systemctl start httpd 2、部署phpMyAdmin 1、配置虚拟主机 # vim /etc/httpd/conf/httpd.conf ,在文件的末尾加上下面配置信息 <VirtualHost *:80> ServerName pma.ysu.com DocumentRoot "/var/www/html/pma" CustomLog logs/pma_log combined <Directory "/var/www/html/pma"> Require all granted </Directory> </VirtualHost># systemctl restart httpd 2、上传phpMyAdmin-v4.4.14.1.zip安装包 # unzip phpMyAdmin-v4.4.14.1.zip # mv phpMyAdmin-4.4.14.1-all-languages /var/www/html/pma # chown -R apache:apache /var