Error Messages on Windows 7 & 8

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

Error Messages on Windows 7 & 8

Postby Quax » 16. July 2012 15:33

Error Messages on Windows 7 & 8

Not related to XAMPP only even AMPPS and WampServer!

Installed XAMPP (different versions up to 1.8.0) on serveral versions of Windows and got an error which were display Error Messages of PHP in the background while running an script.

After doing a lot reading and research, I found out that those problem were related to the php.ini file. In details, it was forced from 2 settings:
In Error handling and logging Section of php.ini:
error_reporting = E_ALL & ~E_NOTICE (should look like this)
display_errors = On need to be change to: Off


After changing the the display_errors = On to Off, all was ok.

I also was need to change some more settings in php.ini for to be able to install scripts with databases bigger than 2MB. All the settings I was need to change in php.ini, please see quoted below, icl. the display errors as well:
In: Resource Limits Section:
max_execution_time = 30 change to: 1000 or above
max_input_time = 60 change to: 1000 or above
memory_limit = 128M change to more, I set mine to 1024M

In: Error handling and logging Section:
error_reporting = E_ALL & ~E_NOTICE (should look like this)
display_errors = On change to: Off

In: Data handling Section:
post_max_size = 8M change to: higher value, mine is set to 750M

In: File uploads Section:
upload_max_filesize = 2M change to: higher value, mine is set to 750M
max_file_uploads = 20 change to higher value, mine is set to 60


That the Display Errors come up is depend on the error settings within the php.ini and and the script using, so you would may see or may not.

I posted this solution only for those who got the same error. And again, that error were also happens with AMPPS and WampServer both with latest versions.
Weiterhin einen Guten Tag.

Quax, der Bruchpilot
User avatar
Quax
 
Posts: 15
Joined: 16. May 2012 08:42
Operating System: Windows Server 2003 Enterprise

Re: Error Messages on Windows 7 & 8

Postby Altrea » 16. July 2012 16:16

Hi,

