Skip to content
Code and Bytes Code and Bytes

Code and Bytes
Code and Bytes

PHP Warning: file_put_contents(TelegramException.log): failed to open stream: Permission denied in …/vendor/longman/telegram-bot/src/Exception/TelegramException.php on line 24

Posted on 31 January, 20169 April, 2020

Luego de revisar la línea 24 del archivo al que hace referencia, se puede observar que trata de escribir y añadir un log.

namespace Longman\TelegramBot\Exception;

class TelegramException extends \Exception
{

    public function __construct($message, $code = 0)
    {
        parent::__construct($message, $code);

        $path = 'TelegramException.log';
        $status = file_put_contents(
            $path,
            date('Y-m-d H:i:s', time()) .' '. self::__toString() . "\n",
            FILE_APPEND
        );

    }
}

Pero no tiene permisos de hacerlo. Por lo que hay que darselos a la carpeta en donde se encuentra el archivo php que se esta ejecutando

chmod 777 [carpeta donde se esta ejecutando el script php]

 

Linux PHP

Post navigation

Previous post
Next post

Related Posts

Error al instalar Wine: The following signatures couldn’t be verified because the public key is not available

Posted on 17 January, 2020

Cuando ejecutamos sudo apt-get update aparece el error: W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.winehq.org/wine-builds/ubuntu bionic InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F W:…

Read More
Linux

Wake On Lan desde un Mikrotik

Posted on 13 April, 202013 April, 2020

Desde la consola del Mikrotik es posible enviar el paquete para encender un equipo. Tener en cuenta la interface y la mac tool wol interface=bridge mac=c0:3f:d5:b7:f1:8b

Read More
Linux

Instalar fuentes Tahoma y Verdana en Ubuntu

Posted on 25 June, 201525 June, 2015

Las fuentes de Tahoma y Verdana usadas comunmente en Windows no vienen instaladas por defecto en Ubuntu y se hace necesario tenerlas para varias aplicaciones, para instalarla debemos seguir los siguientes pasos: sudo apt-get install ttf-mscorefonts-installer Ubicado por ejemplo en la carpeta Download se descarga las fuentes wget http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/IELPKTH.CAB Se…

Read More

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Buscar

Categorias

  • AI (2)
  • Asterisk (9)
  • Bases de datos (1)
  • DevOps (4)
  • Git (2)
  • HTML (1)
  • Laravel (6)
  • Linux (67)
  • MCP Server (1)
  • Mikrotik (3)
  • MySQL (5)
  • n8n (1)
  • Personal (4)
  • PHP (15)
  • Python (2)
  • Software recomendado (1)
  • Tips (1)
  • VSCode (4)
  • vTiger (4)
  • Windows (10)
  • Wordpress (4)
©2026 Code and Bytes | WordPress Theme by SuperbThemes