小编Dan*_*nai的帖子

如何在aws ec2 apache2 ubuntu上安装ssl证书?

你能介绍一下"如何在aws ec2 apache2 ubuntu上安装SSL证书"的在线指南吗?亚马逊官方的https/ssl证书文件是对野鹅追逐的疯狂追逐.这些说明对于你可能会做的千种方式中的每一种都非常强大,他们不会说出如何实际操作.遵循指示就像试图在弹球机中穿针.

我有一个在Ubuntu 14上运行Apache2的EC2实例.我已经有了一个域名.

ubuntu ssl apache2 amazon-ec2 amazon-web-services

7
推荐指数
1
解决办法
2万
查看次数

Facebook - 无效范围:manage_pages

任何人都可以帮助我理解为什么我在尝试使用 Facebook SDK 登录按钮时会收到此错误?

无效范围:manage_pages。此消息仅向开发人员显示。您的应用程序的用户将忽略这些权限(如果存在)。请阅读有效权限的文档:https : //developers.facebook.com/docs/facebook-login/permissions

这是 HTML:

<fb:login-button scope="manage_pages" onlogin="checkLoginState();"></fb:login-button>
Run Code Online (Sandbox Code Playgroud)

这是JS:

    // This is called with the results from from FB.getLoginStatus().
  function statusChangeCallback(response) {
    console.log('statusChangeCallback');
    console.log(response);
    window.facebook = {user_data: response};
    // The response object is returned with a status field that lets the
    // app know the current login status of the person.
    // Full docs on the response object can be found in the documentation
    // for FB.getLoginStatus().
    if (response.status === 'connected') {
      // Logged into …
Run Code Online (Sandbox Code Playgroud)

javascript facebook facebook-graph-api facebook-javascript-sdk

7
推荐指数
1
解决办法
2万
查看次数

Laravel - 按用户ID强制注销特定用户

我使用Laravel 5.2.

我想知道如何强制用户通过id注销?

我正在构建一个管理面板,其中包含禁用当前登录到Web应用程序的特定用户的选项.

Laravel为当前用户提供了此选项:

Auth::logout()
Run Code Online (Sandbox Code Playgroud)

但我不想退出当前用户,因为我是Auth用户.我需要通过它强制注销特定用户id.就像我们登录具有特定ID的用户一样:

Auth::loginUsingId($id);
Run Code Online (Sandbox Code Playgroud)

有这样的事情:

Auth::logoutUsingId($id);
Run Code Online (Sandbox Code Playgroud)

php authentication laravel laravel-5

5
推荐指数
2
解决办法
5474
查看次数

laravel 5-如何向现有外键添加-&gt; index()

框架:Laravel 5.2数据库:MySQL PHP:7.0

我有表“ poptins”:

    Schema::create('poptins', function (Blueprint $table) {
        $table->string('id')->primary()->index();
        $table->string('ab_test_parent_id')->nullable();
        $table->string('cloned_parent_id')->nullable();
        $table->timestamps();
    });
Run Code Online (Sandbox Code Playgroud)

和表“转换”:

    Schema::create('conversions', function (Blueprint $table) {
        $table->string('id')->primary()->index();
        $table->integer('users')->default(null);
        $table->string('name',256)->default(null);
        $table->string('poptin_id');
        $table->foreign('poptin_id')->references('id')->on('poptins')->onDelete('cascade')->onUpdate('cascade');
        $table->timestamps();
    });
Run Code Online (Sandbox Code Playgroud)

我在“转换”表中设置了外键(poptin_id)。现在是否意味着外键(poptin_id)也是索引?如果不是...我需要做些什么才能使其成为索引?

谢谢?

php mysql sql laravel laravel-5

3
推荐指数
4
解决办法
4802
查看次数

gulp serve - 错误:找不到模块'./build/bindings/encode.node'

尝试在我的AWS EC2 ubuntu服务器上安装这里angular-fullstack中的angular-fullstack框架

运行后出现此错误'gulp serve':

module.js:471 throw err;
Error: Cannot find module './build/bindings/encode.node' at ...
Run Code Online (Sandbox Code Playgroud)

在我的Mac OS上一切正常.我只在我的ubuntu服务器上收到此错误.

救命?请!!!

一些信息:

操作系统:Ubuntu 16.04

ubuntu node.js mean-stack gulp angular-fullstack

1
推荐指数
1
解决办法
1399
查看次数

Laravel 5.2 - phpunit - 无法修改标头信息 - 标头已发送

你能帮我在我本地的宅基地/流浪机器上解决这个问题吗?

当我运行命令时:PHPUnit

我得到这个结果

PHPUnit 4.8.36 由 Sebastian Bergmann 和贡献者编写。

E
时间:1.97 秒,内存:6.00MB

                                                                                                               There was 1 error:                                                    

                                                                                                               1) ExampleTest::testBasicExample                                      
Run Code Online (Sandbox Code Playgroud)

无法修改标头信息 - 标头已发送(输出开始于 /home/vagrant/Code/Project/vendor/php unit/phpunit/src/Util/Printer.php:134)

                                                                                                               /home/vagrant/Code/Project/bootstrap/app.php:4                         
Run Code Online (Sandbox Code Playgroud)

/home/vagrant/Code/Poptin/tests/TestCase.php:20
/home/vagrant/Code/Project/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:85 /home/vagrant/Code /Project/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:64

请帮忙!我什么都试过了!!!

测试用例文件

<?php

class TestCase extends Illuminate\Foundation\Testing\TestCase
{
    /**
     * The base URL to use while testing the application.
     *
     * @var string
     */
    //protected $baseUrl = 'http://localhost';
    protected $baseUrl = 'http://192.168.10.10';

    /**
     * Creates the application.
     *
     * @return \Illuminate\Foundation\Application
     */
    public function createApplication()
    {
        $app = require __DIR__.'/../bootstrap/app.php';

        $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();

        return …
Run Code Online (Sandbox Code Playgroud)

php phpunit laravel laravel-5 homestead

1
推荐指数
2
解决办法
3147
查看次数