Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

301
Visualizações
Weird issue with PHP file_put_contents()

Using PHP v5.6.40 under Ubuntu 18.04.04 (through php5.6 apache mod), this is the line of code:

file_put_contents('/tmp/deploy.hook.log', date('Y-m-d H:i:s') . ': ' . $data . "\n", FILE_APPEND);

It works in every other server / environment I have set but not here for some reason, no PHP errors or permission issues; the function also returns the number of bytes written even though the file remains empty.

Other interesting thing is that if I run the code using the php cli as www-data it works fine.

Any thoughts?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

It seems the comment made by Sammitch was correct, my true /tmp dir is something like /tmp/systemd-private-{some-hash}

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda