Fatal error: out of dynamic memory in yy_create_buffer()

simonrw
simonrw's picture

Joined: 2002-09-16
Posts: 5
Posted: Sun, 2002-11-03 20:50

I'm getting this error when I open the gallery admin page

Fatal error: out of dynamic memory in yy_create_buffer() in /usr/local/etc/httpd/htdocs/gallery/util.php on line 490

Does anybody know if this is related to the 8M memory limit thing for PHP?

The Gallery appears to be working fine apart from that I just can;t open this page

Appreciate any help

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7985
Posted: Mon, 2002-11-04 07:14

What version of Gallery do you have? (I need to know what line 490 of your util.php is).

What version of PHP?

 
simonrw
simonrw's picture

Joined: 2002-09-16
Posts: 5
Posted: Mon, 2002-11-04 16:24

Thanks Bharat

I'm using PHP version 4.2.2

Line 490 in util.php is highlighted in Bold Below in context.

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> function includeHtmlWrap($name) {
global $GALLERY_BASEDIR;

// define these globals to make them available to custom text
global $gallery;
$fullname = $GALLERY_BASEDIR . "html_wrap/$name";

if (fs_file_exists($fullname) &amp;&amp; !broken_link($fullname)) {
include ($fullname);
} else {
include ("$fullname.default");
}</TD></TR></TABLE><!-- BBCode End -->

Here are some more details about the problem:

The Gallery probably has about 1,600 photos. including Thumbs.

I have made the site so that the Gallery home page is bypassed and the links go straight the the subcategories.

The Gallery Home Page is only accessible by the administrators who know what the page name is but there have been no changes to the code on the page.

Basically we are not allowing people to upload their own photos or even giving them the option to login.

The strange thing is everything was working beautifully, and then all of a sudden the main gallery page just displays a "Page cannot be displayed" error. Even though it is there and the page has not been changed.

Apart from that the rest of the gallery works perfectly. I managed to get the admin.php page to give me the dynamic memory error yesterday but now I just get the "Page cannot be displayed"

The only thing I can think is that my client my have tinkered with the code a little, and maybe you can point me in the right direction of where to look with regards to the variable $fullname.

Thanks for your help

SIMON

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7985
Posted: Tue, 2002-11-05 18:30
Quote:
The strange thing is everything was working beautifully, and then all of a sudden the main gallery page just displays a "Page cannot be displayed" error. Even though it is there and the page has not been changed.

Hmm. What do you see in your Apache error log? Check both your vhost log and the master log, since the messages can go to both.

Try putting a "print $fullname" line directly above line util.php:490 to see which html_wrap file it's trying to include when it crashes. Try temporarily removing all your html_wrap customizations and see if the problem goes away; perhaps you're doing something in your html_wrap customizations that is causing weirdness.

 
simonrw
simonrw's picture

Joined: 2002-09-16
Posts: 5
Posted: Thu, 2002-11-07 04:26

Thanks Bharat

I'll be looking at this one for a while I think. Drew a blank on the error_log file, I'll have to check with the systems admin about that.

I'll be playing around with the wrappers soon, but it won;t be in the immediate future due to work constraints.

I'll update you if I uncover anything

Thanks for the help sofar

SIMON

 
toastmaster

Joined: 2003-05-01
Posts: 219
Posted: Sat, 2005-07-23 19:19

I'm getting this too - G2, b4, clean install on Powweb. Made and removed custom php.ini to bump up the memory, also tried forcing php5 via .htaccess.
Other aspects of my site run OK (inc G1) - looks like others have managed to install earlier betas of G2 ok on Powweb.

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Mon, 2005-07-25 07:19

You must have used the search... but krikey, that post is almost 3 years old! If its a G2 problem, try posting a new thread (or searching) in the G2 forums :)

 
toastmaster

Joined: 2003-05-01
Posts: 219
Posted: Mon, 2005-07-25 07:32