yes, it is NOT the most convenient, query you could imagine. UPDATE `table_name` SET `column_name` = REPLACE(`column_name`, ‘replace_this’, ‘with_this’) WHERE `column_name` LIKE ‘%with_this%’ COLLATE utf8mb4_bin; it is what phpmyadmin generates when you go here:
there are a lot of service providers where you can rent a virtual server… for example: hetzner, for 3€ per Month you would get 1x CPU core and 2GB of RAM, instead of VPS they also call it “cloud”, it […]
docker exec -it -u postgres example-db psql; # login interactively SELECT * FROM pg_stat_activity WHERE datname = ‘example’; # check open connections to database example # (there shall be none, otherwise you can not drop the database) SELECT pg_terminate_backend (pg_stat_activity.pid) […]
DDoS attacks are nasty stuff. Even such simple programs as – autobench – Automates the benchmarking of web servers using httperf – can sufficiently choke a webserver by spawning hundreds and thousands of mysql processes – exhausting all resources of […]
Travis CI for Complete Beginners If you’re not familiar with continuous integration and don’t already have a repository that you want to build, this guide will show you what it is all about. You need to sign up for a […]
No matter if you decide to for [cc lang=”php” escaped=”true” width=”600″] [/cc] it will set a cookie this way or another. Cookies are sent by the server to the browser and only the domain that ordered the cookie to be […]
( ! ) Parse error: syntax error, unexpected ‘::’ (T_PAAMAYIM_NEKUDOTAYIM), expecting ‘&’ or variable (T_VARIABLE) in /some/code.php on line 1321 “T_PAAMAYIM_NEKUDOTAYIM” Its Hebrew for “double colon“. http://stackoverflow.com/questions/592322/php-expects-t-paamayim-nekudotayim Did you know that ZEND (PHP) is a israeli company? onyourlinuxcommandline# php-cgi […]
From a flexibility point of View: This is totally correct. But what from a RAM point of view. Why have every .php script instanciate a new version of class config.php? [cc lang=”php” escaped=”true” width=”600″] I created an easy small class: […]
get in a bash shell: php -m; # list all currently activated and installed extensions [PHP Modules] bcmath bz2 calendar Core ctype curl date dba dom ereg exif fileinfo filter ftp gd gettext hash iconv imap intl json libxml mbstring […]
Fast summary: PHP + easy learning, probably better for fast prototypes/small projects – grown language, not coding standards enforced = bad for large projects (upgrade project from PHP4->5 is ugly) Ruby – hard to learn and understand (need to understand full […]
https://en.wikipedia.org/wiki/MongoDB MongoDB (from “humongous”) is a cross-platform document-oriented database. Classified as a NoSQL database, MongoDB eschews the traditional table-based relational databasestructure in favor of JSON-like documents with dynamic schemas (MongoDB calls the format BSON), making the integration of data in […]
file: ClassUser.php [cc lang=”php” escaped=”true” width=”500″] [/cc] file: ExampleClass.php [cc lang=”php” escaped=”true” width=”500″] [/cc] output is: “$class_instance” (ExampleClass) -> another_var = -> example = example sucks -> NewProperty = You just created a new propertey of the class, that is […]
if you do a mysql_select_db and you get the 1046 … it could be that the user has no access rights to that database… the error message is missleading!
… on a debian/ubuntu system… sometimes you need to know (when setting up PDT Eclipse and XDebug) where you php binary is. i found mine via: find / -name php|grep cgi /usr/lib/cgi-bin/php /etc/php5/cgi/php.ini
was taken from some pretty old heise c’t script. [cc lang=”php” escaped=”true” width=”500″] // Prüfe, ob die Empfänger/Absenderadresse einem gültigen MX-Host angehört Zu jeder Domain in einer Mailadresse (nach dem @-Zeichen) sollte ein Mail Exchange Resource Record (MX-RR) im Domain Name System (DNS) eingetragen sein. […]
Whenever a BitCoin-exchange is hacked it lowers people’s trust in the BitCoin system making the prices for BitCoins go down. Then probably come up again 😀 But there is no such thing as “perfect software” so this time it’s a […]
if the user has only (S)FTP access to the webserver: download the file.php that throws errors open it up in an text-editor place this right after <?php <?php # place this right at the start of the file.php that needs […]
create a new file in your web root lighttpd / apache: vim /var/www/info.php with the content: <?php phpinfo(); ?> access your webserver with your browser http://192.168.1.222/info.php you should get something like this: Loaded Configuration File /etc/php5/cgi/php.ini
es klingt wie ein schlechter witz….. es ist nicht (!) trivial, eine datenbank zu durchsuchen. es ist einfacher, das backup.sql einer datenbank in einem Programm ihrer wahl (Browser?, text editor?) zu öffnen und nach dem gesuchten string zu suchen. credits: http://stackoverflow.com/questions/562457/search-for-all-occurrences-of-a-string-in-a-mysql-database komischerweise […]
unfortunately, it’s not so easy to get a weather forecast widget running for your website… because (e.g. google, yahoo and co) they want to make money with providing this services… so they limit your or charge you. i tried weather underground […]