UnexpectedValueException
The stream or file "/www/wwwroot/trouvetonalternance/storage/logs/laravel-2024-03-28.log" could not be opened: chmod(): Op�ration non permise UnexpectedValueException thrown with message "The stream or file "/www/wwwroot/trouvetonalternance/storage/logs/laravel-2024-03-28.log" could not be opened: chmod(): Op�ration non permise" Stacktrace: #11 UnexpectedValueException in /www/wwwroot/trouvetonalternance/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:108 #10 Monolog\Handler\StreamHandler:write in /www/wwwroot/trouvetonalternance/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php:119 #9 Monolog\Handler\RotatingFileHandler:write in /www/wwwroot/trouvetonalternance/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:39 #8 Monolog\Handler\AbstractProcessingHandler:handle in /www/wwwroot/trouvetonalternance/vendor/monolog/monolog/src/Monolog/Logger.php:344 #7 Monolog\Logger:addRecord in /www/wwwroot/trouvetonalternance/vendor/monolog/monolog/src/Monolog/Logger.php:707 #6 Monolog\Logger:error in /www/wwwroot/trouvetonalternance/vendor/laravel/framework/src/Illuminate/Log/Logger.php:176 #5 Illuminate\Log\Logger:writeLog in /www/wwwroot/trouvetonalternance/vendor/laravel/framework/src/Illuminate/Log/Logger.php:87 #4 Illuminate\Log\Logger:error in /www/wwwroot/trouvetonalternance/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:498 #3 Illuminate\Log\LogManager:error in /www/wwwroot/trouvetonalternance/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:114 #2 Illuminate\Foundation\Exceptions\Handler:report in /www/wwwroot/trouvetonalternance/app/Exceptions/Handler.php:107 #1 App\Exceptions\Handler:report in /www/wwwroot/trouvetonalternance/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:81 #0 Illuminate\Foundation\Bootstrap\HandleExceptions:handleException in [internal]:0
11
UnexpectedValueException
/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php108
10
Monolog\Handler\StreamHandler write
/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php119
9
Monolog\Handler\RotatingFileHandler write
/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php39
8
Monolog\Handler\AbstractProcessingHandler handle
/vendor/monolog/monolog/src/Monolog/Logger.php344
7
Monolog\Logger addRecord
/vendor/monolog/monolog/src/Monolog/Logger.php707
6
Monolog\Logger error
/vendor/laravel/framework/src/Illuminate/Log/Logger.php176
5
Illuminate\Log\Logger writeLog
/vendor/laravel/framework/src/Illuminate/Log/Logger.php87
4
Illuminate\Log\Logger error
/vendor/laravel/framework/src/Illuminate/Log/LogManager.php498
3
Illuminate\Log\LogManager error
/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php114
2
Illuminate\Foundation\Exceptions\Handler report
/app/Exceptions/Handler.php107
1
App\Exceptions\Handler report
/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php81
0
Illuminate\Foundation\Bootstrap\HandleExceptions handleException
[internal]0
/www/wwwroot/trouvetonalternance/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
    /**
     * {@inheritdoc}
     */
    protected function write(array $record)
    {
        if (!is_resource($this->stream)) {
            if (null === $this->url || '' === $this->url) {
                throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().');
            }
            $this->createDir();
            $this->errorMessage = null;
            set_error_handler(array($this, 'customErrorHandler'));
            $this->stream = fopen($this->url, 'a');
            if ($this->filePermission !== null) {
                @chmod($this->url, $this->filePermission);
            }
            restore_error_handler();
            if (!is_resource($this->stream)) {
                $this->stream = null;
                throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: '.$this->errorMessage, $this->url));
            }
        }
 
        if ($this->useLocking) {
            // ignoring errors here, there's not much we can do about them
            flock($this->stream, LOCK_EX);
        }
 
        $this->streamWrite($this->stream, $record);
 
        if ($this->useLocking) {
            flock($this->stream, LOCK_UN);
        }
    }
 
    /**
     * Write to stream
     * @param resource $stream
     * @param array $record
     */
Arguments
  1. "The stream or file "/www/wwwroot/trouvetonalternance/storage/logs/laravel-2024-03-28.log" could not be opened: chmod(): Op�ration non permise"
    
