!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/symfony/http-foundation/Session/Storage/Handler/   drwxr-xr-x
Free 13.03 GB of 57.97 GB (22.48%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     SessionHandlerFactory.php (3.75 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;

use 
Doctrine\DBAL\DriverManager;
use 
Symfony\Component\Cache\Adapter\AbstractAdapter;
use 
Symfony\Component\Cache\Traits\RedisClusterProxy;
use 
Symfony\Component\Cache\Traits\RedisProxy;

/**
 * @author Nicolas Grekas <p@tchwork.com>
 */
class SessionHandlerFactory
{
    
/**
     * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy|\Memcached|\PDO|string $connection Connection or DSN
     */
    
public static function createHandler($connection): AbstractSessionHandler
    
{
        if (!
\is_string($connection) && !\is_object($connection)) {
            throw new 
\TypeError(sprintf('Argument 1 passed to "%s()" must be a string or a connection object, "%s" given.'__METHOD__get_debug_type($connection)));
        }

        switch (
true) {
            case 
$connection instanceof \Redis:
            case 
$connection instanceof \RedisArray:
            case 
$connection instanceof \RedisCluster:
            case 
$connection instanceof \Predis\ClientInterface:
            case 
$connection instanceof RedisProxy:
            case 
$connection instanceof RedisClusterProxy:
                return new 
RedisSessionHandler($connection);

            case 
$connection instanceof \Memcached:
                return new 
MemcachedSessionHandler($connection);

            case 
$connection instanceof \PDO:
                return new 
PdoSessionHandler($connection);

            case !
\is_string($connection):
                throw new 
\InvalidArgumentException(sprintf('Unsupported Connection: "%s".'get_debug_type($connection)));
            case 
=== strpos($connection'file://'):
                return new 
StrictSessionHandler(new NativeFileSessionHandler(substr($connection7)));

            case 
=== strpos($connection'redis:'):
            case 
=== strpos($connection'rediss:'):
            case 
=== strpos($connection'memcached:'):
                if (!
class_exists(AbstractAdapter::class)) {
                    throw new 
\InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require symfony/cache".'$connection));
                }
                
$handlerClass === strpos($connection'memcached:') ? MemcachedSessionHandler::class : RedisSessionHandler::class;
                
$connection AbstractAdapter::createConnection($connection, ['lazy' => true]);

                return new 
$handlerClass($connection);

            case 
=== strpos($connection'pdo_oci://'):
                if (!
class_exists(DriverManager::class)) {
                    throw new 
\InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require doctrine/dbal".'$connection));
                }
                
$connection DriverManager::getConnection(['url' => $connection])->getWrappedConnection();
                
// no break;

            
case === strpos($connection'mssql://'):
            case 
=== strpos($connection'mysql://'):
            case 
=== strpos($connection'mysql2://'):
            case 
=== strpos($connection'pgsql://'):
            case 
=== strpos($connection'postgres://'):
            case 
=== strpos($connection'postgresql://'):
            case 
=== strpos($connection'sqlsrv://'):
            case 
=== strpos($connection'sqlite://'):
            case 
=== strpos($connection'sqlite3://'):
                return new 
PdoSessionHandler($connection);
        }

        throw new 
\InvalidArgumentException(sprintf('Unsupported Connection: "%s".'$connection));
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0049 ]--