这篇文章主要围绕php–Drupal白色死亡屏幕–没有错误错误打开和白色死亡人物展开,旨在为您提供一份详细的参考资料。我们将全面介绍php–Drupal白色死亡屏幕–没有错误错误打开的优缺点,解答白色
这篇文章主要围绕php – Drupal白色死亡屏幕 – 没有错误错误打开和白色死亡人物展开,旨在为您提供一份详细的参考资料。我们将全面介绍php – Drupal白色死亡屏幕 – 没有错误错误打开的优缺点,解答白色死亡人物的相关问题,同时也会为您带来Android 2.3中出现“没有对等证书”错误,但4中没有错误、Android Map是纯白色屏幕-没有错误、Android – 错误打开跟踪文件:没有这样的文件或目录(2)、c – 为什么此模板在Xcode中有错误而在Visual Studio中没有错误?的实用方法。
本文目录一览:- php – Drupal白色死亡屏幕 – 没有错误错误打开(白色死亡人物)
- Android 2.3中出现“没有对等证书”错误,但4中没有错误
- Android Map是纯白色屏幕-没有错误
- Android – 错误打开跟踪文件:没有这样的文件或目录(2)
- c – 为什么此模板在Xcode中有错误而在Visual Studio中没有错误?
php – Drupal白色死亡屏幕 – 没有错误错误打开(白色死亡人物)
我在Drupal中打开了所有错误(error_reporting(-1)),但由于某些原因,大多数错误都没有在日志或屏幕上显示.我可以通过简单地将函数名称更改为其他内容来复制问题,我希望看到函数不存在错误,但我只是得到一个白色屏幕.我试过在Drupal框架之外复制它,但我不能 – 因此它让我相信它不是我的PHP设置(Zend Server / Apache2 / PHP / Windows),而是在Drupal的某个地方……
任何人的想法?
解决方法:
我知道这可能会迟到,但它对我有所帮助.大多数时候模块会导致WSOD,我不能只是禁用模块来测试它是什么,因为我可能在这个过程中丢失了数据.我所做的是在module.inc中编辑这个函数
function module_invoke_all($hook) {
$args = func_get_args();
// Remove $hook from the arguments.
unset($args[0]);
$return = array();
foreach (module_implements($hook) as $module) {
print "Starting loading $module <br />";
$function = $module . '_' . $hook;
if (function_exists($function)) {
$result = call_user_func_array($function, $args);
if (isset($result) && is_array($result)) {
$return = array_merge_recursive($return, $result);
}
elseif (isset($result)) {
$return[] = $result;
}
}
print "Finished loading $module <br />";
}
return $return;
}
我在上面的代码中添加了这两个打印语句,然后刷新页面,没有到达“Finish loading $module”语句的模块是有问题的那个…它在我的案例中是开发的.
找到模块后,您可以进入系统表并查找该模块,将其设置为status = 0和bootstrap = 0或运行查询:
UPDATE system SET status = 0, bootstrap = 0 WHERE name = 'module_name' LIMIT 1
参考:Debugging Drupal White Screen of Death (WSOD)
Android 2.3中出现“没有对等证书”错误,但4中没有错误
将其插入"javax.net.ssl.SSLPeerUnverifiedException: No peer certificate error"
运行Android 2.3的模拟器中,而不是在4中运行。在4中,它可以完美运行。我正在尝试通过https连接到实时服务器。它使用有效的Thawte证书,在所有浏览器以及Android 3和4中均可正常运行。
如果有人有代码帮助,请谢谢。另外,如果有人对安全解决方法有任何建议,我将不胜感激。我仍在学习,并且已经在这个问题上解决了一个星期。它必须结束,所以我可以继续工作和学习。嗯
这是HttpCLient代码,由Antoine Hauck提供(http://blog.antoine.li/2010/10/22/android-trusting-ssl-certificates/):
import java.io.InputStream; import java.security.KeyStore; import java.security.cert.CertificateException; import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; import javax.security.cert.X509Certificate; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.scheme.PlainSocketFactory; import org.apache.http.conn.scheme.Scheme; import org.apache.http.conn.scheme.SchemeRegistry; import org.apache.http.conn.ssl.SSLSocketFactory; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.impl.conn.SingleClientConnManager; import android.content.Context; public class MyHttpClient extends DefaultHttpClient { final Context context; public MyHttpClient(Context context) { this.context = context; } @Override protected ClientConnectionManager createClientConnectionManager() { SchemeRegistry registry = new SchemeRegistry(); registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80)); // Register for port 443 our SSLSocketFactory with our keystore // to the ConnectionManager registry.register(new Scheme("https", newSslSocketFactory(), 443)); return new SingleClientConnManager(getParams(), registry); } private SSLSocketFactory newSslSocketFactory() { try { // Get an instance of the Bouncy Castle KeyStore format KeyStore trusted = KeyStore.getInstance("BKS"); // Get the raw resource, which contains the keystore with // your trusted certificates (root and any intermediate certs) InputStream in = context.getResources().openRawResource(R.raw.my_cert); try { // Initialize the keystore with the provided trusted certificates // Also provide the password of the keystore trusted.load(in, "my_pass".toCharArray()); } finally { in.close(); } // Pass the keystore to the SSLSocketFactory. The factory is responsible // for the verification of the server certificate. SSLSocketFactory sf = new SSLSocketFactory(trusted); // Hostname verification from certificate // http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html#d4e506 sf.setHostnameVerifier(SSLSocketFactory.STRICT_HOSTNAME_VERIFIER); return sf; } catch (Exception e) { throw new AssertionError(e); } }}
这是实例化它的代码:
DefaultHttpClient client = new MyHttpClient(getApplicationContext()); HttpPost post = new HttpPost(server_login_url); List <NameValuePair> parameters = new ArrayList <NameValuePair>(); parameters.add(new BasicNameValuePair("username", user)); parameters.add(new BasicNameValuePair("password", pass)); try { post.setEntity(new UrlEncodedFormEntity(parameters, HTTP.UTF_8)); } catch (UnsupportedEncodingException e2) { // TODO Auto-generated catch block Log.d(DEBUG_TAG, "in UnsupportedEncodingException - " + e2.getMessage()); e2.printStackTrace(); } // Execute the GET call and obtain the response HttpResponse getResponse = null; try { getResponse = client.execute(post); } catch (ClientProtocolException e) { // TODO Auto-generated catch block // Toast.makeText(getBaseContext(),message,Toast.LENGTH_LONG).show(); Log.d(DEBUG_TAG, "in ClientProtocolException - " + e.getMessage()); } catch (IOException e) { // TODO Auto-generated catch block // Toast.makeText(getBaseContext(),message,Toast.LENGTH_LONG).show(); Log.d(DEBUG_TAG, "in client.execute IOException - " + e.getMessage()); e.printStackTrace(); }
该错误被捕获在IOException块中。这是堆栈:
javax.net.ssl.SSLPeerUnverifiedException: No peer certificateorg.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:258)org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:164)org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359)org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)org.ffb.tools.SplashActivity$LoginTask.makeConnection(SplashActivity.java:506)org.ffb.tools.SplashActivity$LoginTask.doLogin(SplashActivity.java:451)org.ffb.tools.SplashActivity$LoginTask.doInBackground(SplashActivity.java:439)org.ffb.tools.SplashActivity$LoginTask.doInBackground(SplashActivity.java:1)android.os.AsyncTask$2.call(AsyncTask.java:185)java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)java.util.concurrent.FutureTask.run(FutureTask.java:138)java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)java.lang.Thread.run(Thread.java:1019)
这是链顺序(来自openssl命令):
我认为这条链看起来不错。
i:/C=US/O=Thawte, Inc./OU=Domain Validated SSL/CN=Thawte DV SSL CA 1 s:/C=US/O=Thawte, Inc./OU=Domain Validated SSL/CN=Thawte DV SSL CA i:/C=US/O=thawte, Inc./OU=Certification Services Division/OU=(c) 2006 thawte, Inc. - For authorized use only/CN=thawte Primary Root CA 2 s:/C=US/O=thawte, Inc./OU=Certification Services Division/OU=(c) 2006 thawte, Inc. - For authorized use only/CN=thawte Primary Root CA i:/C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/emailAddress=premium-server@thawte.com
答案1
小编典典当我调试类似问题时,此线程确实很有帮助。
摘要Android 2.3 HTTPS / SSL清单:
- 如果您的CA位于Android 2.3的受信任CA列表中(而Thawte位于),则无需在应用程序中包含证书。
- Android 2.3不支持服务器名称指示,因此,如果您的服务器依赖它进行SSL握手,则Android可能无法获取您期望的证书。
您在服务器上是否安装了证书链,订购顺序正确吗?大多数浏览器会处理乱码证书链,但Android 2.3不会。上面提到的线程中bdc的答案描述了如何使用“ openssl s_client -connect yourserver.com:443”来检查SSL证书和链的有效性。
挖掘底部抽屉中的旧2.3设备时,请确保在停电时间过长后正确设置日期和时间。
Android Map是纯白色屏幕-没有错误
XML(activity_maptest.xml):
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment"/>
Java(Maptest.java):
package com.example.app;
import android.app.Activity;
import android.os.Bundle;
public class Maptest extends Activity {
public class MapActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maptest);
}
}
}
表现:
<uses-feature
android:glEsversion="0x00020000"
android:required="true" />
.
.
.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application
android:allowBackup="true"
android:icon="@drawable/icon_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light.DarkActionBar" >
.
.
.
<activity
android:name="com.example.app.Maptest"
android:label="@string/title_activity_maptest" >
</activity>
<Meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="MY ACTUAL KEY" />
</application>
当此页面加载到我的页面时,仅是白色,LogCat没有错误.我正在遵循Google指南:https://developers.google.com/maps/documentation/android/start,但看来我做错了什么?
解决方法:
您在活动中有一个活动.尝试删除其中之一
Android – 错误打开跟踪文件:没有这样的文件或目录(2)
我正在开发一个Android应用程序,其中一部分是检查手机的wifi是否启用.
我直接在手机上运行应用程序.这些是一些错误
error opening trace file: No such file or directory (2)
Refusing to reopen boot DEX 'system/framework/hwframework.jar'
这是我的清单文件
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.demo"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.demo.Test_allActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
我是android的新手,无法找出解决方案.谢谢你的提前
解决方法:
我想你需要清单中的ACCESS_NETWORK_STATE.
c – 为什么此模板在Xcode中有错误而在Visual Studio中没有错误?
第一个版本在Xcode中报告错误,但在Visual Studio中报告错误.
// Version 1: Error in Xcode,but not Visual Studio template<typename LengthT,typename VertexT> int MyGraphAlgorithm(...arguments omitted...) { using namespace boost; typedef property<vertex_distance_t,LengthT> VertextProperties_t; typedef adjacency_list<vecS,vecS,directedS,VertextProperties_t> Graph; // In next line Xcode reports: "error: expected `;' before 'vertexInitial'" graph_traits<Graph>::vertex_descriptor vertexInitial(100); }
第二个没有错误.不同之处在于模板化typedef中模板参数LengthT的使用.
// Version 2: No error in Xcode or Visual Studio template<typename LengthT,typename VertexT> int MyGraphAlgorithm(...arguments omitted...) { using namespace boost; // In the following line,LengthT has been changed to int typedef property<vertex_distance_t,int> VertextProperties_t; typedef adjacency_list<vecS,VertextProperties_t> Graph; graph_traits<Graph>::vertex_descriptor vertexInitial(100); }
解决方法
typename graph_traits<Graph>::vertex_descriptor
编译器不够聪明,无法自行解决的原因是因为LengthT是模板参数.它可以是任何东西,因此在模板声明时,编译器无法判断它的值是什么,因此typedef是不明确的.
今天关于php – Drupal白色死亡屏幕 – 没有错误错误打开和白色死亡人物的讲解已经结束,谢谢您的阅读,如果想了解更多关于Android 2.3中出现“没有对等证书”错误,但4中没有错误、Android Map是纯白色屏幕-没有错误、Android – 错误打开跟踪文件:没有这样的文件或目录(2)、c – 为什么此模板在Xcode中有错误而在Visual Studio中没有错误?的相关知识,请在本站搜索。
本文标签: