Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1] 2   Go Down

Author Topic: Fatal error: Out of memory  (Read 9570 times)

0 Members and 1 Guest are viewing this topic.

zi3mn1ak

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Fatal error: Out of memory
« on: February 16, 2008, 07:49:58 pm »

Hey! I have got a problem, with CPG, when I'am trying to open the page, I have got this error:

Fatal error: Out of memory (allocated 11534336) (tried to allocate 282100 bytes) in /home/icet/public_html/forum/include/functions.inc.php on line 2040

My friends, said me that, I Must restart the server, but admin, on the webd.pl, said that it's is problem with code.

Here is code from 2000 line into 2100 line. Please help me! :( Sorry for my english!
Code: [Select]
if (is_null($filepathname)) {
$filepathname = $url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);
}

// Added hack: "&& !isset($pic_row['mode'])" thumb_data filter isn't executed for the fullsize image
if ($mode == 'thumb' && !isset($pic_row['mode'])) {
$pic_row['url'] = $filepathname;
$pic_row['mode'] = $mode;
$pic_row = CPGPluginAPI::filter('thumb_data',$pic_row);
} elseif ($mode != 'thumb') {
$pic_row['url'] = $filepathname;
$pic_row['mode'] = $mode;
} else {
$pic_row['url'] = $filepathname;
}

return $pic_row['url'];
}


/**
* cpg_get_default_lang_var()
*
* Return a variable from the default language file
*
* @param $language_var_name
* @param unknown $overide_language
* @return
**/
function& cpg_get_default_lang_var($language_var_name,$overide_language = null) {
global $CONFIG;
if (is_null($overide_language)) {
if (isset($CONFIG['default_lang'])) {
$language = $CONFIG['default_lang'];
} else {
global $$language_var_name;
return $$language_var_name;
}
} else {
$language = $overide_language;
}
include('lang/'.$language.'.php');      ----------------------------------------- line 2040  HERE IS THAT LINE!
return $$language_var_name;
}

// Returns a variable from the current language file
// If variable doesn't exists gets value from english_us lang file

/**
* cpg_lang_var()
*
* @param $varname
* @param unknown $index
* @return
**/

function& cpg_lang_var($varname,$index=null) {
global $$varname;

$lang_var =& $$varname;

if (isset($lang_var)) {
if (!is_null($index) && !isset($lang_var[$index])) {
include('lang/english.php');
return $lang_var[$index];
} elseif (is_null($index)) {
return $lang_var;
} else {
return $lang_var[$index];
}
} else {
include('lang/english.php');
return $lang_var;
}
}


/**
* cpg_debug_output()
*
* defined new debug_output function here in functions.inc.php instead of theme.php with different function names to avoid incompatibilities with users not updating their themes as required. Advanced info is only output if (GALLERY_ADMIN_MODE == TRUE)
*
**/

