Friday, June 27, 2014

android 开发 此版本的应用未配置为通过GOOGLE PLAY结算

错误消息:

android 开发 此版本的应用未配置为通过GOOGLE PLAY结算

修复:

上传一个含BILLING权限的版本到PLAY后,在手机上也使用这个版本测试。使用调试版会出现这个错误。

Error checking for billing v3 support. (response: 3:Billing Unavailable)

1.Error:

Error checking for billing v3 support. (response: 3:Billing Unavailable)

2.Fixed:

By here:http://stackoverflow.com/questions/16168361/billing-isbillingsupported-always-unavailable

 

I can now confirm that this is a real problem and has nothing to do with my devices or code. Problem is with Google Play Store and my location in Serbia.

Here are the official details for this issue from Google:

Currently, users in Serbia are reporting that they are no longer able to purchase Android apps on Google Play. We’re working hard to resolve this issue so that users in this country can download paid apps again; however, at this time, there is no workaround to the issue.

If you’re in Serbia and you’re getting errors when trying to purchase, or you don’t see paid apps at all, then you’re experiencing this known issue. We’ll continue to update this page with developments, so check back soon.

Issue first reported on: February 1, 2012

Last updated on: April 10, 2013

Now, my intent was to simply test the app billing and not to buy anything for real, however this was not possible since Play Store always acts like a production environment and has some issues with Serbia which, of course, are affecting developers too.

Resolution

  1. Connect the device to foreign country internet (in my case Belgium) via standard VPN connection
  2. In Location settings, turn off everything (GPS, Wi-Fi assist, ...)
  3. Stop (terminate) Play Store app if it is running
  4. In application settings, clear cache (NOT THE DATA) for the Play Store app
  5. Start Play Store app - it now loads different content aimed for country which VPN is targeting

Once the Play Store is targeting different country, my code started working perfectly.

I wrote this answer to help other people if they run into similar problem - who knows, maybe for some other country, some other time.

Friday, June 20, 2014

J2ee myeclipse develop error log for maven parameter problem

Error:

Unable to parse configuration of mojo org.apache.maven.plugins:maven-resources-plugin:
2.6:copy-resources for parameter directory: Error evaluating the expression '$
{project.parent.basedir}/openmeetings-service/src/main/java' for configuration value
'directory' (org.apache.maven.plugins:maven-resources-plugin:2.6:copy-resources:copy-web-
templates:process-resources)

 

Fixed:

old:

<directory>${project.parent.basedir}/openmeetings-service/src/main/java</directory>

to:

<directory>${project.basedir}/../openmeetings-service/src/main/java</directory>

Thursday, June 19, 2014

J2ee myeclipse develop error log for tomcat 7 deploy problem

Error:

An internal error occurred during: "Launching zkxmeetings on MyEclipse Tomcat 7".
Cannot change deployment state from ERROR to REDEPLOYING.

 

Fixed:

Right click Project –> MyEclipse –> Add and remove project deployments …

in deployments,i found one error icon in the myeclipse tomcat 7 row,so i selected that row,click redeploy.It said:

An internal error occurred during: "Redeploy".
Cannot change deployment state from ERROR to REDEPLOYING.

 

So i click remove.then click ok. close this window.

Then retried debug as myeclipse server application.and select the tomcat 7 plateform.it is ok now!

Sunday, June 1, 2014

amazon linux ami ec2 install nginx + php5.5 +mysql

what

when i used other credit card to register one new account,i want to retest it.

i request one amazon linux ami ec2 t1.micro 64bit + one windows server 2012 64bit instance in west-1c zone.

how

after your get virtual machine,do follow me:

2.1 linux

2.1.1 setup nginx and mysql  and php
# sudo -I
# yum update

# yum install nginx mysql php55 php55-cli php55-common php55-xml php55-bcmath php55-embedded php55-fpm php55-imap php55-intl php55-mbstring php55-mcrypt php55-mysqlnd php55-opcache php55-pdo php55-pecl-apcu

# chkconfig nginx on
# chkconfig php-fpm-5.5 on

# vi /etc/php-fpm.d/www.conf
listen = 127.0.0.1:9000
listen.owner = nginx
listen.group = nginx
listen.mode = 0664

user = nginx
group = nginx

/>vi /etc/nginx/nginx.conf

# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;

pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

resolver_timeout 3s;

#Directive sets timeout period for connection with FastCGI-server. It should be noted that this value can't exceed 75 seconds.
fastcgi_connect_timeout 5s;

#Directive sets the amount of time for upstream to wait for a fastcgi process to send data. Change this directive if you have long running fastcgi processes that do not produce output until they have finished processing. If you are seeing an upstream timed out error in the error log, then increase this parameter to something more appropriate.
fastcgi_read_timeout 40s;

