file functions with php are not working anymore

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

file functions with php are not working anymore

Postby kjarli » 11. November 2007 01:04

Functions as readdir-opendir-scandir-is_dir() all return an error that the designated folder does not exist

trying to create one with mkir results an error saying it already exists...

file_put_contents doesnt give an error with:

if(!file_put_contents($file, $output))
{
die('error');
}

but doesnt create the page either...

what to do??
kjarli
 
Posts: 8
Joined: 09. November 2007 09:20

Postby Wiedmann » 11. November 2007 01:16

Functions as readdir-opendir-scandir-is_dir() all return an error that the designated folder does not exist

- original error message?
- example script?

Code: Select all
if (!file_put_contents($file, $output)) {
    die('error');
}

but doesnt create the page either...

Not at the location you expect it... What's the value of "$file"?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby kjarli » 11. November 2007 16:44

Code: Select all
<?php

echo $debug_file;
if(!file_put_contents($debug_file, $output))
{
   die('The file <strong>' . $debug_file . '</strong> could not be created');
}
mkdir('folder');
scandir('folder');
$open_ = opendir('folder');
echo readdir($open_);

?>



will result
default_result.php
Warning: mkdir() [function.mkdir]: File exists in C:\xampp\htdocs\error_class\debug_console.php on line 382
.


edit:

Im reinstalling because i think the patcher did not work propperly..
it said uninstalling 1.6.3a while i just updated to 1.6.4
kjarli
 
Posts: 8
Joined: 09. November 2007 09:20

Postby Wiedmann » 11. November 2007 17:27

Warning: mkdir() [function.mkdir]: File exists in C:\xampp\htdocs\error_class\debug_console.php on line 382

a) This can't be from the example script.
--> Your example script have no line 382

b) This error message is clear enough:
--> you can't make a directory with the name "folder", if a directory or file with this name allready exists.
Last edited by Wiedmann on 11. November 2007 17:53, edited 1 time in total.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby kjarli » 11. November 2007 17:44

its a part of my script...

Im trying to get xampp 1.6.4 reinstalled to work, copied htdocs/mysql/phpmyadmin and now i cant get the mysql to start :S
kjarli
 
Posts: 8
Joined: 09. November 2007 09:20


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 125 guests