[solved]Xampp file/directory permissions

Problems with the Windows version of XAMPP, questions, comments, and anything related.

[solved]Xampp file/directory permissions

Postby JiminSA » 16. October 2012 13:01

Without willingly wanting to get someone to correct my PHP code (see thread at http://community.apachefriends.org/f/viewtopic.php?f=16&t=50665 - don't know how to insert link using the forum CMS) I have come across a situation where xampp does not allow a file to be created on open in php - i.e. with this statement:- $handle = fopen($filename,'w+'); the error message produced is...
Warning: fopen(backup/dbbackup_16.10.2012_13:57:40_all.sql) [function.fopen]: failed to open stream: Invalid argument in C:\xampp\htdocs\MMM\CMS\backup.php on line 115

When I upload and run from the server, everything is fine (the non-existent file is created).
Has it to do with file permissions within Xampp?
JiminSA
 
Posts: 5
Joined: 26. May 2012 14:11
Operating System: Windows 7

Re: Xampp file/directory permissions

Postby Altrea » 16. October 2012 17:20

Hi JiminSA (there is ALWAYS time for a short salutation, especially if you are asking for help on a volunteer community board. It's a matter of politeness),

JiminSA wrote:with this statement:- $handle = fopen($filename,'w+'); the error message produced is...
Warning: fopen(backup/dbbackup_16.10.2012_13:57:40_all.sql) [function.fopen]: failed to open stream: Invalid argument in C:\xampp\htdocs\MMM\CMS\backup.php on line 115

Which is absolutely correct. The colon is not allowed in Windows filenames.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Xampp file/directory permissions

Postby JiminSA » 17. October 2012 06:59

Brilliant - Thanks loads, Altrea!
JiminSA
 
Posts: 5
Joined: 26. May 2012 14:11
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 165 guests