Whoops, looks like something went wrong.

2/2 ErrorException in geshi.php line 4751: Function create_function() is deprecated (View: /home/admin/api.kalebklein.com/scara/app/views/home/about.blade.php)

  1. in geshi.php line 4751
  2. at CompilerEngine->handleViewException(object(ErrorException), '1') in PhpEngine.php line 44
  3. at PhpEngine->evaluatePath('/home/admin/api.kalebklein.com/scara/app/../storage/cache//2778e6b895253cd69d4f6adf0b1f45b0a0fba252.php', array('__env' => object(Factory), 'errors' => object(Errors))) in CompilerEngine.php line 59
  4. at CompilerEngine->get('/home/admin/api.kalebklein.com/scara/app/views//home/about.blade.php', array('__env' => object(Factory), 'errors' => object(Errors))) in View.php line 149
  5. at View->getContents() in View.php line 120
  6. at View->renderContents() in View.php line 85
  7. at View->render() in View.php line 86
  8. at View->render('home.about') in Controller.php line 157
  9. at Controller->render('home.about') in HomeController.php line 28
  10. at HomeController->about() in Controller.php line 245
  11. at Controller->load(object(Router), '/scara') in Application.php line 140
  12. at Application->registerControllers() in Application.php line 69
  13. at Application->exec() in index.php line 10

