w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Web Deploy Command Line Logs in Event Logs (Updated / Inserted / Deleted Files) in event logs
I don't believe you can log the activities to the event log, but what you can do is use the -xml parameter to output the changes in XML format. You could then use this to log to the event log via a Powershell script, for example.

Categories : Iis

Where is my nginx being configured? Changing nginx.conf still brings me to the 'Welcome to nginx' page
when you rewrited the nginx.conf in the folder of source code of nginx and installed it firstly, it will be copied to /usr/local/nginx/conf/nginx.conf (without specially modification of the configure in the folder of source code). But when you do this secondly, the nginx.conf in the folder of source code will be copied to /usr/local/nginx/conf/nginx.conf.defualt,and it usually don't work unless you use nginx -c /usr/local/nginx/conf/nginx.conf.defualt to assign its configure file evertime. There is a line NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf" in your script above,which indicates the configure file clearly. To handle this, I suggest rewrite /usr/local/nginx/conf/nginx.conf (not the one in the folder of source code) instead.

Categories : Nginx

How to conveniently store common logs and client specific logs
I would have an xml file that contain the appenders to specify what packages go into what log file. You can then load the xml file in your application entry point. Below is an example I have used in my current project <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <!-- appenders --> <appender name="console" class="org.apache.log4j.ConsoleAppender"> <param name="Target" value="System.out" /> <param name="threshold" value="error" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="[%t] %p %c - %m%n" /> </layout> </appender> <appender name="codebaseXAppender" class="org.apache.log4j.RollingFileAppender"> <

Categories : Java

how to put the error logs in an error log file such as error.log using Yii framework?
There are hardly calls to Yii::log() in Yii's core. Most are Yii::trace() which you'll only see if you have set YII_DEBUG true and add log level trace.

Categories : PHP

How to set intellij to show logs in the logs tab and not the output tab
In the application server Run/Debug configuration open the Logs tab and specify the full log file path there. You can just search your disk for algo_js.log file and specify its location.

Categories : Spring

Reopening closed file: Lua
So, now the problem is that the "LoadScript" function isn't doing what you expect: Because I'm psychic, i have divined that you're writing a Crysis plugin, and are attempting to use it's LoadScript API call. (Please don't assume everyone here would guess this, or be bothered to look for it. It's vital information that must form part of your questions) The script you're writing attempts to set Backup - but your script, as written - does not separate lines with newline characters. As the first line is a comment, the entire script will be ignored. Basicallty the script you've written looks like this, which is all treated as a comment. --[[ comment ]]--Backup="Hello!" You need to write a " " after the comment (and, I'd recommend in other places too) to make it like this. In fact, you d

Categories : Windows

Error while parsing logs with spilp
I believe Python 3 is a separate program. Try invoking your script with: $ python3 "splilp.py" You can check the version of python 3 using: $ python3 --version Which is totally different from: $ python --version Basically the interpreter (python 2) expects syntax like: >>> print "string here" rather than >>> print("string here") Hope this helps.

Categories : Python

app crashes when closing / reopening then pressing button
It appears that the onPause in your activity is being called, and you're releasing the Camera - this is good. However, you never re-initialize it. The Android developer guide has this exact example. Basically, you need to do something like this: @Override protected void onPause() { super.onPause(); if (camera != null) { camera.release(); camera = null; } } @Override protected void onResume() { super.onResume(); if (camera == null) { initializeCamera(); } } Then you move all the camera initialization code from your onCreate into a new initializeCamera method. Note you should not initialize the camera in onCreate, since it is being done in onResume (which is called even on first load).

Categories : Android

TabHost disappears after locking the phone and reopening it:
When putting the phone to sleep onPause and onStop get called but onDestroy doesn't so that onCreate doesn't get called when turning the phone back on. onRestart, onStart and onResume do get called (checked on Nexus 7 by modifying the Activity Lifecycle training app to add Log messages in all lifecycle methods) so try to move as much code in initialiseTabHost as you can from onCreate to onStart, leaving only the minimum necessary in onCreate, or leave it there and add the relevant part of it to onRestart. Update (Emil Adz): As you suggested I added the onResume method and changed it as follows: @Override protected void onResume() { super.onResume(); if (mTabHost == null) { this.initialiseTabHost(null); } } From my check it looks as if it solved my problem, Tha

Categories : Android

Google AdMobs interstitial on reopening timed out
There are some issues with the loadAndDisplayRequest:usingWindow:initialImage: method. This blog post explains how you can achieve the same thing by using GADInterstitial's loadRequest: method. This implementation is better because you have more control over your view hierarchy.

Categories : IOS

WCF Service: How to find server logs to understand error?
Logging is not necessarily turned on. Tracing and logging need to be enabled in WCF configuration (app.config or web.config). You can do this manually, or by clicking app.config and then selecting Edit WCF Configuration. If this item doesnt appear in context menu (happens in old versions of VS), you can find it in VS Tools menu or by running it manually (SvcConfigEditor.exe). By default, messages are logged to files in directory from which application is ran. You can edit this in configuration editor once you enable logging. Editor will allow you to specify file path once you enable logging or tracing. You can later use Microsoft Service Trace Viewer tool for going through the files, as large XMLs and are not user friendly. Viewer tool should come up itself once you double click log fi

Categories : C#

Parse Apache2 Error logs with Grok for Logstash
Logstash has a built-in apache log parser. Here is an example... grok { type => 'company' pattern => ["%{COMBINEDAPACHELOG}"] add_tag => "apache" } As a reference, you can check Logstash's docs

Categories : Apache

restart apache gracefully, but I got some error logs, can I ignore them?
This bug would tell you that the specific error messages you've mentioned are harmless and can be ignored. (As indicated in the same bug report, the issue has been fixed in mod_wsgi 3.3 so you shouldn't see the error after upgrading!)

