Skip to content

PHP “Exception not found”

I have a somehow funny issue. While trying to understand why a certain website returns http code 500 to browser, I found the message PHP Fatal error: Class ‘MZ\MailChimpBundle\Services\Exception’ …

PHP Get name of current directory

I have a php page inside a folder on my website. I need to add the name of the current directory into a variable for example: $myVar = current_directory_name; Is this possible?

PHP Imagick memory leak

I have to render something with Imagick on PHP CLI. I have noticed that every 3-5 days the server memory gets full, so i can’t even connet via ssh or ftp. with memory_get_usage() i narrwoed the memory leak down to the imagick part of the script. the script looks something like this: I destroy the image …

How to ignore fields when fetching results using Propel?

I need to ignore fields instead of select fields in fetch data or reverse select fields. Is that possible? If yes, how? Answer Regarding to the documentation, it’s not possible: http://propelorm.org/reference/model-criteria.html#getting-columns-instead-of-objects But you can do it on your own. Built an …

can not access to database in moodle

I am using moodle and I change location of my web site, but I am facing this error. My config.php is: And my error is: Error: Database connection failed. It is possible that the database is overloaded or otherwise not running properly. The site administrator should also check that the database details have be…

How do I get the local IP address of the server using PHP?

I am developing a PHP application that will be run only on the local network of a business. The application will be installed to the server using a custom installer like thing we made using Stunnix Advanced Webserver. As part of making the application more user friendly I am planning to display the LOCAL IP o…

How to clear a table in hbase?

I want to empty a table in hbase… eg: user. Is there any command or function to empty the table without deleting it… My table structure is : Can someone help me? Answer There’s no single command to clear Hbase table, but you can use 2 workarounds: disable, delete, create table, or scan all r…