w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Disable error reporting while installing application in php
You can use use this code <?php $old_value = error_reporting(0); /*Lets install the application here!*/ /*Application is done installing, lets put error reporting back to normal!*/ error_reporting($old_value); ?>

Categories : PHP

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

How to disable nginx cache
Solved my problem... Installed manually following this steps: http://eksith.wordpress.com/2008/12/08/nginx-php-on-windows/ with pure nginx i could disable cache on nginx.conf

Categories : Caching

How can I disable nginx logging with limit_conn and limit_req?
One solution is to enable error_log just where it is needed. server { error_log /dev/null crit; location ~.php$ { error_log /var/log/nginx_error.log; } }

Categories : Nginx

How to disable default nginx site when using Chef and Vagrant?
You can disable any nginx site by name using the nginx_site and its name. The problem you are having is because the nginx_site definition is actually looking for the enable parameter to be set to true or false not the action parameter set to :disabled. To disable the default site add to your recipe: nginx_site 'default' do enable false end This is working for me as of version 1.7.1 of the nginx opscode cookbook. I dont know if this will work with the version provided by community as it appears to be several months old. To get the latest version add to your Berksfile: cookbook 'nginx', git: 'https://github.com/opscode-cookbooks/nginx' Hope that helps :)

Categories : Nginx

HTML validator reporting errors saying that ID already defined
You have two divs with the id "fsizes" and two spans with the id "fsize3". If you want them to both have the same reference in css, then you should give them the same class name, not the same id. To use the class selector in css just replace the "#" with "."

Categories : HTML

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

What is the difference between Core Reporting API and the new Real-Time Reporting API?
To anwser your first question: Real-Time API lets you query information about whats happening on your sight right this minute. But Dimensions and metrics you can select from this API is limited. https://developers.google.com/analytics/devguides/reporting/realtime/dimsmets/ Core Reporting API the data is a bit older if my memory servies it takes them up to 4 hours to process hits and store them for use with the Core reporting api. But after processing there are a lot more dimensions and metrics available to you. https://developers.google.com/analytics/devguides/reporting/core/dimsmets Without knowing what language you are planing to use or how you are going to impliment its a bit hard to anwser your second question. But you use the Real-Time API the same as you would use the Core-Re

Categories : Google Analytics

PHP error reporting will not turn off
Could you share the error message? I'd be curious to see if it's a E_FATAL error. Missing a ; would produce a E_FATAL error. You can't suppress a fatal error because it is a compiling error. In other words: In that case your php script cannot compile and has to terminate.

Categories : PHP

Error reporting on jQuery and AJAX
Check the documentation again for jQuery's ajax function. You can actually receive arguments inside the error function (as well as the success function). You can name them whatever you want, but in the documentation they're defined as jqXHR (The jQuery XHR object), textStatus (string), and errorThrown. Use these to better help diagnose issues you're running into if the problem isn't apparent from the console. Admittedly, though, these offer only limited help.

Categories : PHP

Reporting error on calling memcpy
You can use the preprocessor for this, like #define memcpy(a, b, c) do_not_use_memcpy Put that in a header file that is included in all source files, and the preprocessor will replace all calls to memcpy with the (undefined) symbol do_not_use_memcpy. As that symbol is undefined, you will get a compiler error about it.

Categories : C

Android OS shuts down - Error reporting WTF
DeadObjectException is thrown when: The object you are calling has died, because its hosting process no longer exists. Are you binding to a service in your app? The docs say: You should always trap DeadObjectException exceptions, which are thrown when the connection has broken. This is the only exception thrown by remote methods. In this particular context, the "connection" refers to the service connection.

Categories : Android

Is it possible to force error reporting through LAMP?
Since there's many similar duplicates, I'll post the simple solution I used. File location : /etc/php5/apache2/php.ini modified lines : display_errors = On error_reporting = E_ALL user_ini.filename = ".user.ini" From terminal : service apache2 restart

Categories : PHP

DELETE FROM ... reporting syntax error at or near "."
Due to documentation, the syntax for delete in PostgreSQL 9.1 is: [ WITH [ RECURSIVE ] with_query [, ...] ] DELETE FROM [ ONLY ] table [ * ] [ [ AS ] alias ] [ USING using_list ] [ WHERE condition | WHERE CURRENT OF cursor_name ] [ RETURNING * | output_expression [ [ AS ] output_name ] [, ...] ] So you need to specify the "table_name" after DELETE command, not the "database_name". You can delete data only if you are logged into the database. You got ERROR: syntax error at or near "." because in the WHERE section you can specify the target table or the tables in the usinglist.

Categories : Database

Can't enable error reporting in PHP within Chrome
That is Apache (server) response and (probably) has nothing to do with php. It simply states that there is something wrong with your server configuration. Check the access.log and error.log in /var/log/apache2/ folder. It is probably due to wrong configuration in /etc/apache2/apache2.conf, or in /var/www/.htaccess (if you have one). I would also check if list.php exists in webroot folder and if both folder and file are readable (use chmod -R 755 /var/www in cli to make all files and folders readable)

Categories : PHP

