Lifelesspeople.com

 Forum FAQsForum FAQs  KnowledgebaseKnowledgebase  RulesRules   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   HostingHosting   RegisterRegister 
 DonateDonate   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Where is php.ini?  Share

 
Lifelesspeople.com Forum Index -> Help Wanted
Post new topic   Reply to topic View previous topic :: View next topic  
Author Message
kenoodo
Lifeless Person


Joined: 17 Jul 2005
Posts: 1098
Location: MengDai

PostPosted: Wed Jan 09, 2008 9:56 am    Post subject: Where is php.ini? Reply with quote

I got
Quote:
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 535 bytes) in /usr/home/kenoodo/public_html/daibbs/admin/global.php on line 272
error.

After searching, I get that it to reset the ”memory_limit” in php.ini would solve the problem, but I can find it in nowhere.

Any idea? Thanks Exclamation
Back to top
 
Jacky
3.14159265358979323846264


Joined: 01 Jan 2005
Posts: 4175


PostPosted: Wed Jan 09, 2008 11:04 am    Post subject: Reply with quote

php.ini is a PHP settings file.

You can have your own php.ini file. Just place the setting that you want in Notepad (in this case the setting for memory), save it as an ini file, then upload to the directory that you need it in.

And if I'm not wrong you can set the allowed memory in .htaccess.

More information at the Knowledge Base.
_________________
ClickFanatic wrote:
Your nonsense make my forum visits rather brief, Jacky. It's like:
"Hey look, a reply notification!"
*click* *click*
*reading garbage*
"Oh it was Jacky again..."
*close*
Back to top
 
kenoodo
Lifeless Person


Joined: 17 Jul 2005
Posts: 1098
Location: MengDai

PostPosted: Fri Jan 11, 2008 7:34 am    Post subject: Reply with quote

Thanks. I solved that problem by other way.

Still have no idea how to do with php.ini or .htaccess, thank you very much anyway.
Back to top
 
exsanguination
Forum Regular


Joined: 27 Apr 2005
Posts: 418
Location: Australia

PostPosted: Fri Jan 11, 2008 3:56 pm    Post subject: Reply with quote

Rather than just upping the memory limit blindly when you run out of memory, you should investigate Why it happened? Is it repeatable? Is it a load problem, or application code? Are you sure they code is solving the problem correctly? I've seen so many stupid things done by other people at work that it no longer surprises me to do silly things like filtering and sorting outside of the database. They just return everything and do the processing in the application code and wonder why it blows up when they hit a ceiling in the size of the result set.

PHP.ini is usually stored in the PHP install directory hierarchy. Mine is in /usr/local/php5/lib/php.ini.

Just use something like locate to find it

Code:
[andrew@eudora:~]$ locate php.ini
Smile
Back to top
 
krt
...


Joined: 11 Jan 2005
Posts: 4995
Location: Down Under

PostPosted: Sun Jan 13, 2008 2:00 am    Post subject: Reply with quote

exsanguination, I doubt he has shell access. What is referred to by Jacky is a local php.ini that overrides the global php.ini.

kenoodo, first you would create the php.ini file in your web root, i.e. public_html/ and then add the following line in the file, e.g. for an 32MB memory limit:
Code:
memory_limit = 32M


But, as exsanguination said, it is most likely caused by an issue in the script, meaning it should not need to use that much memory.

What script are you using?
_________________
AU Proud
Back to top
 
Display posts from previous:   
Post new topic   Reply to topic    Lifelesspeople.com Forum Index -> Help Wanted All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Home | Hosting | News | Forum | Links | System Status | About | Archive | Donate ]
Powered by phpBB © 2001, 2002 phpBB Group
All trademarks and copyrights on this page are owned by their respective owners. Posts and comments are owned by the poster. Everything else © 2001 - 2007 Lifelesspeople.com