Categories : Python

CakePHP 2.2.3 - include full URL & referrer in error logs
Resolved using mark's custom ErrorHandler from the tools plugin: https://github.com/dereuromark/tools/blob/master/Lib/Error/MyErrorHandler.php#L131

Categories : Cakephp

ANDROID: How to make the app record all the ERROR logs in a database?
Maybe the easiest way is to have a method responsible for saving the data into database. Then you should wrap your codes in try...catch block and catch all possible exceptions and pass the exception message to that method.

Categories : Java

Get iPhone Logs(not crash logs)
Got a breakthrough!!. We need to re-direct NSLog to a file like this and then access the file. - (void)redirectNSLogToDocumentFolder{ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *fileName =[NSString stringWithFormat:@"%@.log",[NSDate date]]; NSString *logFilePath = [documentsDirectory stringByAppendingPathComponent:fileName]; freopen([logFilePath cStringUsingEncoding:NSASCIIStringEncoding],"a+",stderr); } http://objcolumnist.com/2009/12/19/redirecting-nslog-to-a-log-file/

Categories : IOS

Java Comms PortInUseException when closing and reopening serial connection
To resolve conflicts over port ownership, you can register a PortOwnershipListener so that you will be told if another application wants to use the port. Then you can either close the port and the other application will get it, or ignore the request and the other program will get a PortInUseException.

Categories : Java

How can I modify my wxPython code live to avoid closing/reopening them?
You can use Python's reload() built-in functionality. Here's a fun little demo: import testApp import wx ######################################################################## class ReloaderPanel(wx.Panel): """""" #---------------------------------------------------------------------- def __init__(self, parent): """Constructor""" wx.Panel.__init__(self, parent) self.testFrame = None showAppBtn = wx.Button(self, label="Show App") showAppBtn.Bind(wx.EVT_BUTTON, self.onShowApp) reloadBtn = wx.Button(self, label="Reload") reloadBtn.Bind(wx.EVT_BUTTON, self.onReload) mainSizer = wx.BoxSizer(wx.VERTICAL) mainSizer.Add(showAppBtn, 0, wx.ALL|wx.CENTER, 5) mainSizer.Add(reloadBtn, 0, wx.ALL|wx.CENTER

Categories : Python

Where to start with Deprecated: Directive 'safe_mode' on line 0 in Apache error logs
Safe_mode is a PHP feature that has been depreciated in 5.3 and ultimately removed in 5.4. It is pointless and potentially dangerous and should not be used. To turn it off go to your php.ini file and change safe_mode = on to safe_mode = off Restart apache and you should be good to go.

Categories : Apache

`heroku open` fails - table doesn't exist error in logs
The reason its throwing an error is because factory girl rails is only install in "test" mode. On heroku you app is usually in "production" mode unless you specify otherwise. I'd take out the require from the populate task. Also you're probably better off creating factories on a test by test basis. See https://github.com/thoughtbot/factory_girl/wiki/Usage The other option is to install factory girl in production mode. Simple take the gem 'factory-girl-rails' out of the test group.

