LuisGC

self employed at home

Experience

11,560

0 Best Reply Awards

  • Member Since 5 Months Ago
  • 113 Lessons Completed
  • 1 Favorite

25th March, 2018

LuisGC left a reply on HtmlPurifier Not Working On Server • 2 months ago

here the solution apply chmod -R 0777 HTMLPurifier/DefinitionCache/Serializer

on htmlpurifier/library

http://htmlpurifier.org/download

LuisGC left a reply on HtmlPurifier Not Working On Server • 2 months ago

Hello guys it seems thats a chmod problem y create a new function inside my controller without AJAX and gives me this error

Directory /var/www/appname.com/public_html/appname/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer not writable, please chmod to 777

in Serializer.php (line 297)

@rin4ik @jlrdw

24th March, 2018

LuisGC left a reply on HtmlPurifier Not Working On Server • 2 months ago

this worked in my localhost

require_once DIR.'/../../../htmlpurifier/library/HTMLPurifier.auto.php';

but not on server

i going to reupload all

LuisGC left a reply on HtmlPurifier Not Working On Server • 2 months ago

@rin4ik gives me the same error

LuisGC left a reply on HtmlPurifier Not Working On Server • 2 months ago

i going to try with permissions or include_once

LuisGC left a reply on HtmlPurifier Not Working On Server • 2 months ago

its the standalone version, i changed from ezyang/htmlpurifier to standalone.

LuisGC started a new conversation HtmlPurifier Not Working On Server • 2 months ago

MethodNotAllowedHttpException in RouteCollection.php (line 251)

the following code works on localhost don't know why not on production

<?php

namespace MyBitacore\Http\Controllers;
use MyBitacore\Idea;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Carbon\Carbon;
require_once base_path('htmlpurifier/library/HTMLPurifier.auto.php');

class IdeaController extends Controller
{
    

    public function store(Request $request){
        $title;
        $content;
        if($request->title == ""){
            $title = "pre Idea";
        }else{
            $title = $request->title;
        }

        if($request->title == ""){
            $content = "pre content";
        }else{
            $content = $request->content;
        }

        $idea = New Idea;
        $idea->user_id = Auth::user()->id;
        $idea->title = $title;
        
        // just need to purify the content
        $config = \HTMLPurifier_Config::createDefault();
        $purifier = new \HTMLPurifier($config);
        $clean_html = $purifier->purify($content);
        $idea->content = $clean_html;

        $idea->goal = 0;
        $idea->created_at = Carbon::now();
        $idea->updated_at = Carbon::now();
        $idea->save();

        $ideas = Idea::getUserIdeas();
        $goals = Idea::getUserGoals();

        return view('webparts.Tasks.showTasks',compact("ideas","goals"))->render();
    }

I had proved htmlPurifier on public folder and works.

if i change and not use purifier works fine dont know if is the require_once line or what (Apache server)

28th February, 2018

LuisGC left a reply on When To Use E() Or Purifier? • 3 months ago

Yeah, you are right that is wrong. I don't know why i don't return that haha thanks bro

LuisGC started a new conversation When To Use E() Or Purifier? • 3 months ago

when is better to use e() or Purifier , before or after save, example when u save u do this ´´´ public function store(Request $request) { $post = new Post; $post->user_id = Auth::user()->id;

    $post->post = e($request->user_post);// i use e() or purifier here or in the view
    $post->type_id = $request->user_post_type;
    $post->save();
    
$posts = Post::getPosts();
$view = view('bitacore.posts',compact("posts"))->render();
return response($view);
}

´´´

31st January, 2018

LuisGC left a reply on ¿how Can I Select All Partial Views Using View Composer ? • 4 months ago

yes its written as in the question, i'm clearing code and will try it just when i finish,thank you.

LuisGC started a new conversation ¿how Can I Select All Partial Views Using View Composer ? • 4 months ago

hello everyone someone know if i can do somthing like this i want to select all partial views for example:

group.info group.users group.settings

can i do something like this?

view()->composer('group.*',function($view){
            $view->with('userIsMember',\MyBitacore\Group::checkMembership());
        });

20th January, 2018

LuisGC left a reply on Socialite Refresh Token • 4 months ago

I have same problem i create a facebook and google login but not create a token when login no created_at no updated_at too

12th January, 2018

LuisGC left a reply on CURL Error 60: SSL Certificate Problem: Unable To Get Local Issuer Certificate • 5 months ago

I solve my problem installing this "guzzlehttp/guzzle": "~6.0" composer require guzzlehttp/guzzle:~6.0

11th January, 2018

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.