Skip to content
Advertisement

Tag: fatal-error

php simple rand() look up taking long / crashing browser?

I’m running this code: First loads of the page are usually super fast. Then suddenly: Fatal error: Maximum execution time of 120 seconds exceeded It’s either working super fast or crashing. Can someone help me understand why this is? Thank You Answer You have committed a “logic” mistake. If $n1 = rand(1,20); sets $n1 to any number from 11 to

Allowed Memory Size Fatal Error; Improve Script

I have the following function which returns a formatted table to me showing me the list of browsers that viewed the website. It is retrieved from the MySQL Database and the User Agent (I know not totally reliable but it’s good enough for this at this point in time). However; this function (and another that does operating system from the

Fatal error while: sudo pecl install mongodb

I have problem to install mongodb with pecl. After sudo pecl install mongodb it’s always give me fatal error: ‘php.h’ file not found #include 1 error generated. make: *** [php_phongo.lo] Error 1 ERROR: ‘make’ failed System MacOS Mojave, Xcode was updated Thanks! Answer Problem was probably that I install oldest version PHP than was installed on my mac, after changing

Why does ‘Cannot break/continue 1 level’ comes in PHP?

I am getting sometimes this error on production at: I have tried to reproduce this issue. But not getting any progress. $Id, $Properties having value received. Does anyone know when does ‘Cannot break/continue 1 level’ comes in PHP? I have seen this post PHP Fatal error: Cannot break/continue. But didn’t got any help. Answer You can’t “break” from an if

Fatal error: Declaration of .. must be compatible with .. PHP

I’m getting the following error: What could be the problem? I can’t find it script: Answer Ishoppingcart::addToCart() states that the method does not take any parameter, while the implementation Shoppingcart::addToCart(Product $product) requires that a parameter of type Product must be passed into the method. This means that both declarations are incompatible and while the implemented interface must be satisfied PHP

PHP Fatal error: Using $this when not in object context

I’ve got a problem: I’m writing a new WebApp without a Framework. In my index.php I’m using: require_once(‘load.php’); And in load.php I’m using require_once(‘class.php’); to load my class.php. In my class.php I’ve got this error: Fatal error: Using $this when not in object context in class.php on line … (in this example it would be 11) An example how my

Advertisement