Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

300
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!