Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

302
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda