| Author |
Message |
kenoodo Lifeless Person
Joined: 17 Jul 2005 Posts: 1098 Location: MengDai
|
Posted: Wed Jan 09, 2008 9:56 am Post subject: Where is php.ini? |
|
|
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  |
|
| Back to top |
|
| |
Jacky 3.14159265358979323846264

Joined: 01 Jan 2005 Posts: 4175
|
Posted: Wed Jan 09, 2008 11:04 am Post subject: |
|
|
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
|
Posted: Fri Jan 11, 2008 7:34 am Post subject: |
|
|
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
|
Posted: Fri Jan 11, 2008 3:56 pm Post subject: |
|
|
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 |  |
|
| Back to top |
|
| |
krt ...

Joined: 11 Jan 2005 Posts: 4995 Location: Down Under
|
Posted: Sun Jan 13, 2008 2:00 am Post subject: |
|
|
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:
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? _________________
 |
|
| Back to top |
|
| |
|
|
|