Categories : Ruby On Rails

"mod_wsgi : Unable to import site module" in Apache Error Logs
In the document you reference, it says the following: http://code.google.com/p/modwsgi/wiki/InstallationIssues#Mixing_32_Bit_And_64_Bit_Packages IOW. y Python installation has not been installed with --enable-shared when configure was run for Python. Also, you do not seem to have removed the existing mod_wsgi properly either if what is installed is still referencing Python 2.4.

Categories : Python

Primefaces Dialog not reopening when ajax close event listener included
I think updating the visible attribute is not a correct way to open/close a dialog. It should be something like this: RequestContext context = RequestContext.getCurrentInstance(); context.execute("dlg.show();"); // To open the dialog context.execute("dlg.hide();"); // To close the dialog

Categories : Java

Unknown error nginx
You can only specify options for the listen directive once per combination of host:port (see the documentation). The error is being caused by this line in your second file: listen [::]:80 ipv6only=on; Because the first file has the ipv6only=on option, the second file does not need it. Changing the beginning of the second file to the following should fix the problem: server { listen 80; listen [::]:80; ... }

Categories : Nginx

PHP Fatal error with nginx
Looking at your example error it appears you are not formatting the require correctly. It should look something like this: require_once(TEMPLATEPATH . '/functions/theme-functions.php'); Make certain that you are also defining your TEMPLATEPATH. define("TEMPLATEPATH ", "/this/is/your/path"); In the end, this should output a string: /this/is/your/path/functions/theme-functions.php

Categories : PHP

403 forbidden error at Nginx
You stated: ls -ld /home drwx------ 4 mysite mysite 4096 Jul 20 18:39 mysite If nginx is running as an ordinary user, presumably as something other than "mysite", then it cannot access /home as only the mysite and root users have this permission. To find out what user nginx is running as type: ps faxu .. and search for the nginx process. To get the nginx user just do ps faxu | grep nginx

Categories : Nginx

Restarting nginx: nginx: [alert] Unable to start the Phusion Passenger watchdog because its executable
Passenger takes what you set in the file nginx.conf by passenger_ruby, for example: passenger_root /home/dev/.rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.5; passenger_ruby /home/dev/.rvm/wrappers/ruby-1.9.3-p448/ruby;

Categories : Ruby

