webserver

Phalcon and nginx - framework run only indexController

不打扰是莪最后的温柔 提交于 2019-12-20 03:56:01
问题 I am using Phalcon and Nginx, and i have a problem. When I go to http://myapp.dev/segmentation Phalcon should run SegmentationController and its indexAction() method. But instead, Phalcon is running IndexController(default controller for "/"). I think problem is with Nginx configuration, because all works fine under Apache. Here is my Nginx site configuration: server { listen 80; server_name myapp.dev; index index.php index.html index.htm; set $root_path '/var/www/myapp/public'; root $root

php5 mail() function sendmail error

时光毁灭记忆、已成空白 提交于 2019-12-20 02:41:32
问题 I'm trying to use php's mail() function but keep getting an error. I've installed sendmail via sudo apt-get install sendmail , edited my /etc/php5/cli/php.ini file adding the following text to these lines: sendmail_path = /usr/sbin/sendmail -t sendmail_from = uslonsweb003.ALU@no-reply.com I then restarted my webserver and used this command for test: :~$ php -r "mail('sadmicrowave@gmail.com', 'test subject', 'test body message');" but I get the following error EVERYTIME!!!: sh: -t: not found

Reading and writing global variables across scripts in PHP

痞子三分冷 提交于 2019-12-19 21:47:16
问题 Does PHP have global variables that can be modified by one running script and read by another? 回答1: No, by design PHP is a "share nothing" architecture, which means nothing is shared between processes running at the same time or between requests running one after another. There are ways to share data, but you have to do it explicitly. If you just want to share between 2 requests from the same user, sessions or cookies might be the way to go. If you want to share between multiple users, you

Enable mysqli in my in-webserver copy of php

百般思念 提交于 2019-12-19 18:52:09
问题 As is discussed here: mysqli works when run directly but not when via js-ajax I may need to enable mysqli in my webserver php copy. It is enabled in the command line already. How do I figure out if mysqli is enabled in a specific php copy, and if it's not, how do I install it? My webserver is running Ubuntu 14.04.2 LTS. I have now tried having the following extensions in my php.ini file: extension=mysqli.so extension=pdo_mysql.so extension=php_mysqli.so I have tried running them all

update data to server in the background android

人走茶凉 提交于 2019-12-19 11:44:10
问题 How to update data to server ? I have used the code below but its not executing after 10 mins. ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(); executor.scheduleWithFixedDelay(new Runnable(){ public void run() { //update data to server } }, 0, 600, TimeUnit.SECONDS); 回答1: You must use your own Thread. Here is solution using AsyncTask.... All code put in your Activity class. public void toCallAsynchronous() { final Handler handler = new Handler(); Timer timer =

How to set up git server WITHOUT ssh auth

大兔子大兔子 提交于 2019-12-19 03:13:38
问题 Some time ago I stumbled upon an explanation on how to set up git authentication via the web server somehow. That way no ssh key swapping would be needed on client side. Shame on me, I did neither bookmark its link nor can remember the technique. I just miss throwing out a username:password combo to give access to some throwaway repositories. When prototyping some VM setups it was the last time I felt this need, snapshots were not an ideal solution. Is it possible to use git just with

the java db location is not set correctly

戏子无情 提交于 2019-12-18 18:47:24
问题 I get this error when using NetBeans: The Java DB location is not set correctly. Can somebody help? 回答1: I came across the same error message whenever starting the GlassFish. It was because the Java DB path had changed. (My previous install was glassfish-3.1.1/javadb) You can set up the correct path in the Java DB properties. 回答2: I had the same problem on my Mac, debugging an app on GlassFish 3.1 which comes standard with NetBeans 7.0.1. This link gave me the answer I needed: http://forums

Want to enable GZip compression in Weblogic

馋奶兔 提交于 2019-12-18 16:54:52
问题 I want to enable GZIP compression for my static file like css styles, javascript which is serving from weblogic server. Can anyone help to how to configure this feature in weblogic server. 回答1: Go to http://sourceforge.net/projects/pjl-comp-filter/ to download it and update your web.xml file with the following config: <filter> <filter-name>CompressingFilter</filter-name> <filter-class>com.planetj.servlet.filter.compression.CompressingFilter</filter-class> <init-param><param-name

How does one set up multiple accounts with separate databases for Django on one server?

风流意气都作罢 提交于 2019-12-18 13:37:04
问题 What options are there for installing Django such that multiple users (each with an "Account") can each have their own database? The semantics are fairly intuitive. There may be more than one User for an Account. An Account has a unique database (and a database corresponds to an account). Picture WordpressMU. :) I've considered this: External solution - Multiplex to multiple servers/daemons Multiple Django installations, with each Django installation / project corresponding to an account that

Create simple embedded http and https applications in C#

陌路散爱 提交于 2019-12-18 13:17:15
问题 There is a simple http server API that allow you do some simple stuff quickly, without any addition dependency/installation required. Are there any similar API/library in .NET WITHOUT IIS ? For example, I am a small window service running, I'd like to add a simple stupid web interface to allow local/remote control/monitoring. 回答1: HttpListener hooks into HTTP.SYS even without IIS, I believe. You'll need to add priveleges to the service account, though - netsh on vista, httpcfg on xp ("how"