LAMP

LAMP display php errors

折月煮酒 提交于 2019-12-14 02:07:22
问题 I've installed developer's LAMP server and made changes on php.ini display_errors On display_startup_errors On but it doesn't display any errors or even a little warning, what's the problem, what's wrong? 回答1: Keep in mind that most systems have two php.ini files, one for the webserver and one for the command line. Do a phpinfo() to see which one you need to edit. 回答2: Did you restart apache? 回答3: Also set error_reporting to E_ALL 回答4: change the following variables in your php.ini ; display

404 Not Found after El Capitan update

▼魔方 西西 提交于 2019-12-13 21:35:51
问题 Localhost is misconfigured after El-Capitan update yesterday. Im really not a mac person so I don't know how to fix this. Localhost is working fine but my username/sites can't be found. Exactly the same question here but the answer provided does not work for me. 回答1: Found a solution. Edit the apache configuration. In my case, the php module was commented so: Run sudo nano /etc/apache2/httpd.conf via terminal and uncomment the following if they are commented: LoadModule authz_core_module

部署LAMP架构之Mysql安装

╄→гoц情女王★ 提交于 2019-12-13 20:03:54
部署LAMP架构 安装Mysql数据库 1.安装环境包 2.源码文件解压到/opt/目录下 3.安装环境包 -DCMAKE_INSTALL_PREFIX=/usr/local/mysql #指定安装路径 -DDEFAULT_CHARSET=utf8 #指定字符集支持中文 -DDEFAULT_COLLATION=utf8_general_ci #默认字符集 -DEXTRA_CHARSETS=all #指定扩展字符集 -DSYSCONFIDIR=/etc #指定配置文件目录 -DMYSQL_DATADIR=/home/mysql/ #指定数据目录文件 -DMYSQL_UNIX_ADDR=/home/mysql/mysql.sock #定义sock文件。连接数据库文件 4.环境包安装完成后进行make&&make install过程 这个过程时间较长,耐心等待! 5.找到配置文件和启动脚本 赋予启动脚本可执行权限 宣告服务器有Mysql服务 5.修改环境变量 6.创建程序用户 赋予用户权限 7.配置数据库 8.修改启动脚本 9.修改mysql用户密码 10.进入数据库查看 来源: 51CTO 作者: wx5d8ab22a0be5a 链接: https://blog.51cto.com/14557905/2458283

宝塔好用吗?

匆匆过客 提交于 2019-12-13 19:31:38
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 不少新手站长对服务器运维知识不擅长,不知道怎样管理好云服务器。如果有一个简单易用的面板,站长们就不需要去学习运维技巧,把这些就交给后端工程师就好。 宝塔算是目前市面上使用用户较多的服务器运维管理工具之一,下面来看看它的优劣势对比: 宝塔Linux管理面板可以一键部署:LAMP/LNMP/Tomcat/Node.js、网站、数据库、FTP、SSL,通过Web端轻松管理服务器。 1、宝塔的优势:宝塔面板更人性化,资源占用比WDCP好很多,站点访问速度较快,可以设置定时备份到云盘,操作设置简单,功能多。更新频率快,兼容性比较好,面板可一键迁移,设有监控功能,在计划任务中可以定时执行备份网站、备份数据库、释放内存、访问url等操作。 2、宝塔的缺点:有时候也会有用户提出这样那样的问题。目前还不支持nginx和Apache共存,而WDCP支持;安全方面,WDCP支持一键安装云锁,宝塔目前没有。 前面也说到宝塔只是目前众多服务器面板工具中的其中之一,近几年后续也有很多新的好用的运维工具出现,比如云帮手,下面我将从多个角度分析两大软件的区别: 1.新手操作难易程度 云帮手对新手更友好一点,从一开始的安装、添加服务器都比较方便,直接通过软件自带的远程功能安装探针端就可以了。 2.安全巡检/修复功能 一键安全巡检和修复功能

Wordpress MediaWiki Cookie Integration

浪尽此生 提交于 2019-12-13 16:24:01
问题 I have my Wordpress install and MediaWiki sharing the same login information. Unfortunately, users need to log into both separately, but at least they use the same credentials. What I would like to do is cause a successful login on the Wordpress blog to also cause a login for MediaWiki (ideally both directions). There are two ways this could happen: Logging in causes a login on the other application (writes the cookie and creates the session in the DB) Accessing an application checks for the