function cpg_debug_output()
{
global $USER, $USER_DATA, $META_ALBUM_SET, $ALBUM_SET, $CONFIG, $cpg_time_start, $query_stats, $queries, $lang_cpg_debug_output;
$time_end = cpgGetMicroTime();
$time = round($time_end - $cpg_time_start, 3);

$query_count = count($query_stats);
$total_query_time = array_sum($query_stats);

$debug_underline = ' ------------------ ';
$debug_separate = ' ========================== ';
echo '<form name="debug" action="'.$_SERVER['PHP_SELF'].'">';
starttable('100%', $lang_cpg_debug_output['debug_info'],2);
echo '<tr><td align="center" valign="middle" class="tableh2" width="100">';
echo '<script language="javascript" type="text/javascript">
<!--
« Last Edit: March 13, 2008, 07:54:37 am by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Fatal error: Out of memory
« Reply #1 on: February 17, 2008, 02:47:24 am »

Undo your hack to see if this improves your situation.
Logged

zi3mn1ak

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Fatal error: Out of memory
« Reply #2 on: February 17, 2008, 02:11:21 pm »

What? I don't understand you! :/  Plz help me!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Fatal error: Out of memory
« Reply #3 on: February 17, 2008, 02:16:13 pm »

OK, sorry - I misunderstood; I thought the line
Code: [Select]
// Added hackwas an actual hack, but it's core. So the initial suggestion I posted doesn't apply.
My friends, said me that, I Must restart the server, but admin, on the webd.pl, said that it's is problem with code.
Your friend is wrong. Is the server yours to administer, or are you webhosted? Post a link to your gallery for a start.
Logged

zi3mn1ak

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Fatal error: Out of memory
« Reply #4 on: February 17, 2008, 02:40:56 pm »

I'am a webhosted, but i have got access to FTP, etc.

www.icet.webd.pl/forum/


I have got this error;

Fatal error: Out of memory (allocated 14155776) (tried to allocate 282100 bytes) in /home/icet/public_html/forum/include/functions.inc.php on line 2040


but other persons, have got only white page.
Logged

zi3mn1ak

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Fatal error: Out of memory
« Reply #5 on: February 17, 2008, 02:47:22 pm »

oh, I don't know why, but now i don't have got any errors, only white page, but my page dont move
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Fatal error: Out of memory
« Reply #6 on: February 17, 2008, 05:03:14 pm »

I do see a gallery on the url you gave.
Before any support can be given please upgrade. You are running <!--Coppermine Photo Gallery 1.4.14 (stable)--> at the moment.
Download and upgrade to 1.4.16 a.s.a.p.

Cheers
Hein
Logged

zi3mn1ak

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Fatal error: Out of memory
« Reply #7 on: February 21, 2008, 09:24:08 pm »

How can I do upgrade to 1.4.16 ? I downloaded this, and what I must do now? If I don't want to lose my images, bits, on the gallery?

btw. 3 days ago, my gallery, worked good, but now once more, I see this error! :(
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Fatal error: Out of memory
« Reply #8 on: February 22, 2008, 08:02:26 am »

Logged

zi3mn1ak

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Fatal error: Out of memory
« Reply #9 on: February 22, 2008, 01:49:40 pm »

on the start i have got a problem;

'First, make a backup (dump) of your database.'

How can I make a backup of my database? I don't uderstand ;/
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Fatal error: Out of memory
« Reply #10 on: February 22, 2008, 02:06:17 pm »

There is a plugin by Frantz which can take care of that. Or you can use PhpMyAdmin to do it. Or ask your hoster if this is all abracadabra for you.

Cheers
Hein
Logged

zi3mn1ak

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Fatal error: Out of memory
« Reply #11 on: February 22, 2008, 02:26:04 pm »

Can you give me this plugin? I can't find this :(
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Fatal error: Out of memory
« Reply #12 on: February 22, 2008, 02:35:11 pm »

It is called the SEARCH function and yes this board has one. Do not expect to be spoon fed. Use the Search function.

If you would have done so and would have searched using words such as "database backup plugin" you would have found as first option in the outcome of that search the following link:

http://forum.coppermine-gallery.net/index.php/topic,40439.0.html

Cheers
Hein
Logged

zi3mn1ak

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Fatal error: Out of memory
« Reply #13 on: February 22, 2008, 02:37:38 pm »

sorry for problem, I found this :)
Logged

zi3mn1ak

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Fatal error: Out of memory
« Reply #14 on: February 22, 2008, 04:27:28 pm »

ok, so I did a update, and I have got again this error :(
so, where is a problem?! :/
Logged

zi3mn1ak

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Fatal error: Out of memory
« Reply #15 on: February 24, 2008, 04:55:21 pm »

Comone! Help me plz
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Fatal error: Out of memory
« Reply #16 on: February 24, 2008, 08:51:18 pm »

Well the error message says that you have run out of memory. So my guess is that you're running out of memory.
Logged

zi3mn1ak

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Fatal error: Out of memory
« Reply #17 on: February 24, 2008, 10:02:35 pm »

ok, so say me, how can I repair this?!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Fatal error: Out of memory
« Reply #18 on: February 25, 2008, 08:24:44 am »

Get more memory.
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Fatal error: Out of memory
« Reply #19 on: February 25, 2008, 08:31:38 am »

To be more specific, get more memory for the server and not your own server.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.021 seconds with 19 queries.