#Directive specifies request timeout to the server. The timeout is calculated between two write operations, not for the whole request. If no data have been written during this period then serve closes the connection.
fastcgi_send_timeout 15s;


fastcgi_buffers 8 32k;
fastcgi_buffer_size 32k;
#fastcgi_busy_buffers_size 256k;
#fastcgi_temp_file_write_size 256k;

#gzip on;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;

# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;

index index.php index.html index.htm;

server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;

#charset koi8-r;
charset utf-8;

#access_log /var/log/nginx/host.access.log main;

include /usr/share/nginx/html/nginx.htaccess;

location / {
}

# redirect server error pages to the static page /40x.html
#
error_page 404 /404.html;
location = /40x.html {
}

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}

location ~ /\.ht {
deny all;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
include fastcgi_params;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# root html;

# location / {
# }
#}


# HTTPS server
#
#server {
# listen 443;
# server_name localhost;
# root html;

# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_timeout 5m;

# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;

# location / {
# }
#}

}

# service php-fpm-5.5 restart
# service nginx restart


2.1.2 file sync with two machine

linux server:
# vi /etc/rsyncd.conf
pid file = /var/run/rsyncd.pid
uid = nobody
gid = nobody
max connections = 3
transfer logging = no

[test]
path = /usr/share/nginx/html
comment = html
list = no
read only = true
use chroot = no
hosts allow = *
hosts deny = *

# rsync --daemon --config /etc/rsyncd.conf


2.1.3 add task
# crontab -e
0 * * * * /usr/bin/php -f /usr/share/nginx/html/s/local/cron.php >> /var/log/pkcron.log



2.2 setup nginx + mysql + php5.5 on windows server 2012

1.download and install wt-nmp with nginx php5.5 mysql
2.edit nginx config:



worker_processes 1;




events {
worker_connections 1024;
}


http {

server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
ssi off;

#Timeouts
client_body_timeout 5;
client_header_timeout 5;
keepalive_timeout 25 25;
send_timeout 15s;
resolver_timeout 3s;

#Directive sets timeout period for connection with FastCGI-server. It should be noted that this value can't exceed 75 seconds.
fastcgi_connect_timeout 5s;

#Directive sets the amount of time for upstream to wait for a fastcgi process to send data. Change this directive if you have long running fastcgi processes that do not produce output until they have finished processing. If you are seeing an upstream timed out error in the error log, then increase this parameter to something more appropriate.
fastcgi_read_timeout 40s;

#Directive specifies request timeout to the server. The timeout is calculated between two write operations, not for the whole request. If no data have been written during this period then serve closes the connection.
fastcgi_send_timeout 15s;


fastcgi_buffers 8 32k;
fastcgi_buffer_size 32k;
#fastcgi_busy_buffers_size 256k;
#fastcgi_temp_file_write_size 256k;

open_file_cache off;


#php max upload limit cannot be larger than this
client_max_body_size 8m;
####client_body_buffer_size 1K;
client_header_buffer_size 1k;
large_client_header_buffers 2 1k;
types_hash_max_size 2048;




include nginx.mimetypes.conf;
default_type text/html;

##
# Logging Settings
##
access_log "c:/wt-nmp/log/nginx_access.log";
error_log "c:/wt-nmp/log/nginx_error.log" warn; #debug or warn
log_not_found on; #enables or disables messages in error_log about files not found on disk.
rewrite_log on;

#Leave this off
fastcgi_intercept_errors off;

gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;

index index.php index.htm index.html;

server {
listen 0.0.0.0:80 default_server;
#listen [::1]:80 ipv6only=on;
server_name news.pkrss.com;

root "c:/wt-nmp/www/";
autoindex on;

allow all;
#allow ::1;
#deny all;

# deny access to .htaccess files, if Apache'
s document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_pass php_farm;
include nginx.fastcgi.conf;
}



include c:/wt-nmp/www/nginx.htaccess;

}



include nginx.phpfarm.conf;



}


3.firewall add nginx.exe and php-fastcgi.exe pass.

4.rsync client
windows client:
download and setup https://www.itefix.no/download/cwRsync_5.3.0_Free.zip
extract to C:\Users\Administrator\Downloads\cwRsync_5.3.0_Free

add system variable path: C:\Users\Administrator\Downloads\cwRsync_5.3.0_Free

ec2 secure group add inbound rule:
All traffic All All sg-6b9bxxxx (default)

edit cwrsync.cmd:
rsync -vzrtopg --progress --delete root@yourserverip::test /cygdrive/c/wt-nmp/www/



3last


thanks reading!

php develop error: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set in

error:

curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set

fixed:

To solve this problem, simply put safe_mode = Off and clear open_base_dir at php.ini file.