[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://www.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: 2
Joined: 26. May 2012 14:11
XAMPP Version: 1.8.0
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
free software according to purpose of usage
XAMPP 1.8 for local development/testing only
Zend Server 6 (free) for production environments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 4491
Joined: 17. August 2009 13:05
XAMPP Version: 1.8.0
Operating System: W7Ux64

Re: Xampp file/directory permissions

Postby JiminSA » 17. October 2012 06:59

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


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 15 guests