LAMP

5月23日任务 LAMP架构介绍、MySQL、MariaDB介绍、 MySQL安装

烈酒焚心 提交于 2019-12-03 10:45:15
11.1 LAMP架构 LAMP 是Linux、 Apache、 MySQL、 PHP的简写,其实就是把Apache、MySQL以及PHP安装在Linux系统上,组成一个环境来运行php的脚本语言。至于什么是php脚本语言,这边不介绍。Apache是最常用的WEB服务软件,而MySQL是比较小型的数据库软件,这两个软件以及PHP都可以安装到windows的机器上。 PHP 是以模块的形式和 Apache 结合成一个整体的,但是 Apache 不能直接和 MySQL 打交道,只能通过 PHP 这个模块来互相沟通,这个过程叫动态的请求。举个例子,密码登录网页的时候,是一个动态过程,在 Apache 显示的网页登入口输入密码,再通过 PHP 模块到 MySQL 上进行数据比对,密码正确或是错误再通过 PHP 反馈给 Apache,然后显示在浏览器上。上图中的静态文件,类似网页上的logo等图片,Apache 通过静态文件取出的图片等,是不需要经过 MySQL 数据的,可以直接显示在浏览器上,所以是静态请求。MySQL 里面不能存图片等,存的是用户名密码、积分、文字等数据。 11.2 MySQL_MariaDB 介绍 11.3 MySQL安装 MySQL 安装包推荐使用二进制免编译。 首先下载一下安装包,进入网址 r.aminglinux.com 查找最新的 MySQL 二进制安装包

shell函数

易管家 提交于 2019-12-03 09:52:46
shell函数 为什么要使用shell函数 linux别的的作用 [root@lamp ~]# alias alias cp='cp -i' alias l.='ls -d .* --color=auto' alias ll='ls -l --color=auto' alias ls='ls --color=auto' alias mv='mv -i' alias rm='rm -i' alias vi='vim' alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' 设置别名与使用 [root@lamp ~]# alias cdone='cd /' [root@lamp ~]# alias alias cdone='cd /' alias cp='cp -i' alias l.='ls -d .* --color=auto' alias ll='ls -l --color=auto' alias ls='ls --color=auto' alias mv='mv -i' alias rm='rm -i' alias vi='vim' alias which='alias | /usr/bin/which --tty-only --read-alias --show

Is it dumb to develop for LAMP on WAMP?

你离开我真会死。 提交于 2019-12-03 08:58:33
问题 After becoming somewhat estranged open source, and spending some years developing web applications in ASP.Net, I'm going to start doing quite a lot of PHP / MySQL development. I've quite painlessly installed WampServer to get a development environment up and running on my Windows machine, but the platform I'll be targeting will most likely be Linux. So my question is, am I likely to run into problems due to developing on Windows while targeting Linux? Is it advisable to invest in getting a

Javascript/css/php/mysql to collect user email addresses in a div on a website [closed]

ⅰ亾dé卋堺 提交于 2019-12-03 08:57:38
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it focuses on one problem only by editing this post . Suppose you want a box on your website that says "Give us your email address and we'll send you news" or somesuch. What's a simple/elegant way to collect those email addresses (assuming a standard LAMP stack)? In particular, I'd like recommendations on Javascript to handle the UI (complain if invalid email address, say thanks when they hit enter, etc). CSS to make it look decent. PHP to

Resume/CV Parsing in PHP [closed]

这一生的挚爱 提交于 2019-12-03 08:44:15
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center . We are developing a requirement base social media site using LAMP. For that we want to do Resume/CV Parsing in PHP. We were able to parse Email-id and Phone, but not sure how to parse the other information like full name, address, education, employment etc from the resume. Plus resume/CV can be in various formats like doc,html,rtf

Linux users and groups for a LAMP server

与世无争的帅哥 提交于 2019-12-03 08:42:27
What is the best practice for setting up a LAMP server in terms of linux users and groups? If there are multiple sites hosted on the same server, is it best to have a single user that owns all site source files (and uploads) that is in the same group as apache - or to have a different user for each site (so that each site has its own crontab)? Or something else entirely? For some reason, this question never seems to be addressed in PHP/MySQL/Linux books that I've encountered. On our platform each site's htdocs etc has it's own user. This means if one site is compromised, the others should be

Mod Rewrite path issues

烈酒焚心 提交于 2019-12-03 08:32:50
I have successfully created rewrite rules to handle URLs like http://example.com/xyz http://example.com/xyz/ http://example.com/xyz/abc http://example.com/xyz/abc/ Here is the mod rewrite & regex: Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/?([0-9]+)(?:\/)?$ /index.php?p=$1 [L] RewriteRule ^/?([-a-zA-Z0-9_+]+)(?:\/)?$ /index.php?n=$1 [L] RewriteRule ^/?([-a-zA-Z0-9_+]+)/([-a-zA-Z0-9_+]+)(?:\/)?$ /index.php?n=$2 [L] This works great, but the problem is that when I go to http://example.com/xyz/abc ,

Trouble with Vagrant - “404 - Not Found”

谁说胖子不能爱 提交于 2019-12-03 07:55:13
I am attempting to make a LAMP box using Vagrant. I have been told that it is quite simple to use. I am completely new to networks and virtual machines and have very little experience with Linux/Ubuntu. I have currently tried following the tutorial on the official documentation page: http://docs.vagrantup.com/v2/getting-started/networking.html . I have gotten up to the networking article in the documentation and can't seem to get it working. Now the problem is, due to my inexperience with networking and linux based OS's I have no idea where to begin trouble shooting. I will try to give as much

What do I need to run PHP applications on IIS?

房东的猫 提交于 2019-12-03 07:48:02
Having been a PHP developer on LAMP servers for quite a while, is there anything that I will need to take into consideration while preparing an application for IIS on windows. Make sure you get the FastCGI extension for IIS 6.0 or IIS 7.0. It is the single most important thing you can have when running PHP under IIS. Also this article should get you setup: http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/ Everything beyond this is simple, MySQL and what not. Kev We just rolled out PHP 5.2.6 + FastCGI on our shared hosting platform without any problems. As

How Can I Block Requests from China to My App?

a 夏天 提交于 2019-12-03 06:21:36
I have an API that is somewhat popular (10,000+ requests/day). After 10 requests per day from an IP address I return a message telling the user they need to cough of some cash if they want to use the service more. This morning, I found that my web service was running terribly slow. I checked out the DB and I was getting absolutely spammed with requests from IP addresses originating in China. They would use an IP address 10 times and then increment the last octet. Sad times. I'd like to limit or completely cut off requests from China, for the sake of keeping the system alive. What's the best