LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-12-2011, 05:33 AM   #1
Flowsen
LQ Newbie
 
Registered: Sep 2011
Posts: 29

Rep: Reputation: Disabled
Internal 500 Error when using ini_set


Hi there,

I am using Debian Lenny with PHP 5.3.8 with fastCGI and Apache 2.2.9-10+lenny11.
Everything seems to work smoth except all PHP scripts where ini_set() is used cause a 500 error. For example:

ini_set("memory_limit","24MB");

no matter which memory size I use.
Any idea?

Kind Regards
Florian
 
Old 09-12-2011, 09:58 AM   #2
Hangaber
Member
 
Registered: Sep 2004
Location: USA
Distribution: Slackware
Posts: 163

Rep: Reputation: 51
Quote:
Originally Posted by Flowsen View Post
ini_set("memory_limit","24MB");
A guess, but try removing the B ... "48M", etc.
 
Old 09-12-2011, 10:14 AM   #3
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Quote:
Originally Posted by Hangaber View Post
A guess, but try removing the B ... "48M", etc.
+1

Yes, not my thing, but looks like a simple syntax error. Regardless it's not really a debian problem, you should ask for this to be moved maybe the "Linux - Server" forum.
 
Old 09-12-2011, 10:17 AM   #4
Flowsen
LQ Newbie
 
Registered: Sep 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
Thats also what i guessed. I already tried everything:
ini_set("memory_limit","48M");
ini_set("memory_limit","48");
ini_set("memory_limit",48);

No matter what i try, I immediately get the 500 error.
I am sure that it has nothing to do with the PHP script itself because it is working if i leave the ini_set away (indeed i need it so thats not a soloution ;-)

btw ini_set("max_execution_time", "60"); works and does not throw an 500 error so i am really not sure what it could be.

I have to say, that the problem appeared after upgrading Apache and PHP from 5.2.x to 5.3.8.

PS: sorry for posting in the wrong place. I thought the right place is the debian forum as I am using debian lenny. So I would appreciate if a moderator could move my thread - thanks :-)

Last edited by Flowsen; 09-12-2011 at 10:22 AM. Reason: misspelling
 
Old 09-12-2011, 11:02 AM   #5
Hangaber
Member
 
Registered: Sep 2004
Location: USA
Distribution: Slackware
Posts: 163

Rep: Reputation: 51
Is there anything in /var/log/apache2/error.log that would help?
 
Old 09-12-2011, 11:39 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Flowsen View Post
PS: sorry for posting in the wrong place. I thought the right place is the debian forum as I am using debian lenny. So I would appreciate if a moderator could move my thread - thanks :-)
NP, moved it to the Linux Software forum to help your thread/question get the exposure it deserves.
 
Old 09-13-2011, 02:44 AM   #7
Flowsen
LQ Newbie
 
Registered: Sep 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Hangaber View Post
Is there anything in /var/log/apache2/error.log that would help?
Quote:
[Tue Sep 13 09:34:14 2011] [notice] mod_fcgid: process /var/syscp/webs/xxx/xxx.php(28681) exit(communication error), get unexpected signal 11
[Tue Sep 13 09:34:14 2011] [notice] mod_fcgid: process /var/syscp/webs/xxx/xxx.php(28680) exit(communication error), get unexpected signal 11
Furthermore syslog shows:

Quote:
Sep 13 09:41:46 srv kernel: [98524.331525] php-cgi[28919] general protection ip:6d6f82 sp:7ffff563c590 error:0 in php5-cgi[400000+792000]
Thats the only message i get. Any way to extend this error message? I already looked into other log files without success.
 
Old 09-21-2011, 10:08 AM   #8
Flowsen
LQ Newbie
 
Registered: Sep 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
Thumbs up Solved

I just wanted to inform you that I solved the problem.

The reason is that suhosin memory limit may not exceed 2047M.
Please dont ask me if this is a bug or not but if i keep in range up to 2047M setting memory limit in php.ini, .htaccess, PHP etc. everything works like a charm.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting 500 Internal Server Error !! Deepaks Linux - Server 0 04-11-2009 06:49 AM
500 Internal Server Error shahz Red Hat 9 03-31-2009 03:05 AM
Internal error 500 vlademir Linux - Server 1 03-26-2009 04:16 AM
500 Internal server error fa_khan50 Linux - Newbie 0 01-02-2008 12:13 AM
Internal Error 500 cannot be fixed cpanelskindepot Linux - General 1 10-25-2004 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration