Web site ran out of RAM (error:allowed memory size of 134217728 bytes exhausted (tried to all)

Source: Internet
Author: User
A problem occurred:
[Thu Jul 09 09:57:22 2015] [ERROR] [Client 183.61.51.179] PHP Fatal error:allowed Memory size of 134217728 bytes exhausted (tried to allocate 4294967296 bytes) in/vhost/vhostroot /wart8555/www/class/companyinfomation.php on line 80
[Thu Jul 09 09:57:48 2015] [ERROR] [Client 59.57.252.98] PHP Fatal error:allowed Memory size of 134217728 bytes exhausted (tried to allocate 4294967296 bytes) in/vhost/vhostroot /wart8555/www/class/companyinfomation.php on line 80
[Thu Jul 09 09:57:50 2015] [ERROR] [Client 59.57.252.98] File does not exist:/vhost/vhostroot/wart8555/www/favicon.ico
[Thu Jul 09 10:01:38 2015] [ERROR] [Client 59.57.252.98] PHP Fatal error:allowed Memory size of 134217728 bytes exhausted (tried to allocate 4294967296 bytes) in/vhost/vhostroot /wart8555/www/class/companyinfomation.php on line 80
First index.php in the foot.php page, there is a problem, beginner PHP, please God help to see
 Indexshow (); $information = new Baseinformation (); $infor _list = $information->findpage (1, 5);? ><title><?php echo web_title;? ></title>
 
  
 
 
  
 
 
  
 
 
  
 
 
  
 
 
  
 
 
  
 
   
                             

News

    • ">

"alt=" "class=" Threeup ">

Details


 GetContent ();? >
                                           
  

Quick Links

    • Wei da
    • News
    • Products
    • Video
    • Download

ContactUs

    • /images/address.png "alt=" > Getaddr ();? >
    • /images/phone.png "alt=" > Gettel ();? >
    • /images/fax.png "alt=" > Getfx ();? >
    • /images/email.png "alt=" > Getemail ();? >

AboutUs

Placerat Urna et tristique in! Scelerisque integer nisi pha sellus, nec phasellus arcualiquet etiam magna massa sit cursus adipiscing sed, nec? Aenean odio! Cumac dolor dapibus tincidunt lorem ipsum dolor sit esmet placerat urna et tristique in! Scelerisque integer nisi phasellus

 id = $id;} function GetId () {return $this->id;} function Setinfomation ($infomation) {$this->infomation = $infomation;} function Getinfomation () {return $this->infomation;} function Setaddr ($addr) {$this->addr = $addr;} function getaddr () {return $this->addr;} function Settel ($tel) {$this->tel = $tel;} function Gettel () {return $this->tel;} function Setfx ($fx) {$this->fx = $fx;} function Getfx () {return $this->fx;} function Setemail ($email) {$this->email = $email;} function Getemail () {return $this->email;} function edit () {$select _sql = "SELECT ID from company_information where id =?"; $insert _sql = "INSERT into company_information (Information,addr,tel,fx,email) VALUES (?,?,?,?,?)"; $update _sql = "Update company_information set information =?, addr=?,tel=?,fx=?,email=?" where id=? "; $database = new Database (), $conn = $database->getconn (); $stmt = $conn->prepare ($select _sql); $stmt->bind_param (' i ', $this->id); $stmt->execute (); $stmt->bind_result ($id); $stmt _edit = nUll;if ($stmt->fetch ()) {$stmt _edit = $conn->prepare ($update _sql); $stmt _edit->bind_param ("Sssssi", $this- >infomation, $this->addr, $this->tel, $this->fx, $this->email, $this->id); $stmt _edit->execute ( );} else{$stmt _edit = $conn->prepare ($insert _sql); $stmt _edit->bind_param ("Sssss", $this->infomation, $this- &GT;ADDR, $this->tel, $this->fx, $this->email); $stmt _edit->execute (); $stmt->close (); $stmt _edit->close (); $conn->close ();} function GetContent () {$select _sql = "Select Id,information,addr,tel,fx,email from company_information limit 0,1"; $ Database = new Database (); $conn = $database->getconn (); $stmt = $conn->prepare ($select _sql); $stmt->execute (); $stmt->bind_result ($id, $information, $addr, $tel, $fx, $email); $infomation _obj = Null;if ($ Stmt->fetch ()) {$infomation _obj = new Companyinfomation (); $infomation _obj->setaddr ($ADDR); $infomation _obj- >setemail ($email), $infomation _obj->setfx ($FX), $infomation _obj->setid ($id); $infomatioN_obj->setinfomation ($information); $infomation _obj->settel ($tel);} $stmt->close (); $conn->close (); return $infomation _obj;}}? >


Reply to discussion (solution)

Not enough memory, before the error that line, print all the variables, parameters, is not too large.

Which one is companyinfomation.php?

Don't see where 4G of memory is needed

Don't see where 4G of memory is needed.

Which one is companyinfomation.php?

Don't see where 4G of memory is needed

The last one is

Not enough memory, before the error that line, print all the variables, parameters, is not too large.

The first 104 lines, the second 3-5 lines, the 3rd 80

Don't see where 4G of memory is needed.

Database queries up to a single piece of data, no data will be reported such an error

Although the Bind_result method does not require parameter variables to exist beforehand, it is better to declare it first.
$id = $information = $addr = $tel = $fx = $email = ";
$stmt->bind_result ($id, $information, $addr, $tel, $fx, $email);

Although the Bind_result method does not require parameter variables to exist beforehand, it is better to declare it first.
$id = $information = $addr = $tel = $fx = $email = ";
$stmt->bind_result ($id, $information, $addr, $tel, $fx, $email);

Or not?

You can try it without bind_result.

Thank you for your answer. The field type is set incorrectly, a large text field is set to the maximum field, memory 4G is required, and a change is good.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.