/www/wwwroot/trouvetonalternance/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php
        $this->url = $this->getTimedFilename();
        $this->close();
    }
 
    /**
     * {@inheritdoc}
     */
    protected function write(array $record)
    {
        // on the first record written, if the log is new, we should rotate (once per day)
        if (null === $this->mustRotate) {
            $this->mustRotate = !file_exists($this->url);
        }
 
        if ($this->nextRotation < $record['datetime']) {
            $this->mustRotate = true;
            $this->close();
        }
 
        parent::write($record);
    }
 
    /**
     * Rotates the files.
     */
    protected function rotate()
    {
        // update filename
        $this->url = $this->getTimedFilename();
        $this->nextRotation = new \DateTime('tomorrow');
 
        // skip GC of old logs if files are unlimited
        if (0 === $this->maxFiles) {
            return;
        }
 
        $logFiles = glob($this->getGlobPattern());
        if ($this->maxFiles >= count($logFiles)) {
            // no files to remove
            return;
/www/wwwroot/trouvetonalternance/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php
 *
 * @author Jordi Boggiano <j.boggiano@seld.be>
 * @author Christophe Coevoet <stof@notk.org>
 */
abstract class AbstractProcessingHandler extends AbstractHandler
{
    /**
     * {@inheritdoc}
     */
    public function handle(array $record)
    {
        if (!$this->isHandling($record)) {
            return false;
        }
 
        $record = $this->processRecord($record);
 
        $record['formatted'] = $this->getFormatter()->format($record);
 
        $this->write($record);
 
        return false === $this->bubble;
    }
 
    /**
     * Writes the record down to the log of the implementing handler
     *
     * @param  array $record
     * @return void
     */
    abstract protected function write(array $record);
 
    /**
     * Processes a record.
     *
     * @param  array $record
     * @return array
     */
    protected function processRecord(array $record)
    {
/www/wwwroot/trouvetonalternance/vendor/monolog/monolog/src/Monolog/Logger.php
        }
        $ts->setTimezone(static::$timezone);
 
        $record = array(
            'message' => (string) $message,
            'context' => $context,
            'level' => $level,
            'level_name' => $levelName,
            'channel' => $this->name,
            'datetime' => $ts,
            'extra' => array(),
        );
 
        try {
            foreach ($this->processors as $processor) {
                $record = call_user_func($processor, $record);
            }
 
            while ($handler = current($this->handlers)) {
                if (true === $handler->handle($record)) {
                    break;
                }
 
                next($this->handlers);
            }
        } catch (Exception $e) {
            $this->handleException($e, $record);
        }
 
        return true;
    }
 
    /**
     * Ends a log cycle and frees all resources used by handlers.
     *
     * Closing a Handler means flushing all buffers and freeing any open resources/handles.
     * Handlers that have been closed should be able to accept log records again and re-open
     * themselves on demand, but this may not always be possible depending on implementation.
     *
     * This is useful at the end of a request and will be called automatically on every handler
/www/wwwroot/trouvetonalternance/vendor/monolog/monolog/src/Monolog/Logger.php
     * @param  array  $context The log context
     * @return bool   Whether the record has been processed
     */
    public function err($message, array $context = array())
    {
        return $this->addRecord(static::ERROR, $message, $context);
    }
 
    /**
     * Adds a log record at the ERROR level.
     *
     * This method allows for compatibility with common interfaces.
     *
     * @param  string $message The log message
     * @param  array  $context The log context
     * @return bool   Whether the record has been processed
     */
    public function error($message, array $context = array())
    {
        return $this->addRecord(static::ERROR, $message, $context);
    }
 
    /**
     * Adds a log record at the CRITICAL level.
     *
     * This method allows for compatibility with common interfaces.
     *
     * @param  string $message The log message
     * @param  array  $context The log context
     * @return bool   Whether the record has been processed
     */
    public function crit($message, array $context = array())
    {
        return $this->addRecord(static::CRITICAL, $message, $context);
    }
 
    /**
     * Adds a log record at the CRITICAL level.
     *
     * This method allows for compatibility with common interfaces.
/www/wwwroot/trouvetonalternance/vendor/laravel/framework/src/Illuminate/Log/Logger.php
     * @return void
     */
    public function write($level, $message, array $context = [])
    {
        $this->writeLog($level, $message, $context);
    }
 
    /**
     * Write a message to the log.
     *
     * @param  string  $level
     * @param  string  $message
     * @param  array  $context
     * @return void
     */
    protected function writeLog($level, $message, $context)
    {
        $this->fireLogEvent($level, $message = $this->formatMessage($message), $context);
 
        $this->logger->{$level}($message, $context);
    }
 
    /**
     * Register a new callback handler for when a log event is triggered.
     *
     * @param  \Closure  $callback
     * @return void
     *
     * @throws \RuntimeException
     */
    public function listen(Closure $callback)
    {
        if (! isset($this->dispatcher)) {
            throw new RuntimeException('Events dispatcher has not been set.');
        }
 
        $this->dispatcher->listen(MessageLogged::class, $callback);
    }
 
    /**
/www/wwwroot/trouvetonalternance/vendor/laravel/framework/src/Illuminate/Log/Logger.php
     *
     * @param  string  $message
     * @param  array  $context
     * @return void
     */
    public function critical($message, array $context = [])
    {
        $this->writeLog(__FUNCTION__, $message, $context);
    }
 
    /**
     * Log an error message to the logs.
     *
     * @param  string  $message
     * @param  array  $context
     * @return void
     */
    public function error($message, array $context = [])
    {
        $this->writeLog(__FUNCTION__, $message, $context);
    }
 
    /**
     * Log a warning message to the logs.
     *
     * @param  string  $message
     * @param  array  $context
     * @return void
     */
    public function warning($message, array $context = [])
    {
        $this->writeLog(__FUNCTION__, $message, $context);
    }
 
    /**
     * Log a notice to the logs.
     *
     * @param  string  $message
     * @param  array  $context
     * @return void
/www/wwwroot/trouvetonalternance/vendor/laravel/framework/src/Illuminate/Log/LogManager.php
     *
     * @return void
     */
    public function critical($message, array $context = [])
    {
        $this->driver()->critical($message, $context);
    }
 
    /**
     * Runtime errors that do not require immediate action but should typically
     * be logged and monitored.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function error($message, array $context = [])
    {
        $this->driver()->error($message, $context);
    }
 
    /**
     * Exceptional occurrences that are not errors.
     *
     * Example: Use of deprecated APIs, poor use of an API, undesirable things
     * that are not necessarily wrong.
     *
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function warning($message, array $context = [])
    {
        $this->driver()->warning($message, $context);
    }
 
    /**
     * Normal but significant events.
/www/wwwroot/trouvetonalternance/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php
     */
    public function report(Exception $e)
    {
        if ($this->shouldntReport($e)) {
            return;
        }
 
        if (method_exists($e, 'report')) {
            return $e->report();
        }
 
        try {
            $logger = $this->container->make(LoggerInterface::class);
        } catch (Exception $ex) {
            throw $e;
        }
 
        $logger->error(
            $e->getMessage(),
            array_merge($this->context(), ['exception' => $e]
        ));
    }
 
    /**
     * Determine if the exception should be reported.
     *
     * @param  \Exception  $e
     * @return bool
     */
    public function shouldReport(Exception $e)
    {
        return ! $this->shouldntReport($e);
    }
 
    /**
     * Determine if the exception is in the "do not report" list.
     *
     * @param  \Exception  $e
     * @return bool
     */
/www/wwwroot/trouvetonalternance/app/Exceptions/Handler.php
     * @return mixed|void
     * @throws Exception
     */
    public function report(Exception $e)
    {
        // Prevent error 500 from PDO Exception
        if ($this->isInstalled()) {
            if ($this->isPDOException($e)) {
                if (($res = $this->testDatabaseConnection()) !== true) {
                    die($res);
                }
            }
        } else {
            // Clear PDO error log during installation
            if ($this->isPDOException($e)) {
                $this->clearLog();
            }
        }
        
        parent::report($e);
    }
    
    /**
     * Render an exception into an HTTP response.
     *
     * @param \Illuminate\Http\Request $request
     * @param Exception $e
     * @return $this|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Symfony\Component\HttpFoundation\Response
     */
    public function render($request, Exception $e)
    {
        // Show AJAX requests exceptions (for API)
        if ($request->ajax() || $request->wantsJson() || $request->segment(1) == 'api') {
            $json = [
                'success' => false,
                'message' => $e->getMessage(),
                'code'    => $e->getCode(),
            ];
            
            return response()->json($json, 400);
/www/wwwroot/trouvetonalternance/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php
    }
 
    /**
     * Handle an uncaught exception from the application.
     *
     * Note: Most exceptions can be handled via the try / catch block in
     * the HTTP and Console kernels. But, fatal error exceptions must
     * be handled differently since they are not normal exceptions.
     *
     * @param  \Throwable  $e
     * @return void
     */
    public function handleException($e)
    {
        if (! $e instanceof Exception) {
            $e = new FatalThrowableError($e);
        }
 
        try {
            $this->getExceptionHandler()->report($e);
        } catch (Exception $e) {
            //
        }
 
        if ($this->app->runningInConsole()) {
            $this->renderForConsole($e);
        } else {
            $this->renderHttpResponse($e);
        }
    }
 
    /**
     * Render an exception to the console.
     *
     * @param  \Exception  $e
     * @return void
     */
    protected function renderForConsole(Exception $e)
    {
        $this->getExceptionHandler()->renderForConsole(new ConsoleOutput, $e);
[internal]

Environment & details:

empty
empty
empty
empty
empty
Key Value
USER
"www"
HOME
"/home/www"
HTTP_REFERER
"https://trouvetonalternance.com/account/alternants/details/1998"
HTTP_USER_AGENT
"claudebot"
HTTP_ACCEPT
"*/*"
HTTP_HOST
"www.trouvetonalternance.com"
PATH_INFO
""
REDIRECT_STATUS
"200"
SERVER_NAME
"trouvetonalternance.com"
SERVER_PORT
"443"
SERVER_ADDR
"51.68.113.191"
REMOTE_PORT
"37178"
REMOTE_ADDR
"3.238.87.31"
SERVER_SOFTWARE
"nginx/1.21.0"
GATEWAY_INTERFACE
"CGI/1.1"
HTTPS
"on"
REQUEST_SCHEME
"https"
SERVER_PROTOCOL
"HTTP/2.0"
DOCUMENT_ROOT
"/www/wwwroot/trouvetonalternance/public"
DOCUMENT_URI
"/index.php"
REQUEST_URI
"/account/alternants/details/1998"
SCRIPT_NAME
"/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
""
SCRIPT_FILENAME
"/www/wwwroot/trouvetonalternance/public/index.php"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711648914,551
REQUEST_TIME
1711648914
APP_ENV
"production"
APP_KEY
"base64:PRPNFUsw7B7DOK0Q2hz801llHCpYqoYnyqGscf/YyGI="
APP_DEBUG
"fasle"
APP_URL
"https://trouvetonalternance.com"
APP_LOCALE
"fr"
APP_VERSION
"4.4"
PURCHASE_CODE
"ec727bb7-5f8f-4824-a4f8-bb95c20652ea"
FORCE_HTTPS
"false"
DB_PORT
"3306"
DB_DATABASE
"sql_trouvetonalt"
DB_USERNAME
"sql_trouvetonalt"
DB_PASSWORD
"m437zTmZA3yL5ZaY"
DB_SOCKET
""
DB_TABLES_PREFIX
""
DB_CHARSET
"utf8"
DB_COLLATION
"utf8_unicode_ci"
DB_DUMP_BINARY_PATH
""
IMAGE_DRIVER
"gd"
CACHE_DRIVER
"file"
SESSION_DRIVER
"file"
QUEUE_DRIVER
"database"
LOG_CHANNEL
"daily"
LOG_LEVEL
"debug"
LOG_DAYS
"2"
FORM_REGISTER_HIDE_PHONE
"false"
FORM_REGISTER_HIDE_EMAIL
"false"
FORM_REGISTER_HIDE_USERNAME
"true"
STRIPE_API_KEY
"sk_live_hRQpAe1Ik5XrIYmLA0pn4ESc00aT7laQXq"
STRIPE_API_VERSION
"2018-11-08"
MAILCHIMP_APIKEY
"e56f86aa61d5cfda3b34948d9a32fc3f-us20"
MAILCHIMP_LIST_ID
"c8f4879ef0"
Key Value
APP_ENV
"production"
APP_KEY
"base64:PRPNFUsw7B7DOK0Q2hz801llHCpYqoYnyqGscf/YyGI="
APP_DEBUG
"fasle"
APP_URL
"https://trouvetonalternance.com"
APP_LOCALE
"fr"
APP_VERSION
"4.4"
PURCHASE_CODE
"ec727bb7-5f8f-4824-a4f8-bb95c20652ea"
FORCE_HTTPS
"false"
DB_PORT
"3306"
DB_DATABASE
"sql_trouvetonalt"
DB_USERNAME
"sql_trouvetonalt"
DB_PASSWORD
"m437zTmZA3yL5ZaY"
DB_SOCKET
""
DB_TABLES_PREFIX
""
DB_CHARSET
"utf8"
DB_COLLATION
"utf8_unicode_ci"
DB_DUMP_BINARY_PATH
""
IMAGE_DRIVER
"gd"
CACHE_DRIVER
"file"
SESSION_DRIVER
"file"
QUEUE_DRIVER
"database"
LOG_CHANNEL
"daily"
LOG_LEVEL
"debug"
LOG_DAYS
"2"
FORM_REGISTER_HIDE_PHONE
"false"
FORM_REGISTER_HIDE_EMAIL
"false"
FORM_REGISTER_HIDE_USERNAME
"true"
STRIPE_API_KEY
"sk_live_hRQpAe1Ik5XrIYmLA0pn4ESc00aT7laQXq"
STRIPE_API_VERSION
"2018-11-08"
MAILCHIMP_APIKEY
"e56f86aa61d5cfda3b34948d9a32fc3f-us20"
MAILCHIMP_LIST_ID
"c8f4879ef0"
0. Whoops\Handler\PrettyPageHandler