Error reporting in Boost Spirit
We need to create a Phoenix function that can take the Spirit parameters. // lazy function for error reporting struct ReportError { // the result type must be explicit for Phoenix template<typename, typename, typename, typename> struct result { typedef void type; }; // contract the string to the surrounding new-line characters template<typename Iter> void operator()(Iter first_iter, Iter last_iter, Iter error_iter, const qi::info& what) const { std::string first(first_iter, error_iter); std::string last(error_iter, last_iter); auto first_pos = first.rfind(' '); auto last_pos = last.find(' '); auto error_line = ((first_pos == std::string::npos) ? first : std::string(first, first_pos + 1))

Categories : C++

Kill Application Process Without Windows Error Reporting
Sometimes you can and sometimes you cannot. First you have to exam what exception causes your application crashing from event viewer and to see whether you can handle such an exception. Many exceptions can be handled by App.DispatcherUnhandledException and AppDomain.UnhandledException event handlers. However some exceptions cannot be caught by user such as ExecutionEngineException. In these cases, you cannot prevent crashing and handle it gracefully.

Categories : C#

How to resolve Microsoft Reporting Services error: rsCredentialsNotSpecified
Open Reporting Services Configuration Manager click Report Manager URL tab, browse to the URL specified open the applications data manager section specify credentials for the report server to use

Categories : Sql Server

remove unwanted html tag nginx
According to http://packages.debian.org/sid/nginx-extras you should be able to use HttpSubModule or HttpSubsModule without recompiling.

Categories : Xslt

ANTLR4 Lexer error reporting (length of offending characters)
You should write your lexer such that a syntax error is impossible. In ANTLR 4, it is easy to do this by simply adding the following as the last rule of your lexer: ErrorChar : . ; By doing this, your errors are moved from the lexer to the parser. In some cases, you can take additional steps to help users while they edit code in your IDE. For example, suppose your language supports double-quoted strings of the following form, which cannot span multiple lines: StringLiteral : '"' ~[ "]* '"'; You can improve error reporting in your IDE by using the following pair of rules: StringLiteral : '"' ~[ "]* '"'; UnterminatedStringLiteral : '"' ~[ "]*; You can then override the emit() method to treat the UnterminatedStringLiteral in a special way. As a result, the user sees a great error

Categories : Java

Nginx returns 404 on cached html files
Try this: location @rewrite { # Some modules enforce no slash (/) at the end of the URL # Else this rewrite block wouldn't be needed (GlobalRedirect) rewrite ^/(.*).html$ /index.php?s=$1 last; }

Categories : Nginx

nginx subsfilter regex to delete one html tag
subs_filter <div id="header">[sS]*<div id="mainscreen"> <div id="mainscreen"> r; You were missing the =. I wouldn't use any of the other 3 regexes since you don't need to capture what's between the tags. Note this will erase <div id="header"> and everything up to <div id="mainscreen"> regardless of how far apart they are on the same html page. If you want a more precise regex then post an example of your actual html.

Categories : Regex

When I turn off error reporting PHP still kills my script after a failed non-essential operation
You can't recover from a fatal error, those are, well, fatal. From this question SoapClient error fallback in PHP you can let PHP die gracefully. To avoid the problem completely, check that the service is available, as noted here: PHP SOAP error catching and here SoapClient error fallback in PHP

Categories : PHP

nginx: Redirect to index.html if a given URI points to an existing directory
I had an error in my code... After fixing it now 'http://mydomain.com/css' serves contents from index.html. I was using & instead of $ in the regular expression...

Categories : Nginx

rails 4 nginx and unicorn serves only public files (html)
You have to add socket file to unicorn.rb config file and set it for listener. Something like this: sock_file = "path/to/unicorn.sock" ...... listen sock_file In your nginx conf you need: upstream rails_server { server unix:/path/to/sock; } server { listen 80; server_name example.com; root /path/to/public; access_log /path/to/log/nginx_access.log; error_page 500 502 503 504 /50x.html; location = /50x.html { root /path/to/public; } try_files $uri, @rails; location @rails { proxy_pass http://rails_server; proxy_set_header X-Forwarder-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; } }

Categories : Ruby On Rails

Rails 3.2 Nginx Unicorn always try to load index.html (403) from public folder
Finally i found the solution myself. Here is what i did: The other location-blocks interfered so it always loaded the public folder. After I deleted this lines : location / { gzip_static on; } location ^~ /assets/ { gzip_static on; expires max; add_header Cache-Control public; } the nginx server connects to unicorn.

Categories : Ruby On Rails

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

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

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

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

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

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

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

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 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

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

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

Disable href of HTML using javascript
In your click handler for the link, get the age value, perform the test and simply return false from the handler if you dont want it to do anything (i.e. !== 20), else return true to persist the data...

Categories : Javascript

Html.DropDownList disable if it is Empty
@if (@ViewBag.UserName.Items.Count == 0) { @Html.DropDownList("UserName", null, string.Empty, new { @disabled=true}) } else { @Html.DropDownList("UserName", null, string.Empty) } You could use @readonly aswell, instead of @disabled.

Categories : C#



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