473,388 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

PHP refuses to create a logfile

please see second post...
Aug 16 '07 #1
4 1315
I have iis, windows 2003 server, and php running on my server.

In testingon my laptop, my code writes fine to the log file. However, now that I am on the server it will not write to the log file. All the files are the same as on the test machine. I am using wamp on the test laptop I write the code to.

This is the sample code for the logging that works on my test laptop but not on the server.
Expand|Select|Wrap|Line Numbers
  1. @extract($_POST);
  2. $filename = "formdata.txt";
  3. file_put_contents($filename, serialize($_POST)."\r\n",FILE_APPEND);
  4.  
Is there anything in IIS I need to change to allow the logging?

Or maybe the file name needs to change to specify the exact location?


Thanks!
Aug 16 '07 #2
code green
1,726 Expert 1GB
file_put_contents() only works with php 5.
If version 4.x.x is on the server then it will throw an error.
You will need fopen, fread, fwrite, fclose commands
Aug 16 '07 #3
Yeah I did upgrade to 5 the other day.. I figured out the issue was not allowing php to create the file and that wasnt allowing php to write to it. I deleted it and it ran and created a new file.
Aug 16 '07 #4
pbmods
5,821 Expert 4TB
Changed thread title to better describe the problem (did you know that threads whose titles contain three words or less actually get FEWER responses?).
Aug 16 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: guf | last post by:
Hi All, I have SQL Server 2000 sp3, Windows 2000 Server. I have a database which is used by an application server. I do several important jobs a day in the application server and never access my...
1
by: FJ | last post by:
Hi all, I hope someone can help me with the following: I want my database to make a logfile in which it puts the date and time a code is used. The code is triggered by a timer. Every x mins it...
1
by: Edwin New | last post by:
I have a requirement to run two separate postmasters on the one machine. It looks like they compete for resources (semaphores) so won't run concurrently. I compiled twice, specifying different...
4
by: Lee Moore | last post by:
I am trying to develop a threaded function to create a dataset from an Oracle database. When querying an elaborate view, queries take a while. I would like to place and animated wait dialog up...
1
by: ticmanis | last post by:
Hello, I'm having trouble getting MSIE 6.0 (running on XP SP2) to accept a cookie which works fine in both Firefox and wget. The web server is Boa 0.94.13 (a small embedded server) using PHP...
2
by: ge_orgy | last post by:
Accidently, I(we) deleted the Logfile.LDF in sysfiles folder on the mssql server and now can't enter the database, which status now is set SUSPECT. Before deleting the logfile I did a...
2
by: Andi Clemens | last post by:
Hi, we had some problems in the last weeks with our mailserver. Some messages were not delivered and we wanted to know why. But looking through the logfile is a time consuming process. So I...
6
by: roger.lagrilliere | last post by:
Hello, is anyone willing to help me out to setup a logfile. I have a program running in Access, but I want to know the progress of it. It is rather easy I think, but don't know how to handle...
12
by: Rainer Queck | last post by:
Hi NG, I have no idea why, but since a while a dataset refuses to write to a specific xml file. I get the error message "Der Zugriff auf den Pfad...
2
by: pompom | last post by:
hello all! i have to make a project for school , making a newsserver and a client. the thing is, i send messages between them to let the user know if everything is running ok. just some simple...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.