1/2 ErrorException in geshi.php line 4751: Function create_function() is deprecated

  1. in geshi.php line 4751
  2. at ExceptionHandler->handleError('8192', 'Function create_function() is deprecated', '/home/admin/api.kalebklein.com/scara/vendor/geshi/geshi/src/geshi.php', '4751', array('tokens' => array('as' => array('' => true)), 'recursed' => false, 'list' => 'as|', 'sub_tokens' => array(), 'token' => 'as', 'close_entry' => true, 'callback_2' => null)) in geshi.php line 4751
  3. at GeSHi->_optimize_regexp_list_tokens_to_string(array('as' => array('' => true))) in geshi.php line 4674
  4. at GeSHi->optimize_regexp_list(array('break', 'case', 'continue', 'default', 'do', 'echo', 'else', 'elseif', 'endfor', 'endforeach', 'endif', 'endswitch', 'endwhile', 'for', 'foreach', 'if', 'include', 'include_once', 'print', 'require', 'require_once', 'return', 'switch', 'throw', 'while', 'yield')) in geshi.php line 1685
  5. at GeSHi->optimize_keyword_group('1') in geshi.php line 2061
  6. at GeSHi->build_parse_cache() in geshi.php line 2200
  7. at GeSHi->parse_code() in CodeDocument.php line 67
  8. at CodeDocument->parse() in KParser.php line 260
  9. at KParser->Pazuzu156\KParser\{closure}(array('[code=php]$router->post('/users/login', 'UsersController@postLogin'); // Post request to login page[/code]', 'php', '$router->post('/users/login', 'UsersController@postLogin'); // Post request to login page'))
  10. at preg_replace_callback('#\[code=([a-zA-Z0-9]+)](.+)\[/code]#sU', object(Closure), '<p>Scara is a simple MVC framework built in PHP. It's influences stem from the likes of Laravel, Symfony, and CakePHP. Scara even uses some of their libraries. Specifically, Laravel's Blade templating engine and Database libraries, along with Symfony's debugging and console libraries.</p> <p>Scara is still a very young framework, and is far from complete. Here's a list of a few things it DOES support:</p> <ul> <li>Sessions (Both PHP session and file sessions utilizing JSON (Cookies are broken. And it's getting annoying. Haha))</li> <li>Databases (Migrations, models, etc. powered by Laravel's database framework)</li> <li>Pagination (The number of results to a query with page numbers)</li> <li>Views/Controllers (For loading pages based on URLs while loading in PHP classes and methods)</li> <li>Models (For getting data from the database easily. Models are table dependent. Soon, they'll have inheritance as well)</li> <li>Advanced routing (Handles GET/POST requests with request bags. Described next)</li> <li>Request handling (Routes with custom URL variables and POST request variable handling)</li> <li>Terminal commands (for quickly creating database migrations/controllers/clearing session/view cache)</li> <li>User authentication (Easy authentication built in. No need to learn user login/session management. It's already built in)</li> <li>Custom application/database configuration scripts that are easy to maintain</li> <li>HTML and Form building classes (for calling a function to generate entire HTML scripts)</li> <li>Form/Request validation (Validating form submissions with ability to translate into any language)</li> <li>"Class Facades" (Class aliases for quick calling of class functions in either views or controllers)</li> <li>String encryption using the BCrypt algorithm)</li> <li>Debugging (Easy to read error/exception handling pages)</li> <li>Custom Error Pages (If you need to set up a custom error page. Like "page not found" or something)</li> <li>As you can tell, it's quite a list, and still growing. It's still not a practical use thing yet, but it's getting there.</li> </ul> <p>Here are a couple more links on it. The API site (describing all callable methods/classes for the core framework), and Github sites for both the application code, and the core framework.</p> Documentation: <a href="http://api.kalebklein.com/scara/docs" target="_blank">http://api.kalebklein.com/scara/docs</a> <sup>[api.kalebklein.com]</sup><br> API Reference: <a href="http://api.kalebklein.com/scara/docs/reference" target="_blank">http://api.kalebklein.com/scara/docs/reference</a> <sup>[api.kalebklein.com]</sup><br> Application Code: <a href="https://github.com/ScaraMVC/Scara" target="_blank">https://github.com/ScaraMVC/Scara</a> <sup>[github.com]</sup><br> Framework Code: <a href="https://github.com/ScaraMVC/Framework" target="_blank">https://github.com/ScaraMVC/Framework</a> <sup>[github.com]</sup><br> <br> Example Route: [code=php]$router->post('/users/login', 'UsersController@postLogin'); // Post request to login page[/code] Example Login: [code=php]... use Scara\Http\Controller; // base controller class use Scara\Routing\Request; // For handling requests (POST in this case) use App\Model\User; // The user model use Validator; // Validator alias (using facade) use Input; // Input alias (for grabbing form input) use Hash; // Hash alias (for hashing passwords) class UsersController extends Controller { public function postLogin(Request $request) { // validation rules. Username is required, and we're checking against the db to make sure it exists // password is required $rules = [ 'username' => 'required|from:users:username', 'password' => 'required' ]; $valid = Validator::make(Input::all(), $rules); // generate validation // check if validation passed if($valid->isValid()) { // attempt to get the user via supplied username $user = User::init()->where('username', '=', Input::get('username'))->first(); // check if hashed password is verifiable against the new hash of the submitted password if(Hash::check(Input::get('password'), $user->password)) { // Attempt to authenticate the user using the built in Authentication $login = Auth::attempt([ 'username' => $user->username, 'password' => $user->password ]); // If successfull, redirect to users home page with success message. Else, there's an error if($login) $this->flash('msg', 'You have successfully logged in!')->redirect('/users'); else $this->flash('msg', 'There was an error logging you in. Please try again later')->redirect('/users/login'); } else { // User supplied incorrect login information. Redirect to login form with input and message $this->flash('msg', 'Invalid username/password combination!')->withInput()->redirect('/users/login'); } } else { // Form validation failed. Redirect to login form with input and message $this->errors($valid)->withInput()->redirect('/users/login'); } } } ...[/code] <p>Creating migrations and controllers is pretty easy. Let's create this controller and a database migration to go with the above code. (The controller command will generate the skeleton code for the controller above)</p> [terminal user=kaleb host=testsites.kalebklein.com theme=bluebird] [command]php cli db:make create_users_table[/command] [response]Created migration: migrations/2016_09_03_042429_create_users_table.php successfully.<br>[/response] [command]php cli controller create UsersController[/command] [response]Controller: UsersController created.[/response] [/terminal] <p>While there's quite a bit to offer already, there's still more to add/remove and still isn't ready for practical use. If you'd like to play around with the framework, by all means, go on! <img src="https://cdn.kalebklein.com/kparser/img/biggrin.gif" alt="bigsmile"></p>') in KParser.php line 266
  11. at KParser->parse('<p>Scara is a simple MVC framework built in PHP. It's influences stem from the likes of Laravel, Symfony, and CakePHP. Scara even uses some of their libraries. Specifically, Laravel's Blade templating engine and Database libraries, along with Symfony's debugging and console libraries.</p> <p>Scara is still a very young framework, and is far from complete. Here's a list of a few things it DOES support:</p> <ul> <li>Sessions (Both PHP session and file sessions utilizing JSON (Cookies are broken. And it's getting annoying. Haha))</li> <li>Databases (Migrations, models, etc. powered by Laravel's database framework)</li> <li>Pagination (The number of results to a query with page numbers)</li> <li>Views/Controllers (For loading pages based on URLs while loading in PHP classes and methods)</li> <li>Models (For getting data from the database easily. Models are table dependent. Soon, they'll have inheritance as well)</li> <li>Advanced routing (Handles GET/POST requests with request bags. Described next)</li> <li>Request handling (Routes with custom URL variables and POST request variable handling)</li> <li>Terminal commands (for quickly creating database migrations/controllers/clearing session/view cache)</li> <li>User authentication (Easy authentication built in. No need to learn user login/session management. It's already built in)</li> <li>Custom application/database configuration scripts that are easy to maintain</li> <li>HTML and Form building classes (for calling a function to generate entire HTML scripts)</li> <li>Form/Request validation (Validating form submissions with ability to translate into any language)</li> <li>"Class Facades" (Class aliases for quick calling of class functions in either views or controllers)</li> <li>String encryption using the BCrypt algorithm)</li> <li>Debugging (Easy to read error/exception handling pages)</li> <li>Custom Error Pages (If you need to set up a custom error page. Like "page not found" or something)</li> <li>As you can tell, it's quite a list, and still growing. It's still not a practical use thing yet, but it's getting there.</li> </ul> <p>Here are a couple more links on it. The API site (describing all callable methods/classes for the core framework), and Github sites for both the application code, and the core framework.</p> Documentation: <a href="http://api.kalebklein.com/scara/docs" target="_blank">http://api.kalebklein.com/scara/docs</a> <sup>[api.kalebklein.com]</sup><br> API Reference: <a href="http://api.kalebklein.com/scara/docs/reference" target="_blank">http://api.kalebklein.com/scara/docs/reference</a> <sup>[api.kalebklein.com]</sup><br> Application Code: <a href="https://github.com/ScaraMVC/Scara" target="_blank">https://github.com/ScaraMVC/Scara</a> <sup>[github.com]</sup><br> Framework Code: <a href="https://github.com/ScaraMVC/Framework" target="_blank">https://github.com/ScaraMVC/Framework</a> <sup>[github.com]</sup><br> <br> Example Route: [code=php]$router->post('/users/login', 'UsersController@postLogin'); // Post request to login page[/code] Example Login: [code=php]... use Scara\Http\Controller; // base controller class use Scara\Routing\Request; // For handling requests (POST in this case) use App\Model\User; // The user model use Validator; // Validator alias (using facade) use Input; // Input alias (for grabbing form input) use Hash; // Hash alias (for hashing passwords) class UsersController extends Controller { public function postLogin(Request $request) { // validation rules. Username is required, and we're checking against the db to make sure it exists // password is required $rules = [ 'username' => 'required|from:users:username', 'password' => 'required' ]; $valid = Validator::make(Input::all(), $rules); // generate validation // check if validation passed if($valid->isValid()) { // attempt to get the user via supplied username $user = User::init()->where('username', '=', Input::get('username'))->first(); // check if hashed password is verifiable against the new hash of the submitted password if(Hash::check(Input::get('password'), $user->password)) { // Attempt to authenticate the user using the built in Authentication $login = Auth::attempt([ 'username' => $user->username, 'password' => $user->password ]); // If successfull, redirect to users home page with success message. Else, there's an error if($login) $this->flash('msg', 'You have successfully logged in!')->redirect('/users'); else $this->flash('msg', 'There was an error logging you in. Please try again later')->redirect('/users/login'); } else { // User supplied incorrect login information. Redirect to login form with input and message $this->flash('msg', 'Invalid username/password combination!')->withInput()->redirect('/users/login'); } } else { // Form validation failed. Redirect to login form with input and message $this->errors($valid)->withInput()->redirect('/users/login'); } } } ...[/code] <p>Creating migrations and controllers is pretty easy. Let's create this controller and a database migration to go with the above code. (The controller command will generate the skeleton code for the controller above)</p> [terminal user=kaleb host=testsites.kalebklein.com theme=bluebird] [command]php cli db:make create_users_table[/command] [response]Created migration: migrations/2016_09_03_042429_create_users_table.php successfully.<br>[/response] [command]php cli controller create UsersController[/command] [response]Controller: UsersController created.[/response] [/terminal] <p>While there's quite a bit to offer already, there's still more to add/remove and still isn't ready for practical use. If you'd like to play around with the framework, by all means, go on! <img src="https://cdn.kalebklein.com/kparser/img/biggrin.gif" alt="bigsmile"></p>') in Facade.php line 55
  12. at Facade::__callStatic('parse', array('[p]Scara is a simple MVC framework built in PHP. It's influences stem from the likes of Laravel, Symfony, and CakePHP. Scara even uses some of their libraries. Specifically, Laravel's Blade templating engine and Database libraries, along with Symfony's debugging and console libraries.[/p] [p]Scara is still a very young framework, and is far from complete. Here's a list of a few things it DOES support:[/p] [ul] [li]Sessions (Both PHP session and file sessions utilizing JSON (Cookies are broken. And it's getting annoying. Haha))[/li] [li]Databases (Migrations, models, etc. powered by Laravel's database framework)[/li] [li]Pagination (The number of results to a query with page numbers)[/li] [li]Views/Controllers (For loading pages based on URLs while loading in PHP classes and methods)[/li] [li]Models (For getting data from the database easily. Models are table dependent. Soon, they'll have inheritance as well)[/li] [li]Advanced routing (Handles GET/POST requests with request bags. Described next)[/li] [li]Request handling (Routes with custom URL variables and POST request variable handling)[/li] [li]Terminal commands (for quickly creating database migrations/controllers/clearing session/view cache)[/li] [li]User authentication (Easy authentication built in. No need to learn user login/session management. It's already built in)[/li] [li]Custom application/database configuration scripts that are easy to maintain[/li] [li]HTML and Form building classes (for calling a function to generate entire HTML scripts)[/li] [li]Form/Request validation (Validating form submissions with ability to translate into any language)[/li] [li]"Class Facades" (Class aliases for quick calling of class functions in either views or controllers)[/li] [li]String encryption using the BCrypt algorithm)[/li] [li]Debugging (Easy to read error/exception handling pages)[/li] [li]Custom Error Pages (If you need to set up a custom error page. Like "page not found" or something)[/li] [li]As you can tell, it's quite a list, and still growing. It's still not a practical use thing yet, but it's getting there.[/li] [/ul] [p]Here are a couple more links on it. The API site (describing all callable methods/classes for the core framework), and Github sites for both the application code, and the core framework.[/p] Documentation: [url=http://api.kalebklein.com/scara/docs newtab]http://api.kalebklein.com/scara/docs[/url][nl] API Reference: [url=http://api.kalebklein.com/scara/docs/reference newtab]http://api.kalebklein.com/scara/docs/reference[/url][nl] Application Code: [url=https://github.com/ScaraMVC/Scara newtab]https://github.com/ScaraMVC/Scara[/url][nl] Framework Code: [url=https://github.com/ScaraMVC/Framework newtab]https://github.com/ScaraMVC/Framework[/url][nl] [nl] Example Route: [code=php]$router->post('/users/login', 'UsersController@postLogin'); // Post request to login page[/code] Example Login: [code=php]... use Scara\Http\Controller; // base controller class use Scara\Routing\Request; // For handling requests (POST in this case) use App\Model\User; // The user model use Validator; // Validator alias (using facade) use Input; // Input alias (for grabbing form input) use Hash; // Hash alias (for hashing passwords) class UsersController extends Controller { public function postLogin(Request $request) { // validation rules. Username is required, and we're checking against the db to make sure it exists // password is required $rules = [ 'username' => 'required|from:users:username', 'password' => 'required' ]; $valid = Validator::make(Input::all(), $rules); // generate validation // check if validation passed if($valid->isValid()) { // attempt to get the user via supplied username $user = User::init()->where('username', '=', Input::get('username'))->first(); // check if hashed password is verifiable against the new hash of the submitted password if(Hash::check(Input::get('password'), $user->password)) { // Attempt to authenticate the user using the built in Authentication $login = Auth::attempt([ 'username' => $user->username, 'password' => $user->password ]); // If successfull, redirect to users home page with success message. Else, there's an error if($login) $this->flash('msg', 'You have successfully logged in!')->redirect('/users'); else $this->flash('msg', 'There was an error logging you in. Please try again later')->redirect('/users/login'); } else { // User supplied incorrect login information. Redirect to login form with input and message $this->flash('msg', 'Invalid username/password combination!')->withInput()->redirect('/users/login'); } } else { // Form validation failed. Redirect to login form with input and message $this->errors($valid)->withInput()->redirect('/users/login'); } } } ...[/code] [p]Creating migrations and controllers is pretty easy. Let's create this controller and a database migration to go with the above code. (The controller command will generate the skeleton code for the controller above)[/p] [terminal user=kaleb host=testsites.kalebklein.com theme=bluebird] [command]php cli db:make create_users_table[/command] [response]Created migration: migrations/2016_09_03_042429_create_users_table.php successfully.<br>[/response] [command]php cli controller create UsersController[/command] [response]Controller: UsersController created.[/response] [/terminal] [p]While there's quite a bit to offer already, there's still more to add/remove and still isn't ready for practical use. If you'd like to play around with the framework, by all means, go on! :bigsmile:[/p]')) in 2778e6b895253cd69d4f6adf0b1f45b0a0fba252.php line 26
  13. at include('/home/admin/api.kalebklein.com/scara/storage/cache/2778e6b895253cd69d4f6adf0b1f45b0a0fba252.php') in PhpEngine.php line 42
  14. at PhpEngine->evaluatePath('/home/admin/api.kalebklein.com/scara/app/../storage/cache//2778e6b895253cd69d4f6adf0b1f45b0a0fba252.php', array('__env' => object(Factory), 'errors' => object(Errors))) in CompilerEngine.php line 59
  15. at CompilerEngine->get('/home/admin/api.kalebklein.com/scara/app/views//home/about.blade.php', array('__env' => object(Factory), 'errors' => object(Errors))) in View.php line 149
  16. at View->getContents() in View.php line 120
  17. at View->renderContents() in View.php line 85
  18. at View->render() in View.php line 86
  19. at View->render('home.about') in Controller.php line 157
  20. at Controller->render('home.about') in HomeController.php line 28
  21. at HomeController->about() in Controller.php line 245
  22. at Controller->load(object(Router), '/scara') in Application.php line 140
  23. at Application->registerControllers() in Application.php line 69
  24. at Application->exec() in index.php line 10