Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5985017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:27:59+00:00 2026-05-22T22:27:59+00:00

I have the following in php: public function myfunction($v){ //ini_set(memory_limit,32M); $v=mysqli_real_escape_string($this->connection,$v); $stmt=mysqli_prepare($this->connection,SELECT * from

  • 0

I have the following in php:

public function myfunction($v){
//ini_set("memory_limit","32M");
$v=mysqli_real_escape_string($this->connection,$v);
 $stmt=mysqli_prepare($this->connection,"SELECT * from TABLE WHERE MATCH(column) AGAINST($v)");

    $this->throwExceptionOnError();

    mysqli_stmt_execute($stmt);
    $this->throwExceptionOnError();

    $rows=array();

      mysqli_stmt_bind_result($stmt,$row->column1,$row->column2);

    while (mysqli_stmt_fetch($stmt)) {

      $rows[]=$row;
      $row = new stdClass();

      mysqli_stmt_bind_result($stmt,$row->column1,$row->column2);

    }

    mysqli_stmt_free_result($stmt);
    mysqli_close($this->connection);
print_r('this is a test');
print_r($rows);
}

This is searching a longtext column that has a fulltext index…..

Running this code (w/ the ini_set commented out) I get a memory size exhausted error. When I uncomment the ini_set part and increase the memory I get no output and no errors (not even ‘this is a test’ gets printed).

Why am I not getting any output (or at least an error statement) when I increase the memory? I have not adjusted my error reporting in php.

(Running the same statement directly in mysql (without increasing the memory limit) takes .0007 seconds)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:28:00+00:00Added an answer on May 22, 2026 at 10:28 pm

    Because you save all the records that mysql gave in your $rows array.

    If the recordset is huge then you get that error.
    Also your syntax with a double call of mysqli_stmt_bind_result($stmt,$row->column1,$row->column2);
    isn’t that good looking

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose we have following function in PHP: public function testSomething() { $name = perform_sql_query("SELECT
I have the following test case: include_once('../Logger.php'); class LoggerTest extends PHPUnit_Framework_TestCase { public function
I have following php class class User implements IUser { public function __construct($i_objParent =
this is my first question I Have following class class ProDetection { public function
I have the following PHP code; <?php component_customer_init(); component_customer_go(); function component_customer_init() { $customer =
Imagine I have the following situation: File1.php <?php include(Function.php); log(test); ?> Function.php <?php function
I'm trying to port the following php functionality over to perl: public function loadKey($mod,
I have the following function: public function updateCustomerInternetBanking($value, $column_to_go_by) { $sql = UPDATE customer
If I have the following simplistic form: <?php class Application_Form_Contact extends Zend_Form { public
I have the following php code, which has been snipped for brevity. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.