Linode Forum Index Linode Forum
Linode Community Forums
 


PHP file_put_contents not writing to local file

Click here to go to the original topic

 
       Linode Forum Index -> Web Servers and Web App Development
Author Message
msgmash



Joined: 26 Jan 2012
Posts: 2
Location: London, UK

Posted: Thu Jan 26, 2012 3:54 am    Post subject: PHP file_put_contents not writing to local file  

Hi,

I just want to know if I'm doing something obviously dumb or I'm missing something. I have a very simple script set up to collect email addresses from a form, and initially I had the script writing to a local file. However, no output appears in the file.

File permissions appear fine, the output file is outside the doc root directory, and the script otherwise runs fine. What could be wrong?

Thanks!

Simon
Back to top  
Mr Nod



Joined: 17 Mar 2009
Posts: 100
Location: UK

Posted: Thu Jan 26, 2012 5:07 am    Post subject:  

"I had the script writing to a local file"

Do you mean the script was working while you developed it and now that it is invoked from the web server it doesn't work, or do you mean that it was working from the web server and now it's suddenly stopped?

M
Back to top  
msgmash



Joined: 26 Jan 2012
Posts: 2
Location: London, UK

Posted: Thu Jan 26, 2012 5:27 am    Post subject:  

Hi,

It was working on my local machine under my MAMP server (which I use for development), but not when I transferred it to my linode instance.

Thanks
Back to top  
obs



Joined: 07 Mar 2010
Posts: 1403
Location: Earth

Posted: Thu Jan 26, 2012 6:04 am    Post subject:  

Check your web server error logs, php errors often get dumped there, also check your php.ini settings is open_basedir restricting access?
Back to top  
 
       Linode Forum Index -> Web Servers and Web App Development
Page 1 of 1