部署LAMP架构之Apache安装

梦想与她 提交于 2019-12-13 15:59:27
源码编译安装Apache Apache起源 源于A Patchy Server,著名的开源Web服务软件 1995年发布Apache服务程序的1.0版本 由Apache软件基金会(ASF)负责维护 最新的名称“Apache HTTP Server” 官方站点: http://httpd.apache.org/ 特点: 开放源代码、跨平台应用 支持多种网页编程语言 模块化设计、运行稳定、良好的安全性 编译安装的优点: 具有较大的自由度,功能可定制 可及时获得最新版本 普遍适用于大多数linux版本,便于植入使用 安装过程 1.部署安装环境,本机共享获取环境包 2.解压环境包 3.将两个apr包放到httpd包中 4.安装环境包 yum -y install gcc gcc-c++ :C语言 C++语言编译器 make :将源代码文件转化成可执行性文件工具 pcre-devel :支持Perl语言 expat-devel :让网站能够解析html格式文件 perl:语言编译器 ./configure :执行脚本,配置文件 --prefix=/usr/local/httpd :指定安装路径 --enable-so :开启核心模块 --enable-rewrite :开启重写功能,防盗链 --enable-charset-lite :开启支持字符集 --enable-cgi

Ubuntu automatically pull from Github repo

老子叫甜甜 提交于 2019-12-13 12:07:39
问题 I installed git on my server but I want it to pull from my github repo whenever I push the changes I made locally. I've looked into hooks but it's very confusing and I can't find any tutorials. Does anyone know how to do that? 回答1: I want my server to pull from the repo after each commit That looks like a webhook : your server would listen to a pull event (JSON payload) emitted by GitHub. You will find many example of listener, like zenhacks/github-webhook-listener in CoffeeScript. 回答2:

理论+实操 :源码编译安装LAMP

泪湿孤枕 提交于 2019-12-13 08:45:36
前言 Apache网站服务 MySQL服务 LAMP架构应用实例 LAMP解释 linux apache mysql php/python 一 : Apache简介 1.1 Apache 起源 源于a patchy server, 著名的开源Web服务软件 1995年时,发布apache服务程序的1.0版本 有apache软件基金会(ASF)负责维护 官方站点:http://httpd.apache.org/ 1.2 apache 官方网页 1.3 apache 主要特点 开放源代码、跨平台应用 支持多种网页编程语言 模块化设计、运行稳定、良好的安全性 1.4 软件版本 1.X 目前最高版本的是1.3,运行稳定 向下兼容性较好,但缺乏一些较新的功能 2.X 目前最高版本是2.6 具有更多的功能特性 与1.X相比,配置管理风格存在较大差异 二 :编译安装httpd服务器 1.1 编译安装的优点 具有较大的自由度,功能可定制 可及时获得最新的软件版本 普遍适用于大多数Linux版本,便于移植使用 1.2 获得apache服务器的软件包 参考地址: http://httpd.apache.org/download.cgi 1.2 编译安装httpd步骤 1.2.1 准备工作 卸载httpd及相关依赖包————把环境清空 1.2.2 解压相关文件 挂载共享文件夹,使用mount.cifs

Accessing MySql Database from PHP file on local host

断了今生、忘了曾经 提交于 2019-12-13 04:38:46
问题 I am attempting to do a simple connect and SELECT on a LAMP server. I have made this php code work when connecting to a remote sql database but I cant get it to work with a local database. <?php //I also tried replacing the IP with localhost $db = mysql_connect('192.168.1.69','UserIcreated','MyPassword') or die("Connection error"); $db = mysql_select_db("MyDataBaseName",$db) or die(mysql_error($db)); $result = mysql_query("SELECT * FROM MyTableName"); if(mysql_num_rows($result)>0){ echo "Try

Is it possible to see active sessions using php?

匆匆过客 提交于 2019-12-13 04:31:46
问题 I am developing a php application. Is it possible to get active sessions and session values on my server? And is it possible to end up a particular session? 回答1: If you want maximum flexibility with sessions you can save all your sessions in a database. Then it is very easy to get number of sessions, content of any session, kill them, etc... http://shiflett.org/articles/storing-sessions-in-a-database As a bonus you will increase the security! 回答2: Currently in PHP you cannot get the active