i don't recommend these changes, because
  • specific changes must be related to a specific issue. Getting ANY error message (you don't specify yours) is not a specific one
  • your limits are far away from being recommend values and can produce other performance, stability or security issues

My recommandations:

  • If you are getting php notices / warnings / errors or other messages from third party scripts, first check for update of that specific script.
    If there is no update, change the error_reporting level gracefully.
    • Maybe "error_reporting = E_ALL" is enough (thats the case if you just get E_STRICT messages)
    • maybe E_ALL & ~E_DEPRECATED is a good value too.
    • You should hide as less messages as possible because it is your debugging / development / testing machine and you should know what issues your scripts could have.
  • If you are getting php notices / warnings / errors or other messages from your own scripts, you should debug your scripts to get rid of all of them.
  • setting display_errors to off is in no case needed for testing environments, but the recommend setting for production servers (for what XAMPP is not meant for).
  • If you want to import large databases don't change the php settings, because it is in no way recommend to import large databases with php (like phpmyadmin). For this the best way is the MySQL command line interface (CLI) because it does not have any maximum execution time limit.
  • If a third party script wants to create a large database which hits the limits, change the limit values gracefully. I don't believe that any script will need 750M for creating a database.

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

Re: Error Messages on Windows 7 & 8

Postby Quax » 17. July 2012 07:15

Hi,

I had know your answer upfront.

Just to be clear, those change of settings is for development environment only, but production environment. I think I didn't had to mention that because the nature of this platform are build for development.

And just for to say: your first 2 recommendation didn't working both didn't working in that way they should, which means get rid of the displayed error messages in background. On the other hand I did not recommend to turn of Error Logging. I did check the error logs for debugging regulary for to see if anything is going wrong.

Setting the limit for for uploads to 750MB in my case, is essential because the biggest MySql database I've to use is 729MB, and may you had read that I wrote that I had set MY Settings to 750MB which were not mean as recommendation for others. Anyway, there a lot scripts available with databases of a much higher size than just 2MB!!

Finally, if I'd something ready for production, I would adjust the limits just to their needs. The adjustments I did were just for my own development environment to not have to change the limits at every time I reached some of that. As it is recommended that the developer check the error logs while debugging his work, disable the error reporting is just to ease the work a bit. Those annoying error messages on screen background had cost me quite a lot of time and were disrupting my work a lot.

That I was wrote my post, were just to give others a way and an idea for to get their work done if they facing the same problems as I did. Till now I didn't had any unwelcomed outcome from my changes and it just works fine for me.

If you didn't like if someone post an not so conventional solution for some problems, you as Administrator has the power for to delete such post. If it's against the forum rules what I wrote, delete my account and all of my post I had done. To post every time an answer with critics only, without to asking first WHY someone had done something, is an quite negative attitude.

Have a nice day.
Weiterhin einen Guten Tag.

Quax, der Bruchpilot
User avatar
Quax
 
Posts: 15
Joined: 16. May 2012 08:42
Operating System: Windows Server 2003 Enterprise

Re: Error Messages on Windows 7 & 8

Postby Altrea » 17. July 2012 19:11

Hi Quax,

I don't say that my point of view is the only truth of configurating something. And i don't want to criticise your changes to get rid of your own problems.
But i don't want to let your changes uncommented because your post was very generic in explaination but very specific in the changes and values. Other members maybe don't have the knowledge or background to know why you have setted a parameter to that specific value and for those people i want to provide a second point of view, nothing more.

Quax wrote:your first 2 recommendation didn't working both didn't working in that way they should, which means get rid of the displayed error messages in background.

My recommendation was not to use this or that specific error_reporting. This setting has to be setted to the value which fits the issue. I don't know your specific issue so i wouldn't recommend a specific setting to you. Let me quote myself
Altrea wrote:specific changes must be related to a specific issue.


Quax wrote:On the other hand I did not recommend to turn of Error Logging.

I haven't said that you recommend that change. I just said that i don't recommend that change. That is a huge difference.
You have solved your issue with that change, i'm fine with that. The success vindicates you.
But hiding all messages can produce new problems because others maybe don't look into logfiles or doesn't know where they are saved.
I just want to make that clear. Are you fine with that?

Quax wrote:Setting the limit for for uploads to 750MB in my case, is essential because the biggest MySql database I've to use is 729MB, and may you had read that I wrote that I had set MY Settings to 750MB which were not mean as recommendation for others.

You can use whatever you want. Maybe a php form based solution is the only solution for your very special database, i don't know (and i don't care).
But for all other readers here: there are much better (because less error-prone) ways to import databases with sizes > 50MB than using php based scripts.

Quax wrote:That I was wrote my post, were just to give others a way and an idea for to get their work done if they facing the same problems as I did.

And i gave others just a second point of view. I think we both have the same goal.

Quax wrote:Till now I didn't had any unwelcomed outcome from my changes and it just works fine for me.

large uploads, large phpmyadmin imports, every infinity loop will occupy the Apache for e.g. 1000 seconds
You maybe know what to do, but a beginner following your úndescribed changes can get in trouble with that.

Quax wrote:If you didn't like if someone post an not so conventional solution for some problems, you as Administrator has the power for to delete such post.

No, there is no reason for deleting such posts. I accept that you have your own opinion and way to do things and solve your problems.
But you should accept that your opinion is not the only one and that a community board is a place where different opinions can be posted.
If this is not to your taste, than maybe you should post your solutions on a personal blog with deactivated comment function, i don't know.
This board here is a place where different opinions are welcome.
As you can remember, in one of your other threads we got exactly the same discussion why i answering your thread. That was exactly the same reason as this discussion here: you are posting way too generic without explaining things enough. So, if you don't explain things to protect beginner users, i will do.

Quax wrote:To post every time an answer with critics only, without to asking first WHY someone had done something, is an quite negative attitude.

It isn't my job to ask YOU why you do things like you do.
I think i can criticise that you don't explain things enough to protect others.
My critism was neither personally nor destructive i think. I explained why i don't recommend these changes (without knowing the specific issue) and gave alternatives.

Maybe that is not your opinion also, i'm fine with that.

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


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 213 guests