Files saved in XAMPP but not altered on computer

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

Files saved in XAMPP but not altered on computer

Postby Creeksider » 06. May 2012 07:54

I've just started using XAMPP for WordPress development. Part of the task involves using the WordPress editor (while logged in on localhost) to alter template files that are stored on the local disk drive. After I've edited a file I select Update File and WordPress acts as if I've saved the altered file. When I reload a page in WordPress the changes in the template are reflected. However, the files on my hard drive have not been changed. It seems as if XAMPP is maintaining these files in a cache and I can't find a way to get it to write them out to the disk. This doesn't seem to be a browser issue because I can change the files in IE and then open WordPress on localhost in Safari and the changes made in IE will appear even though they haven't been written to the hard disk. How do I get these changes reflected in the files stored on my disk drive?

After posting this I realized I had altered some settings in php.ini to permit importing of a large mysql file and thought this might be the problem. I believe I have all settings back to default. I rebooted the computer after resetting these values and still have the problem. I can alter the files in WordPress but can't get them to write to the disk,
Creeksider
 
Posts: 3
Joined: 06. May 2012 07:34
Operating System: Windows 7

Re: Files saved in XAMPP but not altered on computer

Postby Altrea » 06. May 2012 12:09

Hi Creeksider (there is ALWAYS time for a welcome line, especially if you are asking for help. It's a matter of politeness),

Creeksider wrote:It seems as if XAMPP is maintaining these files in a cache

XAMPP doesn't use any caching methods exept output buffering.

Creeksider wrote:When I reload a page in WordPress the changes in the template are reflected.

What do you think, where can Wordpress get the changes if they are not saved somewhere?

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: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Files saved in XAMPP but not altered on computer

Postby Creeksider » 06. May 2012 17:24

Hi Altrea,

I beg forgiveness for any shortcoming in politeness. Some allowance must be made for those who reside among frogs, as Creeksider does.

To make matters worse, my amphibian brain lacks the power to convert the information so generously offered into a concrete action that solves the problem. I'm not coding an application, I just need to make the WordPress template editor write these files to disk. My first try was to create a file called flush.php as follows:

Code: Select all
<?php

    ob_end_flush();
    ob_flush();
    flush();

?>


Opening that location in IE9 produced this:

Notice: ob_flush() [ref.outcontrol]: failed to flush buffer. No buffer to flush in C:\xampp\htdocs\flush.php on line 4


Then based on other reading I tried flush2.php:

Code: Select all
<?php

    while(@ob_end_flush());

?>


With no detectable results.

I've searched for messages from others who might have had a similar problem and haven't come up with much, and that leads me to guess this is a fairly unique problem, perhaps caused by my ill-considered decision to alter php.ini, based on reading that that was how to get past a limitation on filesize when importing a database in phpmyadmin. I believe the correct values have been restored, and I've stopped and restarted Apache, and also rebooted my computer and restarted XAMPP. Any suggestions on how to recover from this situation?
Creeksider
 
Posts: 3
Joined: 06. May 2012 07:34
Operating System: Windows 7

Re: Files saved in XAMPP but not altered on computer

Postby Altrea » 06. May 2012 18:11

Creeksider wrote:I just need to make the WordPress template editor write these files to disk. My first try was to create a file called flush.php as follows:

Code: Select all
<?php

    ob_end_flush();
    ob_flush();
    flush();

?>

Okay, maybe i wasn't clear enough in my description. XAMPP uses output buffering, but output buffering can't be your issue. Output buffering just prevent that any body output can occure before all headers are send.
To be even clearer: Your problem can't be a XAMPP or XAMPP component issue.

I don't know the Wordpress Template editor, but if the changes are visible on your browser requests they have to be saved somewhere. Either it is saved in the templae files or in any other file or in the database or in the session. But your browser have to get the information somewhere so it is saved somewhere.

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: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Files saved in XAMPP but not altered on computer

Postby Creeksider » 06. May 2012 20:19

Thanks for taking the time to respond. I did a complete uninstall/reinstall and had the same problem. But then I created a new directory for the theme files and things seem to work properly there. I still don't know what caused the problem but it appears to be specific to that directory, and I'm mentioning the solution of copying files to a new theme directory and working from there in case anyone else encounters this problem and finds this thread. Note that edits made in the old directory did not carry over, so the only way to get them was to use the WordPress editor to open the files where I'd made changes, copy the contents and paste them into a new document using Notepad.
Creeksider
 
Posts: 3
Joined: 06. May 2012 07:34
Operating System: Windows 7

Re: Files saved in XAMPP but not altered on computer

Postby JonB » 07. May 2012 19:55

I'll suggest an answer - If the proper working directories are not present, the files may have been saved to the 'temp' folder on your machine. It fits the bill...

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 24 guests