2016/11/30 シンボリックリンク切り換えデプロイを行った際に起きるOPcacheの問題はnginx+php-fpm環境でのみ起きるのか? PHP サーバーサイド はじめに こんにちは、@tsukimiyaです。シンボリックリンク切り換えによるホットデプロイ、したいですか?シンボリックリンク切り換えによるデプロイはアトミックなデプロイを低コストで実現する手段です。最近はDeployerやCapistranoなどシンボリックリンク切り換えによるデプロイ作業を簡単に行うためのツールも充実し、自分で頑張ってシェルスクリプトを書かずとも低コストでシンボリックリンク切り換えデプロイを行う事が可能です。 ただ、PHPでのシンボリックリンクの切り換えによるデプロイについてネット上を見ていると「nginx+php-fpm環境でOPcacheを有効にしているとシンボリックリンクを切り換えてもキャッシュ
When it comes to fast loading WordPress sites, caching is crucial. A well-optimized page cache can dramatically improve load time for visitors and reduce the load on your server. It’s a win-win situation! However, not all page caching solutions are equal. A simple plugin search for “caching” on WordPress.org will return thousands of results. But WordPress caching plugins aren’t the only options av
先日PHPカンファレンス北海道2016にて「『例えば、PHPを避ける』以降PHPはどれだけ安全になったか」と題して基調講演を担当致しました。その際のスライドはこちら。 そうしたところ、以下のご指摘をいただきました。 @ockeghem スライド拝見しました。39番目のスライドですが、バインドのタイミングでintにキャストするのはちょっと例として良くない気がします。意図的にオーバーフローを起こすことで想定外のレコードの取得を許してしまいそうです。キャストしない方がまだ安全だと思うのですが。 SQLデータベースは、int型よりも大きな桁数を扱える場合があるので、intへのキャストを避けた方がよいという指摘は一般論としてはもっともなものだと考えます。PHPの場合、9223372036854775807を越える数字文字列をint型にキャストすると、9223372036854775807が返ります(
PHP has one data structure to rule them all. The array is a complex, flexible, master-of-none, hybrid data structure, combining the behaviour of a list and a linked map. But we use it for everything, because PHP is pragmatic: “dealing with things sensibly and realistically in a way that is based on practical rather than theoretical considerations”. An array gets the job done. Unfortunately, with f
Notice!! Since Docker and all tools provided are moving fast, you shouldn’t be reading this post. We’ve written a new post about PHP development and Docker at Yappa. You can read it here: http://tech.yappa.be/docker-php-development I’ve been using the Vagrant provisioned-with-Ansible-setup for a while now. But for the last month(s) I’ve been playing around with things like: Docker, boot2docker, Co
Română ОСТОРОЖНО, ЭТОТ МЕБЕЛЬЩИК ИЗ БЕНДЕР ВОРУЕТ ДЕНЬГИ КЛИЕНТОВ! В октябре 2021 года по рекомендации обратились к мебельщику ROMAN TRACI (Роман Трач), S.R.L "CORPUS GRUP" (г.Кишинев) для изготовления мебели в детскую комнату. Был заключен контракт, который предполагал срок изготовления мебели - 45 дней. Но спустя это время мебель мы не получили. Поскольку этого мебельщика нам рекомендовал челове
My current project sees Celery (a python distributed task queue) added to my PHP application. There’s a handy PHP interface to the RabbitMQ that Celery uses as a backend, which makes it easy for me to create jobs, called celery-php. This requires either the PECL AMQP extension or alternatively it has experimental support for the PHP library for AMQP – I would normally prefer the PECL version but r
OverviewDataFunctionsNestingLayoutsSectionsInheritanceEscapingSyntaxExtensionsAssetURICommunityIntroduction AboutPlates is a native PHP template system that’s fast, easy to use and easy to extend. It’s inspired by the excellent Twig template engine and strives to bring modern template language functionality to native PHP templates. Plates is designed for developers who prefer to use native PHP tem
元ネタはこちら。 Apache AddHandler madness all over the place Gentoo Bug 538822 どういうことか 次のような指定は危険である。 AddHandler php5-script .php この時に指定される.phpはファイル名の末尾である必要はない。例えば、 aaa.php.html bbb.php.pngなどもphp5-scriptとして解釈されてしまうのだ。これは.XXX.YYYと複数の拡張子が書かれた場合、.XXXと.YYYもAddHandlerの対象となることが原因。 ちなみに次のような場合にはphp5-scriptとして解釈されない。 ccc.php_foo (.php_fooとして解釈されるため) ddd.php_bar.html (.php_barと.htmlとして解釈されるため)実はこのことはApacheのドキュメン
There’s currently a proposal that’s under vote to add Scalar Typing to PHP (it has since been withdrawn). It’s been a fairly controversial RFC, but at this point in time it’s currently passing with 67.8% of votes. If you want a simplified breakdown of the proposal, check out Pascal Martin’s excellent post about it. What I want to talk about is more of an opinion. Why I believe this is the correct
After yesterday’s post, I decided to do some math to see how many PHP installs had at least 1 known security vulnerability. So I went to grab statistics from W3Techs, and correlated that with known Linux Distribution supported numbers. I then whipped up a spreadsheet and got some interesting numbers out of it. So interesting, that I need to share… UPDATE:Wow, this post got traction pretty fast. I
ini_get('mbstring.internal_encoding') と mb_internal_encoding() の値が異なるらしいので調べてみました。 後半ではmbstring.language や mb_regex_encoding との影響についても記述します。 ソースを読んで自分なりに解釈しましたが、間違い等あればご指摘ください。 環境 Mac OS X 10.7.5 PHP 5.3.15 with Suhosin-Patch (cli) Zend Engine v2.3.0 現象を確認 まずは次のコードにて確認してみます。 <?php // 出力確認用の関数 function p($title) { echo $title . PHP_EOL; echo ' mb_internal_encoding():' . mb_internal_encoding() . PHP
If you’ve been following the news, you’ll have noticed that yesterday Composer got a bit of a speed boost. And by “bit of a speed boost”, we’re talking between 50% and 90% reduction in runtime depending on the complexity of the dependencies. But how did the fix work? And should you make the same sort of change to your projects? For those of you who want the TL/DR answer: the answer is no you shoul
Welcome to the best online PHP shell3v4l.org (leetspeak for eval) is an online shell that allows you to run your code on my server. I compiled more than 250 different PHP versions (every version released since 4.3.0) for you to run online. For every script you submit, this site tells you: Output from all released, plus upcoming alpha/beta/RC PHP versionsPerformance (time and memory) of every versi
Super easy to install Most database migration tools are framework dependent, complicated, confusing to install/configure and a pain in the ass to write migrations for. In less than 5 minutes you can install Phinx, create and execute your first migration. Write migrations in Pure PHP or SQL Phinx supports migrations written in both PHP and SQL. Use the PHP syntax to make your migrations portable be
Aug 30, 2014 ニュージーランドのカンファレンスに参加し、発表も行ってきました。 カンファレンスにはPHPの作者であるRasmus Lerdorf氏も来ておりその講演内容は別途、記事にします。 今回はその中で感じ、印象に残った事について書きます。 New Zealand PHP Conference Christian氏の情熱 Christion 今回のカンファレンスで最も記憶に残ったのは僕を招待してくれた本人でもあるChristian Mazur氏の情熱です。 彼はアルゼンチンから家族でニュージーランドに引っ越してまもなく、PHPNZのMeetupの活動をスタートさせ、そこに地元の有力なWeb系企業であるSilverstripeなどからメンバーが加わる形で移住から一年を待たずして国際的なカンファレンスを開催し、成功させる立役者となりました。 Home - SilverStrip
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く