This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
App::uses('Controller', 'Controller'); | |
class AppController extends Controller { | |
public $components = array('Session', 'Auth'); | |
public function isPrefix($prefix) { | |
return isset($this->request->params['prefix']) && $this->request->params['prefix'] == $prefix; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Inclui nossa classe com os métodos de segurança | |
require_once "Seguranca.php"; | |
// Dados vindos do formulário | |
$usuario = $_POST['usuario']; | |
$senha = $_POST['senha']; | |
// Autentica o usuário | |
if ($Seguranca->login($usuario, $senha)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="post" action="valida.php"> | |
<label for="usuario">Usuário</label> | |
<input type="text" name="usuario" id="usuario" /> | |
<label for="senha">Senha</label> | |
<input type="password" name="senha" id="senha" /> | |
<input type="submit" value="Entrar" /> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS `usuarios` ( | |
`id` INT(10) unsigned NOT NULL AUTO_INCREMENT, | |
`nome` VARCHAR(100) NOT NULL, | |
`usuario` VARCHAR(50) NOT NULL, | |
`senha` CHAR(40) NOT NULL, | |
PRIMARY KEY (`id`) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ab -kc 20 -t 60 http://demo.magentocommerce.com/sony-vaio-11-1-notebook-pc.html/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking demo.magentocommerce.com (be patient) | |
Finished 433 requests | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ab -kc 20 -t 60 http://demo-store.prestashop.com/en/evening-dresses/27-visconti-co-evening-dress.html | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking demo-store.prestashop.com (be patient) | |
Finished 220 requests | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ab -kc 20 -t 60 http://super-boutique-3116.spree.mx/products/ruby-baseball-jersey | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking super-boutique-3116.spree.mx (be patient) | |
Finished 641 requests | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php -v | |
PHP 5.4.13 (cli) (built: Apr 12 2013 14:04:31) | |
Copyright (c) 1997-2013 The PHP Group | |
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies | |
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install php54-memcached php54-apc php54-xdebug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew tap homebrew/dupes | |
brew tap josegonzalez/homebrew-php | |
brew install php54 --with-mysql --wihout-apache |