Page 1 of 1
writing new files on windows server
Posted: Thu Aug 31, 2006 2:12 pm
by csgonan
This is my first stab at PHP. I'm porting an application from linux to Windows 2003. There was a php script that would not produce any output, although a php syntax check came clean. The script generates and XML file and writes it to a directory.
The file D:/www/Apache2/htdocs/webfile/blogroll/blogroll.xml is not writable
I am executing the php script in a bat file. This is the line that the generates the error.
writeFile($blogroll_rss, $rss_content);
The program runs fine on a linux machine. I looked at the permissions on the folder and its owned by administrators with full permissions and system also has full permissions.
Any suggestions?
Thanks
Posted: Thu Aug 31, 2006 2:18 pm
by feyd
post your code.
Posted: Thu Aug 31, 2006 2:21 pm
by csgonan
I also made the file writable for the Users account and it didn't change.
Thanks for any help.
Posted: Thu Aug 31, 2006 2:48 pm
by csgonan
I am hesitant to post the code because it is something we purchased. The script runs fine on linux. I am executing a .bat file that calls this
@D:\www\php5\php.exe -q D:\www\Apache2\htdocs\pulvermedia\blogroll\generator.php
from the windows CMD prompt.
If I click on the bat file I get the echo output but I don't get the error (but I still don't get the output of the XML file it created).
I put in a number of echo's to indicate where it was dying and here it is. I also don't get the echo output from the line after the writes.
// write the files
writeFile($blogroll_rss, $rss_content);
writeFile($blogroll_html, $html_content);
echo 'generator.php PPPP';
Posted: Thu Aug 31, 2006 3:04 pm
by feyd
Since you purchased it you should probably seek support from that company/individual first. We can't help you much with such small amounts of code as you've been posting. Additionally, the lines you have posted aren't referencing any built-in functions of PHP, nor do I see what specific error you are getting.
The only thing suggestable is checking the permissions of the files the error is talking about.
Posted: Thu Aug 31, 2006 3:21 pm
by csgonan
ok. thanks.
I can't get support since we are porting it to Windows. The specific error I get is in the first email
The file D:/www/Apache2/htdocs/webfile/blogroll/blogroll.xml is not writable
When I execute the code at a CMD prompt that is the error. As I said, the directory is writable by users, system and Administrators. I put echos in up until that line to see where it is failing.
Thank you anyway.