Can a server run Nginx for some sites and Apache Nginx Reverse Proxy for others?
server { server_name example.com; location / { # assuming apache is on port 81 for example proxy_pass http://127.0.0.1:81; # to make apache detect the host header proxy_set_header Host $host; } # if you have assets folders, you can let nginx serve them directly, # instead of passing them to apache location /images { # or /css or /js .. etc try_files $uri =404; } } Note: in the case of assets, sometimes some sites serve assets through rewrites, or even handled by the application it self, you can pass it to apache by adding that in the assets location as a fallback like this location /images { try_files $uri @apache; } location @apache { proxy_pass http://127.0.0.1:81; } In apache you create a virtual host <Virtua

Categories : Apache

Server Blocks in nginx - 502 Error
The 502 code means 502 Bad Gateway, The server was acting as a gateway or proxy and received an invalid response from the upstream server. It usually means the backend servers are not reachable, which could be a problem with them, not with your front-end configuration. On the machine running Nginx, you should test that you can rest the backend servers. Using w3m or another HTTP client on that machine, check these URLs. Do they load what you expect? http://<my_ip_server_1>:80 http://<my_ip_server_2>:80 If not, you may have some updates to make sure that your Nginx server can reach the backend servers. I should add, you may need send the Host: header to get the backend servers to serve the expected content, if they each host multiple virtual domains. I like to use GET and

Categories : Nginx

Error in path in GlassFish app when using Nginx
The link on your landing page is generated by the upstream app server. Without changing that, you have to tell nginx how to serve that url. One solution could be adding the following location block: location /Calenicon/ { proxy_pass http://localhost:8080; proxy_set_header X-Real-IP $remote_addr; }

Categories : Java

Nginx not running with no error message
Check the daemon option in nginx.conf file. It has to be ON. Or you can simply rip out this line from config file. This option is fully described here http://nginx.org/en/docs/ngx_core_module.html#daemon

Categories : Nginx

nginx mysterious error despite right configuration
The editor that you used to edit /etc/nginx/sites-enabled/default left a temporary file default~ (note this ~ suffix) in your /etc/nginx/sites-enabled/ directory. You should delete it.

Categories : Nginx

nginx -> php5-fpm: Error in php not logged (anywhere!)
search for catch_workers_output in your pool and set it to yes, from the doc: catch_workers_output - Redirect workers' stdout and stderr into main error log. If not set, they will be redirected to /dev/null, according to FastCGI specs. Values "yes" or "no" EDIT: also check you have php_flag[display_errors] = on and/or php_admin_flag[log_errors] = true

Categories : PHP

Permission error zc.buildout with nginx
Port 443 is below 1024, which means it is a protected port, only open-able by root. So your buildout is correct, you're just running into a 30 old unix restriction :-) Starting nginx on port 8443 or so will probably work fine. An option: run it on an unprivileged port from buildout, but redirect traffic there from some globally installed server.

Categories : Ubuntu

Meteor WebSocket handshake error 400 with nginx
if you are receiving this error client side in the browser console, you can safely ignore it - it means that your hosting does not support websockets and meteor will fallback to using long polling instead meteor apps deployed to heroku or any other platform without websockets will get the same error update: as of meteor v0.6.4 you can now set the environment variable DISABLE_WEBSOCKETS to prevent this attempt from occurring if you know it will fail https://github.com/meteor/meteor/blob/devel/History.md If you set the DISABLE_WEBSOCKETS environment variable, browsers will not attempt to connect to your app using Websockets. Use this if you know your server environment does not properly proxy Websockets to reduce connection startup time.

Categories : Node Js

Avoiding Django's 500 error for not allowed host with Nginx
It depends on your default configuration, but from this answer on ServerFault you must define a default vhost in Nginx, otherwise it will use the first one as a default. Basically, your configuration should look like this in order to allow only requests to "mywebsite.com.br" to pass: server { listen 80 default_server; location / { # or show another site return 403 "Forbidden"; } } server { listen 80; server_name mywebsite.com.br; location / { uwsgi_pass unix:/opt/project/run/brmed_web.sock; include uwsgi_params; } } If you need to also serve up other subdomains (www.mywebsite.com.br, etc.) you can set the server_name to ".mywebsite.com.br".

Categories : Django

502 Bad Gateway error Nginx and uWSGI in deploying Flask app
With uwsgi_pass 127.0.0.1:9001; you declared to Nginx your intent to talk to uWSGI through TCP socket, but have not warned uWSGI about it. Try adding a corresponding socket line to your /etc/default/uwsgi file: PYTHONPATH=/var/www/reframeit-im MODULE=wsgi socket=127.0.0.1:9001

Categories : Nginx

Mixed content error when proxying websocket through nginx with SSL
Change match original protocol to match origin protocol: io.configure(function() { //io.set('match original protocol', true); io.set('match origin protocol', true); ... }

Categories : Node Js

nginx 403 forbidden error in Rails 4 (with no index.html file)
You'll need to pass the request from Nginx to Unicorn. You can do this like so: server { listen *:80; root /vagrant/public; location / { # Serve static files if they exist, if not pass the request to rails try_files $uri $uri/index.html $uri.html @rails; } location @rails { proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://127.0.0.1:8080; } } You may have to change the proxy_pass url. By default, unicorn will listen on 127.0.0.1:8080 but, if you have changed that, then you will need to specify that port.

Categories : Ruby On Rails

error on installing passenger nginx module on ubuntu with ruby 2.0.0 via rvm
You have to install development tools first. Most likely you're missing some libraries just like the error is indicating. I ran into the same thing a couple weeks back. Here is a nice tutorial similar to the one that helped me out. http://alexpearce.me/2012/06/setting-up-a-vps/ With a little bit of luck, I believe that this line will solve your current issues, but be sure to look over the whole document. sudo apt-get -y install curl git-core python-software-properties build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libcurl4-openssl-dev Also: I've also always had troubles when using rvm and have found that rbenv works with less hiccups, which is actually mentioned in this tutorial. For databases, if you aren't using postgres then you should be able to just swap out the

Categories : Ruby On Rails

Flask + uwsgi + nginx + debug. 502 error instead of debugger page
Flask debug=True does not work when going through uWSGI may help. Essentially, uwsgi is not intended for development environments where you want debugging info in the browser. It's a production server. possibly adding in app.debug = true may help, after you have instantiated the Flask object, but otherwise, to get a proper debugger, use the flask internal server for development.

Categories : Nginx



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.