XAMPP is writting PHP errors logs in Macintosh format

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

XAMPP is writting PHP errors logs in Macintosh format

Postby Spectrael » 20. November 2011 03:28

Hey guys :) Really weird thing going on here. I use a program called "Tail for Win32" to monitor my log files, mostly PHP error logs so I won't miss an error while I'm coding.

I've used XAMPP before, EasyPHP before that, and just recently Zend Server CE. Now that I'm back to XAMPP, I've noticed my log files are being saved in the Macintosh end of line format. This causes Tail for Win32 to display errors as one long line of text, instead of a line break after each error, making it quite difficult to read :).

From my understanding PHP automatically uses the correct EOL format for whatever operating system it's running on. I can verify that it's doing the Macintosh ELO format on a Windows 64-bit Ultimate OS, Windows XP SP3, and Windows 7 Ultimate 32 bit. I've downloaded, redownloaded, fresh installed XAMPP several times now. I'm not using the installation package if that helps at all. This just isn't making any sense, I'm determined to figure out how to fix this. I've been googling this all afternoon with no luck. Help me out before I pull my hair out :)
Spectrael
 
Posts: 5
Joined: 20. November 2011 03:21
Operating System: Windows 7, Ultimate 64

Re: XAMPP is writting PHP errors logs in Macintosh format

Postby Sharley » 20. November 2011 03:33

Try using a text editor like notepad or notepad ++ to read the log files and see if they display correctly.

Be specific about which log files and their location.
Thanks.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: XAMPP is writting PHP errors logs in Macintosh format

Postby Spectrael » 20. November 2011 04:11

No problem.

Notepad++ is actually how I verified that it was in Macintosh format. When opening the log file in Notepad++ it says 'Macintosh' down in the status bar, whereas normally it would say 'Dos\Windows'. I can format this from the Edit menu in Notepad++, and then the log file appears exactly like it should.

The log file in plain notepad looks like...

Error
Error
Error

For Notepad++, that same file would look like...

Error

Error

Error.

In WordPad or OpenOffice writer it would simply look be ErrorErrorError. The file in question is php_error.log, located in XAMPP/php/logs. Appreciate your help :)
Spectrael
 
Posts: 5
Joined: 20. November 2011 03:21
Operating System: Windows 7, Ultimate 64

Re: XAMPP is writting PHP errors logs in Macintosh format

Postby Sharley » 20. November 2011 04:21

In notepad++ you can can convert the EOL using the edit menu item then save the file.
Close then open again the log file and you should see it has now changed.

Then observe if PHP changes the file back to MAC when it makes another entry.
You may have to create an error to test this out.


The settings for the log file are located in the php.ini file starting at line 554 or thereabouts with reference links to the PHP manual.

See if there is a setting like the string to append at the end of the line.

There maybe a setting that you can add to the php.ini file to change the Mac behaviour.

This error log file is compiled with Apache and PHP using default settings associated with the Apache Lounge version and they also have a very active forum.

Mac and Linux are very similar and this EOL issue could well have been overlooked in the bigger scheme of things when porting to Windows.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: XAMPP is writting PHP errors logs in Macintosh format

Postby Spectrael » 20. November 2011 04:41

Yea I have converted it to EOL to Windows saved it and everything. Upon error, it will convert it back to Macintosh format.

There are append and prepend settings in PHP.ini. I actually tried these earlier, but they don't seem to work. If there's a setting to add to PHP.ini to help with this, I sure haven't found it :)
Spectrael
 
Posts: 5
Joined: 20. November 2011 03:21
Operating System: Windows 7, Ultimate 64

Re: XAMPP is writting PHP errors logs in Macintosh format

Postby Sharley » 20. November 2011 04:46

When you posted first up it would have been helpful to have included all the details of your attempts to fix this issue. ;)
viewtopic.php?f=16&t=48331
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: XAMPP is writting PHP errors logs in Macintosh format

Postby Spectrael » 20. November 2011 04:50

My apologies :(. I usually only ask for help when I've exhausted everything I know to do :). I should of listed those things though!

I honestly don't know what could be the issue here. I've compared PHP.ini from Zend Server CE to XAMPP, and there's no difference in any section that would have to do with this sort of thing.

Really makes no sense, I'm frustrated that this is alluding me :)
Spectrael
 
Posts: 5
Joined: 20. November 2011 03:21
Operating System: Windows 7, Ultimate 64

Re: XAMPP is writing PHP errors logs in Macintosh format

Postby Sharley » 20. November 2011 04:54

Try posting in the Apache Lounge forum as they are the ones who are more than likely responsible.
Don't say you've done that already. :shock:
http://www.apachelounge.com/

Good luck. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: XAMPP is writting PHP errors logs in Macintosh format

Postby Spectrael » 20. November 2011 05:05

Haha will do. Thanks for your help!
Spectrael
 
Posts: 5
Joined: 20. November 2011 03:21
Operating System: Windows 7, Ultimate 64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 80 guests