Whoops! There was an error.
Illuminate \ Database \ QueryException
(1040)
Stack frames (26)
25
Illuminate\Database\QueryException
…/vendor/illuminate/database/Connection.php671
24
PDOException
…/vendor/illuminate/database/Connectors/Connector.php70
23
PDO
__construct
…/vendor/illuminate/database/Connectors/Connector.php70
22
Illuminate\Database\Connectors\Connector
createPdoConnection
…/vendor/illuminate/database/Connectors/Connector.php46
21
Illuminate\Database\Connectors\Connector
createConnection
…/vendor/illuminate/database/Connectors/MySqlConnector.php24
20
Illuminate\Database\Connectors\MySqlConnector
connect
…/vendor/illuminate/database/Connectors/ConnectionFactory.php184
19
Illuminate\Database\Connectors\ConnectionFactory
Illuminate\Database\Connectors\{closure}
…/vendor/illuminate/database/Connection.php926
18
call_user_func
…/vendor/illuminate/database/Connection.php926
17
Illuminate\Database\Connection
getPdo
…/vendor/illuminate/database/Connection.php961
16
Illuminate\Database\Connection
getReadPdo
…/vendor/illuminate/database/Connection.php405
15
Illuminate\Database\Connection
getPdoForSelect
…/vendor/illuminate/database/Connection.php331
14
Illuminate\Database\Connection
Illuminate\Database\{closure}
…/vendor/illuminate/database/Connection.php664
13
Illuminate\Database\Connection
runQueryCallback
…/vendor/illuminate/database/Connection.php631
12
Illuminate\Database\Connection
run
…/vendor/illuminate/database/Connection.php339
11
Illuminate\Database\Connection
select
…/vendor/illuminate/database/Query/Builder.php2270
10
Illuminate\Database\Query\Builder
runSelect
…/vendor/illuminate/database/Query/Builder.php2258
9
Illuminate\Database\Query\Builder
Illuminate\Database\Query\{closure}
…/vendor/illuminate/database/Query/Builder.php2753
8
Illuminate\Database\Query\Builder
onceWithColumns
…/vendor/illuminate/database/Query/Builder.php2259
7
Illuminate\Database\Query\Builder
get
…/vendor/illuminate/database/Query/Builder.php2680
6
Illuminate\Database\Query\Builder
aggregate
…/vendor/illuminate/database/Query/Builder.php2608
5
Illuminate\Database\Query\Builder
count
…/vendor/illuminate/database/Eloquent/Builder.php1422
4
Illuminate\Database\Eloquent\Builder
__call
…/template/default/pornstar.php23
3
require
…/src/Controllers/BaseController.php56
2
App\Controllers\BaseController
display
…/src/Controllers/PornstarsController.php80
1
App\Controllers\PornstarsController
showPornstarGalleries
…/src/routes.php65
0
require
…/public/index.php19
/var/www/pornpic/vendor/illuminate/database/Connection.php
* @param array $bindings
* @param \Closure $callback
* @return mixed
*
* @throws \Illuminate\Database\QueryException
*/
protected function runQueryCallback($query, $bindings, Closure $callback)
{
// To execute the statement, we'll simply call the callback, which will actually
// run the SQL against the PDO connection. Then we can calculate the time it
// took to execute and log the query SQL, bindings and time in our memory.
try {
$result = $callback($query, $bindings);
}
// If an exception occurs when attempting to run a query, we'll format the error
// message to include the bindings with SQL, which will make this exception a
// lot more helpful to the developer instead of just the database's errors.
catch (Exception $e) {
throw new QueryException(
$query, $this->prepareBindings($bindings), $e
);
}
return $result;
}
/**
* Log a query in the connection's query log.
*
* @param string $query
* @param array $bindings
* @param float|null $time
* @return void
*/
public function logQuery($query, $bindings, $time = null)
{
$this->event(new QueryExecuted($query, $bindings, $time, $this));
if ($this->loggingQueries) {
/var/www/pornpic/vendor/illuminate/database/Connectors/Connector.php
);
}
}
/**
* Create a new PDO connection instance.
*
* @param string $dsn
* @param string $username
* @param string $password
* @param array $options
* @return \PDO
*/
protected function createPdoConnection($dsn, $username, $password, $options)
{
if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
return new PDOConnection($dsn, $username, $password, $options);
}
return new PDO($dsn, $username, $password, $options);
}
/**
* Determine if the connection is persistent.
*
* @param array $options
* @return bool
*/
protected function isPersistentConnection($options)
{
return isset($options[PDO::ATTR_PERSISTENT]) &&
$options[PDO::ATTR_PERSISTENT];
}
/**
* Handle an exception that occurred during connect execution.
*
* @param \Throwable $e
* @param string $dsn
* @param string $username
Exception message:
SQLSTATE[08004] [1040] Too many connections
/var/www/pornpic/vendor/illuminate/database/Connectors/Connector.php
);
}
}
/**
* Create a new PDO connection instance.
*
* @param string $dsn
* @param string $username
* @param string $password
* @param array $options
* @return \PDO
*/
protected function createPdoConnection($dsn, $username, $password, $options)
{
if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
return new PDOConnection($dsn, $username, $password, $options);
}
return new PDO($dsn, $username, $password, $options);
}
/**
* Determine if the connection is persistent.
*
* @param array $options
* @return bool
*/
protected function isPersistentConnection($options)
{
return isset($options[PDO::ATTR_PERSISTENT]) &&
$options[PDO::ATTR_PERSISTENT];
}
/**
* Handle an exception that occurred during connect execution.
*
* @param \Throwable $e
* @param string $dsn
* @param string $username
/var/www/pornpic/vendor/illuminate/database/Connectors/Connector.php
/**
* Create a new PDO connection.
*
* @param string $dsn
* @param array $config
* @param array $options
* @return \PDO
*
* @throws \Exception
*/
public function createConnection($dsn, array $config, array $options)
{
[$username, $password] = [
$config['username'] ?? null, $config['password'] ?? null,
];
try {
return $this->createPdoConnection(
$dsn, $username, $password, $options
);
} catch (Exception $e) {
return $this->tryAgainIfCausedByLostConnection(
$e, $dsn, $username, $password, $options
);
}
}
/**
* Create a new PDO connection instance.
*
* @param string $dsn
* @param string $username
* @param string $password
* @param array $options
* @return \PDO
*/
protected function createPdoConnection($dsn, $username, $password, $options)
{
if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
/var/www/pornpic/vendor/illuminate/database/Connectors/MySqlConnector.php
use PDO;
class MySqlConnector extends Connector implements ConnectorInterface
{
/**
* Establish a database connection.
*
* @param array $config
* @return \PDO
*/
public function connect(array $config)
{
$dsn = $this->getDsn($config);
$options = $this->getOptions($config);
// We need to grab the PDO options that should be used while making the brand
// new connection instance. The PDO options control various aspects of the
// connection's behavior, and some might be specified by the developers.
$connection = $this->createConnection($dsn, $config, $options);
if (! empty($config['database'])) {
$connection->exec("use `{$config['database']}`;");
}
$this->configureIsolationLevel($connection, $config);
$this->configureEncoding($connection, $config);
// Next, we will check to see if a timezone has been specified in this config
// and if it has we will issue a statement to modify the timezone with the
// database. Setting this DB timezone is an optional configuration item.
$this->configureTimezone($connection, $config);
$this->setModes($connection, $config);
return $connection;
}
/**
/var/www/pornpic/vendor/illuminate/database/Connectors/ConnectionFactory.php
? $this->createPdoResolverWithHosts($config)
: $this->createPdoResolverWithoutHosts($config);
}
/**
* Create a new Closure that resolves to a PDO instance with a specific host or an array of hosts.
*
* @param array $config
* @return \Closure
*
* @throws \PDOException
*/
protected function createPdoResolverWithHosts(array $config)
{
return function () use ($config) {
foreach (Arr::shuffle($hosts = $this->parseHosts($config)) as $key => $host) {
$config['host'] = $host;
try {
return $this->createConnector($config)->connect($config);
} catch (PDOException $e) {
continue;
}
}
throw $e;
};
}
/**
* Parse the hosts configuration item into an array.
*
* @param array $config
* @return array
*
* @throws \InvalidArgumentException
*/
protected function parseHosts(array $config)
{
$hosts = Arr::wrap($config['host']);
/var/www/pornpic/vendor/illuminate/database/Connection.php
$this->doctrineConnection = new DoctrineConnection(array_filter([
'pdo' => $this->getPdo(),
'dbname' => $this->getDatabaseName(),
'driver' => $driver->getName(),
'serverVersion' => $this->getConfig('server_version'),
]), $driver);
}
return $this->doctrineConnection;
}
/**
* Get the current PDO connection.
*
* @return \PDO
*/
public function getPdo()
{
if ($this->pdo instanceof Closure) {
return $this->pdo = call_user_func($this->pdo);
}
return $this->pdo;
}
/**
* Get the current PDO connection parameter without executing any reconnect logic.
*
* @return \PDO|\Closure|null
*/
public function getRawPdo()
{
return $this->pdo;
}
/**
* Get the current PDO connection used for reading.
*
* @return \PDO
*/
/var/www/pornpic/vendor/illuminate/database/Connection.php
$this->doctrineConnection = new DoctrineConnection(array_filter([
'pdo' => $this->getPdo(),
'dbname' => $this->getDatabaseName(),
'driver' => $driver->getName(),
'serverVersion' => $this->getConfig('server_version'),
]), $driver);
}
return $this->doctrineConnection;
}
/**
* Get the current PDO connection.
*
* @return \PDO
*/
public function getPdo()
{
if ($this->pdo instanceof Closure) {
return $this->pdo = call_user_func($this->pdo);
}
return $this->pdo;
}
/**
* Get the current PDO connection parameter without executing any reconnect logic.
*
* @return \PDO|\Closure|null
*/
public function getRawPdo()
{
return $this->pdo;
}
/**
* Get the current PDO connection used for reading.
*
* @return \PDO
*/
/var/www/pornpic/vendor/illuminate/database/Connection.php
/**
* Get the current PDO connection used for reading.
*
* @return \PDO
*/
public function getReadPdo()
{
if ($this->transactions > 0) {
return $this->getPdo();
}
if ($this->recordsModified && $this->getConfig('sticky')) {
return $this->getPdo();
}
if ($this->readPdo instanceof Closure) {
return $this->readPdo = call_user_func($this->readPdo);
}
return $this->readPdo ?: $this->getPdo();
}
/**
* Get the current read PDO connection parameter without executing any reconnect logic.
*
* @return \PDO|\Closure|null
*/
public function getRawReadPdo()
{
return $this->readPdo;
}
/**
* Set the PDO connection.
*
* @param \PDO|\Closure|null $pdo
* @return $this
*/
public function setPdo($pdo)
{
/var/www/pornpic/vendor/illuminate/database/Connection.php
protected function prepared(PDOStatement $statement)
{
$statement->setFetchMode($this->fetchMode);
$this->event(new StatementPrepared(
$this, $statement
));
return $statement;
}
/**
* Get the PDO connection to use for a select query.
*
* @param bool $useReadPdo
* @return \PDO
*/
protected function getPdoForSelect($useReadPdo = true)
{
return $useReadPdo ? $this->getReadPdo() : $this->getPdo();
}
/**
* Run an insert statement against the database.
*
* @param string $query
* @param array $bindings
* @return bool
*/
public function insert($query, $bindings = [])
{
return $this->statement($query, $bindings);
}
/**
* Run an update statement against the database.
*
* @param string $query
* @param array $bindings
* @return int
/var/www/pornpic/vendor/illuminate/database/Connection.php
/**
* Run a select statement against the database.
*
* @param string $query
* @param array $bindings
* @param bool $useReadPdo
* @return array
*/
public function select($query, $bindings = [], $useReadPdo = true)
{
return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
if ($this->pretending()) {
return [];
}
// For select statements, we'll simply execute the query and return an array
// of the database result set. Each element in the array will be a single
// row from the database table, and will either be an array or objects.
$statement = $this->prepared(
$this->getPdoForSelect($useReadPdo)->prepare($query)
);
$this->bindValues($statement, $this->prepareBindings($bindings));
$statement->execute();
return $statement->fetchAll();
});
}
/**
* Run a select statement against the database and returns a generator.
*
* @param string $query
* @param array $bindings
* @param bool $useReadPdo
* @return \Generator
*/
public function cursor($query, $bindings = [], $useReadPdo = true)
{
/var/www/pornpic/vendor/illuminate/database/Connection.php
return $result;
}
/**
* Run a SQL statement.
*
* @param string $query
* @param array $bindings
* @param \Closure $callback
* @return mixed
*
* @throws \Illuminate\Database\QueryException
*/
protected function runQueryCallback($query, $bindings, Closure $callback)
{
// To execute the statement, we'll simply call the callback, which will actually
// run the SQL against the PDO connection. Then we can calculate the time it
// took to execute and log the query SQL, bindings and time in our memory.
try {
$result = $callback($query, $bindings);
}
// If an exception occurs when attempting to run a query, we'll format the error
// message to include the bindings with SQL, which will make this exception a
// lot more helpful to the developer instead of just the database's errors.
catch (Exception $e) {
throw new QueryException(
$query, $this->prepareBindings($bindings), $e
);
}
return $result;
}
/**
* Log a query in the connection's query log.
*
* @param string $query
* @param array $bindings
* @param float|null $time
/var/www/pornpic/vendor/illuminate/database/Connection.php
* Run a SQL statement and log its execution context.
*
* @param string $query
* @param array $bindings
* @param \Closure $callback
* @return mixed
*
* @throws \Illuminate\Database\QueryException
*/
protected function run($query, $bindings, Closure $callback)
{
$this->reconnectIfMissingConnection();
$start = microtime(true);
// Here we will run this query. If an exception occurs we'll determine if it was
// caused by a connection that has been lost. If that is the cause, we'll try
// to re-establish connection and re-run the query with a fresh connection.
try {
$result = $this->runQueryCallback($query, $bindings, $callback);
} catch (QueryException $e) {
$result = $this->handleQueryException(
$e, $query, $bindings, $callback
);
}
// Once we have run the query we will calculate the time that it took to run and
// then log the query, bindings, and execution time so we will report them on
// the event that the developer needs them. We'll log time in milliseconds.
$this->logQuery(
$query, $bindings, $this->getElapsedTime($start)
);
return $result;
}
/**
* Run a SQL statement.
*
* @param string $query
/var/www/pornpic/vendor/illuminate/database/Connection.php
public function select($query, $bindings = [], $useReadPdo = true)
{
return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
if ($this->pretending()) {
return [];
}
// For select statements, we'll simply execute the query and return an array
// of the database result set. Each element in the array will be a single
// row from the database table, and will either be an array or objects.
$statement = $this->prepared(
$this->getPdoForSelect($useReadPdo)->prepare($query)
);
$this->bindValues($statement, $this->prepareBindings($bindings));
$statement->execute();
return $statement->fetchAll();
});
}
/**
* Run a select statement against the database and returns a generator.
*
* @param string $query
* @param array $bindings
* @param bool $useReadPdo
* @return \Generator
*/
public function cursor($query, $bindings = [], $useReadPdo = true)
{
$statement = $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
if ($this->pretending()) {
return [];
}
// First we will create a statement for the query. Then, we will set the fetch
// mode and prepare the bindings for the query. Once that's done we will be
// ready to execute the query against the database and return the cursor.
/var/www/pornpic/vendor/illuminate/database/Query/Builder.php
*
* @param array|string $columns
* @return \Illuminate\Support\Collection
*/
public function get($columns = ['*'])
{
return collect($this->onceWithColumns(Arr::wrap($columns), function () {
return $this->processor->processSelect($this, $this->runSelect());
}));
}
/**
* Run the query as a "select" statement against the connection.
*
* @return array
*/
protected function runSelect()
{
return $this->connection->select(
$this->toSql(), $this->getBindings(), ! $this->useWritePdo
);
}
/**
* Paginate the given query into a simple paginator.
*
* @param int $perPage
* @param array $columns
* @param string $pageName
* @param int|null $page
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
*/
public function paginate($perPage = 15, $columns = ['*'], $pageName = 'page', $page = null)
{
$page = $page ?: Paginator::resolveCurrentPage($pageName);
$total = $this->getCountForPagination();
$results = $total ? $this->forPage($page, $perPage)->get($columns) : collect();
/var/www/pornpic/vendor/illuminate/database/Query/Builder.php
* @param string $column
* @return mixed
*/
public function value($column)
{
$result = (array) $this->first([$column]);
return count($result) > 0 ? reset($result) : null;
}
/**
* Execute the query as a "select" statement.
*
* @param array|string $columns
* @return \Illuminate\Support\Collection
*/
public function get($columns = ['*'])
{
return collect($this->onceWithColumns(Arr::wrap($columns), function () {
return $this->processor->processSelect($this, $this->runSelect());
}));
}
/**
* Run the query as a "select" statement against the connection.
*
* @return array
*/
protected function runSelect()
{
return $this->connection->select(
$this->toSql(), $this->getBindings(), ! $this->useWritePdo
);
}
/**
* Paginate the given query into a simple paginator.
*
* @param int $perPage
* @param array $columns
/var/www/pornpic/vendor/illuminate/database/Query/Builder.php
}
/**
* Execute the given callback while selecting the given columns.
*
* After running the callback, the columns are reset to the original value.
*
* @param array $columns
* @param callable $callback
* @return mixed
*/
protected function onceWithColumns($columns, $callback)
{
$original = $this->columns;
if (is_null($original)) {
$this->columns = $columns;
}
$result = $callback();
$this->columns = $original;
return $result;
}
/**
* Insert a new record into the database.
*
* @param array $values
* @return bool
*/
public function insert(array $values)
{
// Since every insert gets treated like a batch insert, we will make sure the
// bindings are structured in a way that is convenient when building these
// inserts statements by verifying these elements are actually an array.
if (empty($values)) {
return true;
}
/var/www/pornpic/vendor/illuminate/database/Query/Builder.php
* @return mixed
*/
public function value($column)
{
$result = (array) $this->first([$column]);
return count($result) > 0 ? reset($result) : null;
}
/**
* Execute the query as a "select" statement.
*
* @param array|string $columns
* @return \Illuminate\Support\Collection
*/
public function get($columns = ['*'])
{
return collect($this->onceWithColumns(Arr::wrap($columns), function () {
return $this->processor->processSelect($this, $this->runSelect());
}));
}
/**
* Run the query as a "select" statement against the connection.
*
* @return array
*/
protected function runSelect()
{
return $this->connection->select(
$this->toSql(), $this->getBindings(), ! $this->useWritePdo
);
}
/**
* Paginate the given query into a simple paginator.
*
* @param int $perPage
* @param array $columns
* @param string $pageName
/var/www/pornpic/vendor/illuminate/database/Query/Builder.php
* @return mixed
*/
public function average($column)
{
return $this->avg($column);
}
/**
* Execute an aggregate function on the database.
*
* @param string $function
* @param array $columns
* @return mixed
*/
public function aggregate($function, $columns = ['*'])
{
$results = $this->cloneWithout($this->unions ? [] : ['columns'])
->cloneWithoutBindings($this->unions ? [] : ['select'])
->setAggregate($function, $columns)
->get($columns);
if (! $results->isEmpty()) {
return array_change_key_case((array) $results[0])['aggregate'];
}
}
/**
* Execute a numeric aggregate function on the database.
*
* @param string $function
* @param array $columns
* @return float|int
*/
public function numericAggregate($function, $columns = ['*'])
{
$result = $this->aggregate($function, $columns);
// If there is no result, we can obviously just return 0 here. Next, we will check
// if the result is an integer or float. If it is already one of these two data
// types we can just return the result as-is, otherwise we will convert this.
/var/www/pornpic/vendor/illuminate/database/Query/Builder.php
/**
* Execute the given callback if rows exist for the current query.
*
* @param \Closure $callback
* @return mixed
*/
public function doesntExistOr(Closure $callback)
{
return $this->doesntExist() ? true : $callback();
}
/**
* Retrieve the "count" result of the query.
*
* @param string $columns
* @return int
*/
public function count($columns = '*')
{
return (int) $this->aggregate(__FUNCTION__, Arr::wrap($columns));
}
/**
* Retrieve the minimum value of a given column.
*
* @param string $column
* @return mixed
*/
public function min($column)
{
return $this->aggregate(__FUNCTION__, [$column]);
}
/**
* Retrieve the maximum value of a given column.
*
* @param string $column
* @return mixed
*/
public function max($column)
/var/www/pornpic/vendor/illuminate/database/Eloquent/Builder.php
return $this->localMacros[$method](...$parameters);
}
if (static::hasGlobalMacro($method)) {
$callable = static::$macros[$method];
if ($callable instanceof Closure) {
$callable = $callable->bindTo($this, static::class);
}
return $callable(...$parameters);
}
if ($this->hasNamedScope($method)) {
return $this->callNamedScope($method, $parameters);
}
if (in_array($method, $this->passthru)) {
return $this->toBase()->{$method}(...$parameters);
}
$this->forwardCallTo($this->query, $method, $parameters);
return $this;
}
/**
* Dynamically handle calls into the query instance.
*
* @param string $method
* @param array $parameters
* @return mixed
*
* @throws \BadMethodCallException
*/
public static function __callStatic($method, $parameters)
{
if ($method === 'macro') {
static::$macros[$parameters[0]] = $parameters[1];
/var/www/pornpic/template/default/pornstar.php
require 'partials/header.php' ?>
<main>
<div class="container-fluid">
<section class="title">
<h1><?= $this->meta->title ?></h1>
</section>
<section class="grid gallery-grid are-images-unloaded">
<div class="grid-sizer col-6 col-sm-6 col-lg-4 col-xl-2"></div>
<?php if (count($this->data->galleries) > 0): ?>
<?php foreach ($this->data->galleries as $gallery): ?>
<article class="grid-item item col-6 col-sm-6 col-lg-4 col-xl-2">
<a href="/gallery/<?= $gallery->slug ?>" class="item-link" title="<?= $gallery->title ?>">
<span class="item-thumb">
<img src="/media/galleries/<?= $gallery->thumb ?>" alt="<?=$gallery->title?>"/>
</span>
<span class="item-overlay bottom-right"><i
class="fa fa-picture-o"></i> <?= GalleryImage::where('gallery_id', '=', $gallery->gallery_id)->count() ?></span>
<span class="item-overlay bottom-left">
<i class="fa fa-calendar"></i> <?=\Carbon\Carbon::parse($gallery->created_at)->diffForHumans()?>
</span>
</a>
</article>
<?php endforeach; ?>
<?php endif; ?>
</section>
<section>
<?=$this->data->pagination?>
</section>
</div>
</main>
<?php require 'partials/footer.php' ?>
/var/www/pornpic/src/Controllers/BaseController.php
} else {
$this->data = $data;
}
if(empty($meta)) {
$meta = [
'title' => '',
'description' => '',
'keywords' => '',
];
}
if (is_array($meta)) {
$this->meta = (object)$meta;
} else {
$this->meta = $meta;
}
require $this->template . '/' . $templateFile . '.php';
}
public function show404(): void
{
http_response_code('404');
$this->display('errors/404', '', '');
exit;
}
}
/var/www/pornpic/src/Controllers/PornstarsController.php
->limit($this->config->app->max_results)
->skip($this->pagination->start())
->get();
$data = [
'galleries' => $galleries,
'pagination' => $this->pagination->render($items, '/pornstar/'.$foundPornstar->slug.'?', '='),
];
$meta = [
'title' => $foundPornstar->name . ' Porn Pics & Galleries',
'keywords' => $foundPornstar->name.',porn,pics,galleries,hot,solo,nude,hardcore,photos,images',
'description' => 'Pornstar '.$foundPornstar->name.' nude, solo, masturbation, hardcore porn pics and galleries'
];
$result = ['data' => $data, 'meta' => $meta];
$this->memcached->set($cacheKey, $result, 1800); // 30 minutes
}
$this->display('pornstar', $result['data'], $result['meta']);
}
}
/var/www/pornpic/src/routes.php
break;
case 'popular':
(new GalleryController())->showGalleries('popular');
break;
case 'recent':
(new GalleryController())->showGalleries('recent');
break;
case 'channel':
if (isset($_GET['slug'])) {
(new ChannelController())->showGalleries($_GET['slug']);
} else {
(new BaseController())->show404();
}
break;
case (isset($_GET['do'], $_GET['slug']) && $_GET['do'] == 'pornstar'):
(new PornstarsController())->showPOrnstarGalleries($_GET['slug']);
break;
case 'gallery':
if (!empty($_GET['slug'])) {
(new GalleryController())->showGallery($_GET['slug']);
} else {
(new BaseController())->show404();
}
break;
case 'creators':
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', 1);
//error_reporting(E_ALL);
if (isset($_GET['action']) && $_GET['action'] == 'tag') {
(new CreatorsController())->showCreatorsByTag($_GET['search']);
} else {
(new CreatorsController())->showCreators();
}
/var/www/pornpic/public/index.php
<?php
//date_default_timezone_set('America/New_York');
require __DIR__ . '/../bootstrap/start.php';
use Whoops\Run;
use Whoops\Handler\PrettyPageHandler;
use App\System\Config;
$config = new Config();
if($config->app->errors === true) {
$whoops = new Run;
$whoops->pushHandler(new PrettyPageHandler);
$whoops->register();
}
require __DIR__ . '/../src/routes.php';
Environment & details:
Key
Value
do
pornstar
slug
melanie-rios
empty
empty
empty
Key
Value
token
0d054c57cc3a8d93dd6e4cd0b4ee829ea9fdbebe
Key
Value
USER
www-data
HOME
/var/www
HTTP_CONNECTION
Keep-Alive
HTTP_X_FORWARDED_FOR
216.73.216.216
HTTP_X_FORWARDED_PROTO
https
HTTP_CF_VISITOR
{"scheme":"https"}
HTTP_CF_IPCOUNTRY
US
HTTP_CF_CONNECTING_IP
216.73.216.216
HTTP_CDN_LOOP
cloudflare; loops=1
HTTP_USER_AGENT
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_ACCEPT_ENCODING
gzip, br
HTTP_ACCEPT
*/*
HTTP_CF_RAY
9bb0c591ea8fe1db-ORD
HTTP_HOST
www.pornpic.com
REDIRECT_STATUS
200
SERVER_NAME
pornpic.com
SERVER_PORT
443
SERVER_ADDR
66.45.236.82
REMOTE_USER
REMOTE_PORT
11730
REMOTE_ADDR
108.162.216.69
SERVER_SOFTWARE
nginx/1.24.0
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/var/www/pornpic/public
DOCUMENT_URI
/index.php
REQUEST_URI
/pornstar/melanie-rios
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
do=pornstar&slug=melanie-rios
SCRIPT_FILENAME
/var/www/pornpic/public/index.php
PATH_INFO
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1767928543.1108
REQUEST_TIME
1767928543
empty
0. Whoops\Handler\PrettyPageHandler
Illuminate \ Database \ QueryException
(1040)
Stack frames (26)
25
Illuminate\Database\QueryException
…/vendor/illuminate/database/Connection.php671
24
PDOException
…/vendor/illuminate/database/Connectors/Connector.php70
23
PDO
__construct
…/vendor/illuminate/database/Connectors/Connector.php70
22
Illuminate\Database\Connectors\Connector
createPdoConnection
…/vendor/illuminate/database/Connectors/Connector.php46
21
Illuminate\Database\Connectors\Connector
createConnection
…/vendor/illuminate/database/Connectors/MySqlConnector.php24
20
Illuminate\Database\Connectors\MySqlConnector
connect
…/vendor/illuminate/database/Connectors/ConnectionFactory.php184
19
Illuminate\Database\Connectors\ConnectionFactory
Illuminate\Database\Connectors\{closure}
…/vendor/illuminate/database/Connection.php926
18
call_user_func
…/vendor/illuminate/database/Connection.php926
17
Illuminate\Database\Connection
getPdo
…/vendor/illuminate/database/Connection.php961
16
Illuminate\Database\Connection
getReadPdo
…/vendor/illuminate/database/Connection.php405
15
Illuminate\Database\Connection
getPdoForSelect
…/vendor/illuminate/database/Connection.php331
14
Illuminate\Database\Connection
Illuminate\Database\{closure}
…/vendor/illuminate/database/Connection.php664
13
Illuminate\Database\Connection
runQueryCallback
…/vendor/illuminate/database/Connection.php631
12
Illuminate\Database\Connection
run
…/vendor/illuminate/database/Connection.php339
11
Illuminate\Database\Connection
select
…/vendor/illuminate/database/Query/Builder.php2270
10
Illuminate\Database\Query\Builder
runSelect
…/vendor/illuminate/database/Query/Builder.php2258
9
Illuminate\Database\Query\Builder
Illuminate\Database\Query\{closure}
…/vendor/illuminate/database/Query/Builder.php2753
8
Illuminate\Database\Query\Builder
onceWithColumns
…/vendor/illuminate/database/Query/Builder.php2259
7
Illuminate\Database\Query\Builder
get
…/vendor/illuminate/database/Query/Builder.php2680
6
Illuminate\Database\Query\Builder
aggregate
…/vendor/illuminate/database/Query/Builder.php2608
5
Illuminate\Database\Query\Builder
count
…/vendor/illuminate/database/Eloquent/Builder.php1422
4
Illuminate\Database\Eloquent\Builder
__call
…/template/default/pornstar.php23
3
require
…/src/Controllers/BaseController.php56
2
App\Controllers\BaseController
display
…/src/Controllers/PornstarsController.php80
1
App\Controllers\PornstarsController
showPornstarGalleries
…/src/routes.php65
0
require
…/public/index.php19
/var/www/pornpic/vendor/illuminate/database/Connection.php
* @param array $bindings
* @param \Closure $callback
* @return mixed
*
* @throws \Illuminate\Database\QueryException
*/
protected function runQueryCallback($query, $bindings, Closure $callback)
{
// To execute the statement, we'll simply call the callback, which will actually
// run the SQL against the PDO connection. Then we can calculate the time it
// took to execute and log the query SQL, bindings and time in our memory.
try {
$result = $callback($query, $bindings);
}
// If an exception occurs when attempting to run a query, we'll format the error
// message to include the bindings with SQL, which will make this exception a
// lot more helpful to the developer instead of just the database's errors.
catch (Exception $e) {
throw new QueryException(
$query, $this->prepareBindings($bindings), $e
);
}
return $result;
}
/**
* Log a query in the connection's query log.
*
* @param string $query
* @param array $bindings
* @param float|null $time
* @return void
*/
public function logQuery($query, $bindings, $time = null)
{
$this->event(new QueryExecuted($query, $bindings, $time, $this));
if ($this->loggingQueries) {
/var/www/pornpic/vendor/illuminate/database/Connectors/Connector.php
);
}
}
/**
* Create a new PDO connection instance.
*
* @param string $dsn
* @param string $username
* @param string $password
* @param array $options
* @return \PDO
*/
protected function createPdoConnection($dsn, $username, $password, $options)
{
if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
return new PDOConnection($dsn, $username, $password, $options);
}
return new PDO($dsn, $username, $password, $options);
}
/**
* Determine if the connection is persistent.
*
* @param array $options
* @return bool
*/
protected function isPersistentConnection($options)
{
return isset($options[PDO::ATTR_PERSISTENT]) &&
$options[PDO::ATTR_PERSISTENT];
}
/**
* Handle an exception that occurred during connect execution.
*
* @param \Throwable $e
* @param string $dsn
* @param string $username
Exception message:
SQLSTATE[08004] [1040] Too many connections
/var/www/pornpic/vendor/illuminate/database/Connectors/Connector.php
);
}
}
/**
* Create a new PDO connection instance.
*
* @param string $dsn
* @param string $username
* @param string $password
* @param array $options
* @return \PDO
*/
protected function createPdoConnection($dsn, $username, $password, $options)
{
if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
return new PDOConnection($dsn, $username, $password, $options);
}
return new PDO($dsn, $username, $password, $options);
}
/**
* Determine if the connection is persistent.
*
* @param array $options
* @return bool
*/
protected function isPersistentConnection($options)
{
return isset($options[PDO::ATTR_PERSISTENT]) &&
$options[PDO::ATTR_PERSISTENT];
}
/**
* Handle an exception that occurred during connect execution.
*
* @param \Throwable $e
* @param string $dsn
* @param string $username
/var/www/pornpic/vendor/illuminate/database/Connectors/Connector.php
/**
* Create a new PDO connection.
*
* @param string $dsn
* @param array $config
* @param array $options
* @return \PDO
*
* @throws \Exception
*/
public function createConnection($dsn, array $config, array $options)
{
[$username, $password] = [
$config['username'] ?? null, $config['password'] ?? null,
];
try {
return $this->createPdoConnection(
$dsn, $username, $password, $options
);
} catch (Exception $e) {
return $this->tryAgainIfCausedByLostConnection(
$e, $dsn, $username, $password, $options
);
}
}
/**
* Create a new PDO connection instance.
*
* @param string $dsn
* @param string $username
* @param string $password
* @param array $options
* @return \PDO
*/
protected function createPdoConnection($dsn, $username, $password, $options)
{
if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
/var/www/pornpic/vendor/illuminate/database/Connectors/MySqlConnector.php
use PDO;
class MySqlConnector extends Connector implements ConnectorInterface
{
/**
* Establish a database connection.
*
* @param array $config
* @return \PDO
*/
public function connect(array $config)
{
$dsn = $this->getDsn($config);
$options = $this->getOptions($config);
// We need to grab the PDO options that should be used while making the brand
// new connection instance. The PDO options control various aspects of the
// connection's behavior, and some might be specified by the developers.
$connection = $this->createConnection($dsn, $config, $options);
if (! empty($config['database'])) {
$connection->exec("use `{$config['database']}`;");
}
$this->configureIsolationLevel($connection, $config);
$this->configureEncoding($connection, $config);
// Next, we will check to see if a timezone has been specified in this config
// and if it has we will issue a statement to modify the timezone with the
// database. Setting this DB timezone is an optional configuration item.
$this->configureTimezone($connection, $config);
$this->setModes($connection, $config);
return $connection;
}
/**
/var/www/pornpic/vendor/illuminate/database/Connectors/ConnectionFactory.php
? $this->createPdoResolverWithHosts($config)
: $this->createPdoResolverWithoutHosts($config);
}
/**
* Create a new Closure that resolves to a PDO instance with a specific host or an array of hosts.
*
* @param array $config
* @return \Closure
*
* @throws \PDOException
*/
protected function createPdoResolverWithHosts(array $config)
{
return function () use ($config) {
foreach (Arr::shuffle($hosts = $this->parseHosts($config)) as $key => $host) {
$config['host'] = $host;
try {
return $this->createConnector($config)->connect($config);
} catch (PDOException $e) {
continue;
}
}
throw $e;
};
}
/**
* Parse the hosts configuration item into an array.
*
* @param array $config
* @return array
*
* @throws \InvalidArgumentException
*/
protected function parseHosts(array $config)
{
$hosts = Arr::wrap($config['host']);
/var/www/pornpic/vendor/illuminate/database/Connection.php
$this->doctrineConnection = new DoctrineConnection(array_filter([
'pdo' => $this->getPdo(),
'dbname' => $this->getDatabaseName(),
'driver' => $driver->getName(),
'serverVersion' => $this->getConfig('server_version'),
]), $driver);
}
return $this->doctrineConnection;
}
/**
* Get the current PDO connection.
*
* @return \PDO
*/
public function getPdo()
{
if ($this->pdo instanceof Closure) {
return $this->pdo = call_user_func($this->pdo);
}
return $this->pdo;
}
/**
* Get the current PDO connection parameter without executing any reconnect logic.
*
* @return \PDO|\Closure|null
*/
public function getRawPdo()
{
return $this->pdo;
}
/**
* Get the current PDO connection used for reading.
*
* @return \PDO
*/
/var/www/pornpic/vendor/illuminate/database/Connection.php
$this->doctrineConnection = new DoctrineConnection(array_filter([
'pdo' => $this->getPdo(),
'dbname' => $this->getDatabaseName(),
'driver' => $driver->getName(),
'serverVersion' => $this->getConfig('server_version'),
]), $driver);
}
return $this->doctrineConnection;
}
/**
* Get the current PDO connection.
*
* @return \PDO
*/
public function getPdo()
{
if ($this->pdo instanceof Closure) {
return $this->pdo = call_user_func($this->pdo);
}
return $this->pdo;
}
/**
* Get the current PDO connection parameter without executing any reconnect logic.
*
* @return \PDO|\Closure|null
*/
public function getRawPdo()
{
return $this->pdo;
}
/**
* Get the current PDO connection used for reading.
*
* @return \PDO
*/
/var/www/pornpic/vendor/illuminate/database/Connection.php
/**
* Get the current PDO connection used for reading.
*
* @return \PDO
*/
public function getReadPdo()
{
if ($this->transactions > 0) {
return $this->getPdo();
}
if ($this->recordsModified && $this->getConfig('sticky')) {
return $this->getPdo();
}
if ($this->readPdo instanceof Closure) {
return $this->readPdo = call_user_func($this->readPdo);
}
return $this->readPdo ?: $this->getPdo();
}
/**
* Get the current read PDO connection parameter without executing any reconnect logic.
*
* @return \PDO|\Closure|null
*/
public function getRawReadPdo()
{
return $this->readPdo;
}
/**
* Set the PDO connection.
*
* @param \PDO|\Closure|null $pdo
* @return $this
*/
public function setPdo($pdo)
{
/var/www/pornpic/vendor/illuminate/database/Connection.php
protected function prepared(PDOStatement $statement)
{
$statement->setFetchMode($this->fetchMode);
$this->event(new StatementPrepared(
$this, $statement
));
return $statement;
}
/**
* Get the PDO connection to use for a select query.
*
* @param bool $useReadPdo
* @return \PDO
*/
protected function getPdoForSelect($useReadPdo = true)
{
return $useReadPdo ? $this->getReadPdo() : $this->getPdo();
}
/**
* Run an insert statement against the database.
*
* @param string $query
* @param array $bindings
* @return bool
*/
public function insert($query, $bindings = [])
{
return $this->statement($query, $bindings);
}
/**
* Run an update statement against the database.
*
* @param string $query
* @param array $bindings
* @return int
/var/www/pornpic/vendor/illuminate/database/Connection.php
/**
* Run a select statement against the database.
*
* @param string $query
* @param array $bindings
* @param bool $useReadPdo
* @return array
*/
public function select($query, $bindings = [], $useReadPdo = true)
{
return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
if ($this->pretending()) {
return [];
}
// For select statements, we'll simply execute the query and return an array
// of the database result set. Each element in the array will be a single
// row from the database table, and will either be an array or objects.
$statement = $this->prepared(
$this->getPdoForSelect($useReadPdo)->prepare($query)
);
$this->bindValues($statement, $this->prepareBindings($bindings));
$statement->execute();
return $statement->fetchAll();
});
}
/**
* Run a select statement against the database and returns a generator.
*
* @param string $query
* @param array $bindings
* @param bool $useReadPdo
* @return \Generator
*/
public function cursor($query, $bindings = [], $useReadPdo = true)
{
/var/www/pornpic/vendor/illuminate/database/Connection.php
return $result;
}
/**
* Run a SQL statement.
*
* @param string $query
* @param array $bindings
* @param \Closure $callback
* @return mixed
*
* @throws \Illuminate\Database\QueryException
*/
protected function runQueryCallback($query, $bindings, Closure $callback)
{
// To execute the statement, we'll simply call the callback, which will actually
// run the SQL against the PDO connection. Then we can calculate the time it
// took to execute and log the query SQL, bindings and time in our memory.
try {
$result = $callback($query, $bindings);
}
// If an exception occurs when attempting to run a query, we'll format the error
// message to include the bindings with SQL, which will make this exception a
// lot more helpful to the developer instead of just the database's errors.
catch (Exception $e) {
throw new QueryException(
$query, $this->prepareBindings($bindings), $e
);
}
return $result;
}
/**
* Log a query in the connection's query log.
*
* @param string $query
* @param array $bindings
* @param float|null $time
/var/www/pornpic/vendor/illuminate/database/Connection.php
* Run a SQL statement and log its execution context.
*
* @param string $query
* @param array $bindings
* @param \Closure $callback
* @return mixed
*
* @throws \Illuminate\Database\QueryException
*/
protected function run($query, $bindings, Closure $callback)
{
$this->reconnectIfMissingConnection();
$start = microtime(true);
// Here we will run this query. If an exception occurs we'll determine if it was
// caused by a connection that has been lost. If that is the cause, we'll try
// to re-establish connection and re-run the query with a fresh connection.
try {
$result = $this->runQueryCallback($query, $bindings, $callback);
} catch (QueryException $e) {
$result = $this->handleQueryException(
$e, $query, $bindings, $callback
);
}
// Once we have run the query we will calculate the time that it took to run and
// then log the query, bindings, and execution time so we will report them on
// the event that the developer needs them. We'll log time in milliseconds.
$this->logQuery(
$query, $bindings, $this->getElapsedTime($start)
);
return $result;
}
/**
* Run a SQL statement.
*
* @param string $query
/var/www/pornpic/vendor/illuminate/database/Connection.php
public function select($query, $bindings = [], $useReadPdo = true)
{
return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
if ($this->pretending()) {
return [];
}
// For select statements, we'll simply execute the query and return an array
// of the database result set. Each element in the array will be a single
// row from the database table, and will either be an array or objects.
$statement = $this->prepared(
$this->getPdoForSelect($useReadPdo)->prepare($query)
);
$this->bindValues($statement, $this->prepareBindings($bindings));
$statement->execute();
return $statement->fetchAll();
});
}
/**
* Run a select statement against the database and returns a generator.
*
* @param string $query
* @param array $bindings
* @param bool $useReadPdo
* @return \Generator
*/
public function cursor($query, $bindings = [], $useReadPdo = true)
{
$statement = $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
if ($this->pretending()) {
return [];
}
// First we will create a statement for the query. Then, we will set the fetch
// mode and prepare the bindings for the query. Once that's done we will be
// ready to execute the query against the database and return the cursor.
/var/www/pornpic/vendor/illuminate/database/Query/Builder.php
*
* @param array|string $columns
* @return \Illuminate\Support\Collection
*/
public function get($columns = ['*'])
{
return collect($this->onceWithColumns(Arr::wrap($columns), function () {
return $this->processor->processSelect($this, $this->runSelect());
}));
}
/**
* Run the query as a "select" statement against the connection.
*
* @return array
*/
protected function runSelect()
{
return $this->connection->select(
$this->toSql(), $this->getBindings(), ! $this->useWritePdo
);
}
/**
* Paginate the given query into a simple paginator.
*
* @param int $perPage
* @param array $columns
* @param string $pageName
* @param int|null $page
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
*/
public function paginate($perPage = 15, $columns = ['*'], $pageName = 'page', $page = null)
{
$page = $page ?: Paginator::resolveCurrentPage($pageName);
$total = $this->getCountForPagination();
$results = $total ? $this->forPage($page, $perPage)->get($columns) : collect();
/var/www/pornpic/vendor/illuminate/database/Query/Builder.php
* @param string $column
* @return mixed
*/
public function value($column)
{
$result = (array) $this->first([$column]);
return count($result) > 0 ? reset($result) : null;
}
/**
* Execute the query as a "select" statement.
*
* @param array|string $columns
* @return \Illuminate\Support\Collection
*/
public function get($columns = ['*'])
{
return collect($this->onceWithColumns(Arr::wrap($columns), function () {
return $this->processor->processSelect($this, $this->runSelect());
}));
}
/**
* Run the query as a "select" statement against the connection.
*
* @return array
*/
protected function runSelect()
{
return $this->connection->select(
$this->toSql(), $this->getBindings(), ! $this->useWritePdo
);
}
/**
* Paginate the given query into a simple paginator.
*
* @param int $perPage
* @param array $columns
/var/www/pornpic/vendor/illuminate/database/Query/Builder.php
}
/**
* Execute the given callback while selecting the given columns.
*
* After running the callback, the columns are reset to the original value.
*
* @param array $columns
* @param callable $callback
* @return mixed
*/
protected function onceWithColumns($columns, $callback)
{
$original = $this->columns;
if (is_null($original)) {
$this->columns = $columns;
}
$result = $callback();
$this->columns = $original;
return $result;
}
/**
* Insert a new record into the database.
*
* @param array $values
* @return bool
*/
public function insert(array $values)
{
// Since every insert gets treated like a batch insert, we will make sure the
// bindings are structured in a way that is convenient when building these
// inserts statements by verifying these elements are actually an array.
if (empty($values)) {
return true;
}
/var/www/pornpic/vendor/illuminate/database/Query/Builder.php
* @return mixed
*/
public function value($column)
{
$result = (array) $this->first([$column]);
return count($result) > 0 ? reset($result) : null;
}
/**
* Execute the query as a "select" statement.
*
* @param array|string $columns
* @return \Illuminate\Support\Collection
*/
public function get($columns = ['*'])
{
return collect($this->onceWithColumns(Arr::wrap($columns), function () {
return $this->processor->processSelect($this, $this->runSelect());
}));
}
/**
* Run the query as a "select" statement against the connection.
*
* @return array
*/
protected function runSelect()
{
return $this->connection->select(
$this->toSql(), $this->getBindings(), ! $this->useWritePdo
);
}
/**
* Paginate the given query into a simple paginator.
*
* @param int $perPage
* @param array $columns
* @param string $pageName
/var/www/pornpic/vendor/illuminate/database/Query/Builder.php
* @return mixed
*/
public function average($column)
{
return $this->avg($column);
}
/**
* Execute an aggregate function on the database.
*
* @param string $function
* @param array $columns
* @return mixed
*/
public function aggregate($function, $columns = ['*'])
{
$results = $this->cloneWithout($this->unions ? [] : ['columns'])
->cloneWithoutBindings($this->unions ? [] : ['select'])
->setAggregate($function, $columns)
->get($columns);
if (! $results->isEmpty()) {
return array_change_key_case((array) $results[0])['aggregate'];
}
}
/**
* Execute a numeric aggregate function on the database.
*
* @param string $function
* @param array $columns
* @return float|int
*/
public function numericAggregate($function, $columns = ['*'])
{
$result = $this->aggregate($function, $columns);
// If there is no result, we can obviously just return 0 here. Next, we will check
// if the result is an integer or float. If it is already one of these two data
// types we can just return the result as-is, otherwise we will convert this.
/var/www/pornpic/vendor/illuminate/database/Query/Builder.php
/**
* Execute the given callback if rows exist for the current query.
*
* @param \Closure $callback
* @return mixed
*/
public function doesntExistOr(Closure $callback)
{
return $this->doesntExist() ? true : $callback();
}
/**
* Retrieve the "count" result of the query.
*
* @param string $columns
* @return int
*/
public function count($columns = '*')
{
return (int) $this->aggregate(__FUNCTION__, Arr::wrap($columns));
}
/**
* Retrieve the minimum value of a given column.
*
* @param string $column
* @return mixed
*/
public function min($column)
{
return $this->aggregate(__FUNCTION__, [$column]);
}
/**
* Retrieve the maximum value of a given column.
*
* @param string $column
* @return mixed
*/
public function max($column)
/var/www/pornpic/vendor/illuminate/database/Eloquent/Builder.php
return $this->localMacros[$method](...$parameters);
}
if (static::hasGlobalMacro($method)) {
$callable = static::$macros[$method];
if ($callable instanceof Closure) {
$callable = $callable->bindTo($this, static::class);
}
return $callable(...$parameters);
}
if ($this->hasNamedScope($method)) {
return $this->callNamedScope($method, $parameters);
}
if (in_array($method, $this->passthru)) {
return $this->toBase()->{$method}(...$parameters);
}
$this->forwardCallTo($this->query, $method, $parameters);
return $this;
}
/**
* Dynamically handle calls into the query instance.
*
* @param string $method
* @param array $parameters
* @return mixed
*
* @throws \BadMethodCallException
*/
public static function __callStatic($method, $parameters)
{
if ($method === 'macro') {
static::$macros[$parameters[0]] = $parameters[1];
/var/www/pornpic/template/default/pornstar.php
require 'partials/header.php' ?>
<main>
<div class="container-fluid">
<section class="title">
<h1><?= $this->meta->title ?></h1>
</section>
<section class="grid gallery-grid are-images-unloaded">
<div class="grid-sizer col-6 col-sm-6 col-lg-4 col-xl-2"></div>
<?php if (count($this->data->galleries) > 0): ?>
<?php foreach ($this->data->galleries as $gallery): ?>
<article class="grid-item item col-6 col-sm-6 col-lg-4 col-xl-2">
<a href="/gallery/<?= $gallery->slug ?>" class="item-link" title="<?= $gallery->title ?>">
<span class="item-thumb">
<img src="/media/galleries/<?= $gallery->thumb ?>" alt="<?=$gallery->title?>"/>
</span>
<span class="item-overlay bottom-right"><i
class="fa fa-picture-o"></i> <?= GalleryImage::where('gallery_id', '=', $gallery->gallery_id)->count() ?></span>
<span class="item-overlay bottom-left">
<i class="fa fa-calendar"></i> <?=\Carbon\Carbon::parse($gallery->created_at)->diffForHumans()?>
</span>
</a>
</article>
<?php endforeach; ?>
<?php endif; ?>
</section>
<section>
<?=$this->data->pagination?>
</section>
</div>
</main>
<?php require 'partials/footer.php' ?>
/var/www/pornpic/src/Controllers/BaseController.php
} else {
$this->data = $data;
}
if(empty($meta)) {
$meta = [
'title' => '',
'description' => '',
'keywords' => '',
];
}
if (is_array($meta)) {
$this->meta = (object)$meta;
} else {
$this->meta = $meta;
}
require $this->template . '/' . $templateFile . '.php';
}
public function show404(): void
{
http_response_code('404');
$this->display('errors/404', '', '');
exit;
}
}
/var/www/pornpic/src/Controllers/PornstarsController.php
->limit($this->config->app->max_results)
->skip($this->pagination->start())
->get();
$data = [
'galleries' => $galleries,
'pagination' => $this->pagination->render($items, '/pornstar/'.$foundPornstar->slug.'?', '='),
];
$meta = [
'title' => $foundPornstar->name . ' Porn Pics & Galleries',
'keywords' => $foundPornstar->name.',porn,pics,galleries,hot,solo,nude,hardcore,photos,images',
'description' => 'Pornstar '.$foundPornstar->name.' nude, solo, masturbation, hardcore porn pics and galleries'
];
$result = ['data' => $data, 'meta' => $meta];
$this->memcached->set($cacheKey, $result, 1800); // 30 minutes
}
$this->display('pornstar', $result['data'], $result['meta']);
}
}
/var/www/pornpic/src/routes.php
break;
case 'popular':
(new GalleryController())->showGalleries('popular');
break;
case 'recent':
(new GalleryController())->showGalleries('recent');
break;
case 'channel':
if (isset($_GET['slug'])) {
(new ChannelController())->showGalleries($_GET['slug']);
} else {
(new BaseController())->show404();
}
break;
case (isset($_GET['do'], $_GET['slug']) && $_GET['do'] == 'pornstar'):
(new PornstarsController())->showPOrnstarGalleries($_GET['slug']);
break;
case 'gallery':
if (!empty($_GET['slug'])) {
(new GalleryController())->showGallery($_GET['slug']);
} else {
(new BaseController())->show404();
}
break;
case 'creators':
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', 1);
//error_reporting(E_ALL);
if (isset($_GET['action']) && $_GET['action'] == 'tag') {
(new CreatorsController())->showCreatorsByTag($_GET['search']);
} else {
(new CreatorsController())->showCreators();
}
/var/www/pornpic/public/index.php
<?php
//date_default_timezone_set('America/New_York');
require __DIR__ . '/../bootstrap/start.php';
use Whoops\Run;
use Whoops\Handler\PrettyPageHandler;
use App\System\Config;
$config = new Config();
if($config->app->errors === true) {
$whoops = new Run;
$whoops->pushHandler(new PrettyPageHandler);
$whoops->register();
}
require __DIR__ . '/../src/routes.php';
Environment & details:
| Key | Value |
| do | pornstar |
| slug | melanie-rios |
empty
empty
empty
| Key | Value |
| token | 0d054c57cc3a8d93dd6e4cd0b4ee829ea9fdbebe |
| Key | Value |
| USER | www-data |
| HOME | /var/www |
| HTTP_CONNECTION | Keep-Alive |
| HTTP_X_FORWARDED_FOR | 216.73.216.216 |
| HTTP_X_FORWARDED_PROTO | https |
| HTTP_CF_VISITOR | {"scheme":"https"} |
| HTTP_CF_IPCOUNTRY | US |
| HTTP_CF_CONNECTING_IP | 216.73.216.216 |
| HTTP_CDN_LOOP | cloudflare; loops=1 |
| HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected]) |
| HTTP_ACCEPT_ENCODING | gzip, br |
| HTTP_ACCEPT | */* |
| HTTP_CF_RAY | 9bb0c591ea8fe1db-ORD |
| HTTP_HOST | www.pornpic.com |
| REDIRECT_STATUS | 200 |
| SERVER_NAME | pornpic.com |
| SERVER_PORT | 443 |
| SERVER_ADDR | 66.45.236.82 |
| REMOTE_USER | |
| REMOTE_PORT | 11730 |
| REMOTE_ADDR | 108.162.216.69 |
| SERVER_SOFTWARE | nginx/1.24.0 |
| GATEWAY_INTERFACE | CGI/1.1 |
| HTTPS | on |
| REQUEST_SCHEME | https |
| SERVER_PROTOCOL | HTTP/1.1 |
| DOCUMENT_ROOT | /var/www/pornpic/public |
| DOCUMENT_URI | /index.php |
| REQUEST_URI | /pornstar/melanie-rios |
| SCRIPT_NAME | /index.php |
| CONTENT_LENGTH | |
| CONTENT_TYPE | |
| REQUEST_METHOD | GET |
| QUERY_STRING | do=pornstar&slug=melanie-rios |
| SCRIPT_FILENAME | /var/www/pornpic/public/index.php |
| PATH_INFO | |
| FCGI_ROLE | RESPONDER |
| PHP_SELF | /index.php |
| REQUEST_TIME_FLOAT | 1767928543.1108 |
| REQUEST_TIME | 1767928543 |
empty
0. Whoops\Handler\PrettyPageHandler
