Jump to content

woah fatal error :/


0perator

Recommended Posts

The error message told you that already....

16777216/1024(megabytes)/1024(gigabytes) = 16 gb Which is a lot higher than 16 mb.

 

But the problem is not within the php it is his hardware he doesn't have enough Randomly Accessed Memory(RAM) to run everything on his home computer plus the server applications. Thus he gets an error stating that he cannot allocate 8 mb of ram.

 

Then do CTRL + ALT + DEL its the task manager.

*CTRL + SHIFT + ESC is a shortcut for Vista users.

Link to comment
Share on other sites

From the php manual -

memory_limit integer

This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. Note that to have no memory limit, set this directive to -1.

 

Prior to PHP 5.2.1, in order to use this directive it had to be enabled at compile time by using -enable-memory-limit in the configure line. This was also required to define the functions memory_get_usage() and memory_get_peak_usage().

 

When an integer is used, the value is measured in bytes. You may also use shorthand notation as described in this FAQ.

Please read my posts in this thread.

Link to comment
Share on other sites

Your script must be huge then because using 540 MB of ram then still needing 6 MB is ridiculous. Make sure you don't have a loop that is trying to continue to infinity.

 

@PFMaBiSmAd:

If you read my second post it explains that "Allowed memory size of 16777216 bytes exhausted"

means that the allowed memory is already set to 16 GigaBytes I think he doesn't have a problem with the internal setting.

Link to comment
Share on other sites

this is my code

<?php
$allowed = array('index.php');
$page = $_GET['page'];

if(!empty($page))
{
$page .= '.php';

if(in_array($page, $allowed))
{
	include($page);
}
}

else
{
include($allowed[0]);
}
?>

<html>
<head>
<title>
.:hakman:.
</title>
</head>
<body>
<body bgcolor="black">
<font color="green">
<center>
text here la la la
</font>
</body>
</html>

 

i have tried it on another subdomain of mine and it works, just wana know how to get it to work on the one i am meant to be using.

 

Link to comment
Share on other sites

What's in "index.php"?  What's the name of the script that you're running? Hopefully, it's not "index.php", because if it is, you're trying to include the same file over and over again until you run out of memory.

 

Ken

Link to comment
Share on other sites

Guest Xanza
16MB is the default memory_limit setting in current versions of php. You need to set this to a higher value either in php.ini, a .htaccess file, or in your script (using an ini_set() statement.)

 

You'll need to manually edit your php.ini file on your Linux version of PHP, or Apache, which ever you're using. You're installation is stopping you, nothing else.

 

<?php
phpinfo();
?>

 

Run that on your server, and look under the configuration of the PHP Core and find: "memory_limit", yours is set to 16MB, mine for example is 128MB (just to be safe). You should probably set yours to about 50MB or even less.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.