Mombu the Php Forum

Go Back   Mombu the Php Forum > Php > Why I sart getting "Fatal error: Allowed memory size..." after phpupgrade?
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 2nd November 10:17
afan
External User
 
Posts: 1
Default Why I sart getting "Fatal error: Allowed memory size..." after phpupgrade?



The hosting company I have one account (and several Add Domains)
upgraded php on the server from 4.4.7 to 5.2.5. After the upgrade I
start getting the error message:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 122880 bytes) in...
on domains they use Gallery2 or are CMS (Joomla or Drupal) based.

I contacted Tech. Support (Live Chat) and he told me I have to edit
memory limit in php.ini (for each domain).

I asked him why it started so suddenly, did upgrade caused the problem
and I got as an answer: "Your scripts have begun to use more memory.
That would be the only reason for this error."
It doesn't make a sense to me and sounds like "let's blame something
else" type of answer.

I'm going to edit php.ini though what if "client" doesn't have a clue
what's php.ini or how to do it?

I would like to hear your opinion what caused the problem.
I'll edit php.ini, I'm not going to make a big deal of it, though, I
just want to know why it happened.

Thanks for help.

-afan
  Reply With Quote


 


2 2nd November 10:17
maillists
External User
 
Posts: 1
Default Why I sart getting "Fatal error: Allowed memorysize..." after php upgrade?



It sounds to me like the "allowed memory size" went back to the default
after they upgraded php.

I usually have to update some of my config files after an upgrade. Nothing
seems strange to me here... But maybe I am missing something.

Your clients shouldn't have a clue about the php.ini file, nor should they
ever have to worry about it. However, I assume you mean the clients of the
hosting company, which would be you. It is my opinion that you, as a PHP
developer, have a responsibility to understand what the php.ini file is,
what it does, and how to change it if necessary and you should have this
knowledge before you begin writing code that would be used by anyone but
yourself.

--
Stephen Johnson c | eh
The Lone Coder

http://www.thelonecoder.com
continuing the struggle against bad code

http://www.thumbnailresume.com
--
  Reply With Quote
3 2nd November 10:17
afan
External User
 
Posts: 1
Default Why I sart getting "Fatal error: Allowed memory size..."after php upgrade?


Yes, I use the service of the hosting company and I'm "the client".
Also, I have (some) knowledge of what php.ini is and what I
can/have/dare to change. And it's not first time I had "conflict" with
"limited memory" and every time I knew what caused and how to fix it.
Also, the app is not written by me, it's Gallery2
(http://www.gallery2.org/) and they "can't" do wrong code

Though, what if "some guy" signed up for an account, installed Gallery
or Joomla or Drupal through Fantastico and - got his message? of course,
support will help him (do it for him) to edit php.ini, but it shouldn't
happen at the first time, right?

And, as I said, I don't want to make a big deal for hosting company
because they are good and this is first time something came up. Just
want to know why happened, what caused the error. -afan
  Reply With Quote
4 2nd November 10:17
afan
External User
 
Posts: 1
Default Why I sart getting "Fatal error: Allowed memory size..."after php upgrade?


Ok. Now is clear. I'll contact them as soon as possible.

Thanks Richard for your help.

-afan
  Reply With Quote
5 2nd November 10:17
ceo
External User
 
Posts: 1
Default Why I sart getting "Fatal error: Allowed memory size..."after php upgrade?


PHP 5 uses more RAM than PHP 4, both to start up, and on a
script-for-script basis.

It has more features, more OO complexity, and uses more RAM, plain and
simple.

The PHP Dev Team increased the default/recommended memory limit from 8
M to 16 M with the release of PHP 5.

I think they even documented this change, but you'll have to dig that
out for yourself.

Your hosting company probably kept the old php.ini without realizing
that they needed to read the docs and change it.

ymmv

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
  Reply With Quote
6 2nd November 10:17
afan
External User
 
Posts: 1
Default Why I sart getting "Fatal error: Allowed memorysize..." after php upgrade?


just talked to tech. support.
actually, they didn't upgrade the server I was on the moved me
completely to other server that use php5. they moved all my files -
original php.ini as well.
I'm going to to add domain in Addon Domains and then copy that php.ini
on other Addon Domains.

Thanks for help.

-afan
  Reply With Quote
Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Php 5 forum, Apache forum, Iis forum, Functions forum, Classes forum, Librarys forum, Bugs forum, Postgres forum, Mysql forum, Paradox forum, Ms sql forum, Configurations forum, Php.ini forum, Problems forum, Scripting forum, Css forum, General forums, Off-topic talk, Links, Extra forums, Php


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666