Linux : Installer plusieurs versions de xampp sans VM - Max-Koder
▻http://max-koder.fr/2017/06/12/plusieurs-versions-de-xampp-sous-linux
Linux : Installer plusieurs versions de xampp sans VM - Max-Koder
▻http://max-koder.fr/2017/06/12/plusieurs-versions-de-xampp-sous-linux
JoliCode - Typography, the right way with JoliTypo
▻https://jolicode.com/blog/typography-the-right-way-with-jolitypo
#typographie #typo #php #librairie #ponctuation
Exploitez et gérez correctement vos données JSON avec PHP - Max-Koder
▻http://max-koder.fr/2017/02/05/gerez-vos-fichiers-json-avec-php
Des exemples simples d’utilisation de JSON en PHP : json_encode() / json_decode() / jsonSerialize()
cURL : Dialogue avec une API en PHP - Max-Koder
▻http://max-koder.fr/2017/05/05/curl-dialogue-api-php
Exemples d’utilisations de cURL et de ses options pour échanger des données avec une API (GET/POST).
Voir aussi : « Exécuter une requête asynchrone avec PHP et cURL » ▻http://max-koder.fr/2017/05/11/executer-une-requete-asynchrone-avec-php-et-curl
Installer Apache, MySQL et PHP sous OSX sans passer par MAMP - Elliptips : Elliptips
▻http://elliptips.info/installer-apache-mysql-et-php-sous-osx-sans-passer-par-mamp
Venant tout juste de changer de Mac, je découvre Mountain Lion et je me suis dit qu’il était temps de mettre un peu d’ordre dans mon environnement de développement. J’avais l’habitude d’utiliser MAMP pour le développement web, car celui-ci a l’avantage indéniable de fournir un package prêt à l’emploi, le tout en un clic. Revers de la médaille, il nous rend tributaire des versions de logiciels qu’il propose et s’intègre parfois mal avec d’autres environnements. Ainsi, nous verrons dans ce tutoriel comment mettre en place un stack AMP (#Apache, #MySQL et #PHP) sous Mac #OSX simplement et rapidement, le tout en utilisant au maximum les outils déjà intégrés au système.
Relancer mysql
brew services restart mysql
Relancer apache
sudo apachectl graceful
tail -F /var/log/apache2/error_log
Détail install #apache sur osx
Vérifier que tout va bien : apachectl configtest
En cas de soucis voir : ▻https://apple.stackexchange.com/questions/211015/el-capitan-apache-error-message-ah00526
Config des modules apache : sudo vim /etc/apache2/httpd.conf
Décommenter
LoadModule php5_module libexec/apache2/libphp5.so
LoadModule userdir_module libexec/apache2/mod_userdir.so
Include /private/etc/apache2/extra/httpd-userdir.conf
Activer les préférences utilisateurs sudo vim /etc/apache2/extra/httpd-userdir.conf
Décommenter
Include /private/etc/apache2/users/*.conf
Déclarer un fichier de configuration utilisateur sudo vim /etc/apache2/users/USERNAME.conf
qui inclut des vhosts persos dans placés dans /Sites
de manière à les changer facilement.
Ajouter
Include /Users/USER/Sites/httpd-vhosts.conf
Déclarer les vhosts persos dans /Users/USER/Sites/httpd-vhosts.conf
Ajouter
<Directory "/Users/USER/Sites/">
AllowOverride All
Options Indexes MultiViews FollowSymLinks
Require all granted
</Directory>
<VirtualHost *:80>
ServerName localhost
ServerAlias local.dev
DocumentRoot "/Users/USER/Sites"
</VirtualHost>
<VirtualHost *:80>
ServerName spip
ServerAlias spip.local
DocumentRoot "/Users/USER/Sites/spip"
</VirtualHost>
Note : plutôt que de passer par les httpd-userdir.conf
peut-être vaut-il mieux passer par Include /private/etc/apache2/extra/httpd-vhosts.conf
car en fait on a pas vraimment plusieurs utilisateurs sur la machine...
Voir : ▻https://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-10-yosemite
Attention à la version d’apache pour déclarer le fichier : ▻https://coolestguidesontheplanet.com/forbidden-403-you-dont-have-permission-to-access-username-
Brancher le tout sur l’internet local : sudo vim /etc/hosts
Ajouter
127.0.0.1 localhost
127.0.0.1 spip spip.local
Voir comment apache comprend sa conf : httpd -S
Régler php :
cd /etc
sudo cp php.ini.default php.ini
sudo chmod ug+w php.ini
sudo chgrp staff php.ini
Configurer php sudo vim /etc/php.ini
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/Paris
Si vous avez un accès à un disque avec votre user et votre groupe, mais pas apache, vous pouvez donner à apache votre user et votre group
sudo vim /etc/apache2/httpd.conf
#User _www
#Group _www
User vincent
Group staff
Mysql
brew install mysql
brew services list # pour démarrer mysql
mysqladmin -u root password 'yourpassword'
vim ~/.my.cnf
Ajouter
[client]
user=root
password=root
default-character-set=utf8mb4
Régler un bug
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
en cas de soucis de mot de passe root
mysqladmin -u root -p password
When it asks for a password, not not enter anything, just hit enter. It will then ask you to enter new password, then confirm. Finished.
la même en propre et clair : ▻https://github.com/BoOz/terminal/blob/master/APACHE_MYSQL_PHP.md
#ComposerPHP Release 1.4.0
▻https://github.com/composer/composer/releases/tag/1.4.0
Improved memory usage of dependency solver
—> ▻https://getcomposer.org/doc/articles/autoloader-optimization.md
#php
After 10 years, I’m stopping my work on sabre/dav
▻https://evertpot.com/sabredav-eol
If I don’t find new maintainers within a month or so, I will advertise these projects as being ‘unmaintained’ and unsubscribe from any notifications.
#php
L’article dont il parle "What it feels like to be an open-source maintainer” by Nolan Lawson", traduit en français :
►https://seenthis.net/messages/575777
Vous utiliseriez quelle solution #php pour indéxer et faire une recherche booléenne ou plein texte sur un corpus de ~15000 documents d’environ 200 mots chacuns ?
Nous on utilise #Sphinx, et Seenthis aussi, et le Diplo aussi. :)
Enfin plus précisément c’est un client PHP qui requête le Sphinx. Donc il faut pouvoir installer Sphinx sur la machine ou ailleurs peu importe, mais pouvoir l’installer quelque part.
#Docker pour les développeurs #PHP · Erwan Richard
▻https://blog.erichard.info/post/docker-pour-les-developpeurs-php
Un retour d’expérience et un guide de mise en place de Docker pour les développeurs PHP mais pas que…
patrickschur/language-detection: A language detection library for #PHP. Detects the language from a given text string.
▻https://github.com/patrickschur/language-detection
This library can detect the language of a given text string. It can parse given training text in many different idioms into a sequence of #N-grams and builds a database file in JSON format to be used in the detection phase. Then it can take a given text and detect its language using the database previously generated in the training phase. The library comes with text samples used for training and detecting text in 106 languages.
@fil ça pourrait pit-être servir à ►https://zone.spip.org/trac/spip-zone/browser/_plugins_/plugins_seenthis/detecter_langue ?
PHP Becomes First Programming Language to Add Modern Cryptography Library in Its Core
▻https://www.bleepingcomputer.com/news/security/php-becomes-first-programming-language-to-add-modern-cryptography-
The PHP team has unanimously voted to integrate the Libsodium library in the PHP core, and by doing so, becoming the first programming language to support a modern cryptography library by default.
The proposal to embed Libsodium (also known as Sodium) into the PHP standard library came from Scott Arciszewski, Chief Development Officer at Paragon Initiative Enterprises, a man that has campaigned for stronger cryptography in PHP CMSes in the past.
Libsodium integration arriving with PHP 7.2
The PHP team approved his proposal with a vote of 37 to 0 and decided that Libsodium will be added to the upcoming PHP 7.2 release that will be launched towards the end of 2017. The current PHP version is 7.1.2.
#Php renforce encore ses positions sur le Web !
▻http://www.dsfc.net/developpement/php-developpement/php-renforce-encore-ses-positions-sur-le-web
PHP est passé à 82.5% des parts de marché en ce qui concerne les langages de développement utilisés sur les serveurs Web.
#Apache #Formateur_Apache #Formateur_LAMP #Formateur_PHP #FPM #Lamp #php #PHP-FPM #Zend_opcache
bcosca/fatfree: A powerful yet easy-to-use #php micro-framework designed to help you build dynamic and robust Web applications - fast!
▻https://github.com/bcosca/fatfree
Condensed in a single ~65KB file, F3 (as we fondly call it) gives you solid foundation, a mature code base, and a no-nonsense approach to writing Web applications. Under the hood is an easy-to-use Web development tool kit, a high-performance URL #routing and cache engine, built-in code highlighting, and support for multilingual applications. It’s lightweight, easy-to-use, and fast. Most of all, it doesn’t get in your way.
F3 supports both SQL and NoSQL databases off-the-shelf: MySQL, SQLite, MSSQL/Sybase, PostgreSQL, MongoDB and its own lightning fast Flat-File DB (we call it Jig). It also comes with powerful object-relational mappers for data abstraction and modeling that are just as lightweight as the framework. No configuration needed.
F3 can also shield you from spam and DoS attacks, by performing DNSBL checks. It can increase your server health and uptime, by controlling web server traffic with profile analysis and bandwidth throttle.
Petit mais costaud, ça fait plus « out of the box » que Lumen et Silex.
Pas mal pour faire une API Rest rapidement, entre autres.
2017 : un projet de #Moteur_de_recherche !?
▻http://www.dsfc.net/developpement/php-developpement/2017-un-projet-de-moteur-de-recherche
Je tiens à vous souhaiter tous mes vœux de réussite pour cette année 2017.
#Php #Formateur_MariaDB #Formateur_PHP #Full-Text_Search #MariaDB #MongoDB #php
▻https://laurent22.github.io/so-injections
PHP, stackoverflow ou la fragmentation de l’expertise.
Une statistique un peu effrayante sur les injections SQL proposées en solution à des problèmes PHP sur stackoverflow.
C’est un sujet de discussion récurrent et souvent trollesque, en l’absence de fait. Les langages rapidement utilisables et répandus font l’objet de nombreux tutoriaux répandant et légitimant des mauvaises pratiques. Plus portés par l’enthousiasme qu’une compréhension profonde, ces supports sont tellement orientés vers la mise en oeuvre d’une fonctionnalité qui tombe en marche que d’autres aspects sont au mieux ignorés, au pire combattu, comme la maintenabilité ou la sécurité.
Pour PHP, Laurent22 fait pour nous la chasse aux solution proposant des injections SQL sur Stackoverflow.
Ça c’est un début de fait, à valider.
#MySQL : la limite des 1000 caractères pour un index unique
▻http://www.dsfc.net/developpement/php-developpement/mysql-limite-1000-caracteres-index-unique
MySQL est limité à des colonnes de 1000 caractères pour ses index uniques !
#Php #Formateur_MariaDB #Formateur_MySQL #MariaDB #MD5 #Moteur_de_recherche
5 open source alternatives to Trello | Opensource.com
▻https://opensource.com/alternatives/trello
▻https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/kanban-board.png?itok=doU_qTRK
Da war mal Trello
►https://trello.com
▻https://en.wikipedia.org/wiki/Trello
Aber das war eigentlich auch nichts wirklich Neues, so dass zügig Clones und Alternativen entstanden.
Framasoft bietet zum Beispiel Kanboard als kostenlosen Service an.
►https://framaboard.org
▻https://kanboard.net
Dann schauen wir uns noch Slack an.
▻https://slack.com/is
▻https://en.wikipedia.org/wiki/Slack_(software)
Auch dazu gibt es verschiedene Open-Source-Alternativen
Mattermost
▻https://about.mattermost.com
Restyaboard
▻http://restya.com/board
Wekan
▻https://github.com/wekan/wekan
Taiga
▻https://taiga.io/#pricing
▻https://opensource.com/business/14/10/taiga-open-source-project-management-tool
▻http://taigaio.github.io/taiga-doc/dist/api.html
▻https://tree.taiga.io/discover
Transformap nutzt Taiga
►https://tree.taiga.io/project/transformap
Man kann Taiga selber aufsetzen, wenn man sowas kann ...
▻https://taigaio.github.io/taiga-doc/dist
▻https://github.com/taigaio
Komplexere Strukturen brauchen automatisierte Verbindungen zwischen Projekten, Servern und Komponenten, und der Erfolg von IFTTT und Zapier hat ebenfalls etliche freie Alternativen inspiriert.
Open Source IFTTT Alternatives - AlternativeTo.net
▻http://alternativeto.net/software/ifttt/?license=opensource
What are some open-source alternatives to Zapier? - Quora
▻https://www.quora.com/What-are-some-open-source-alternatives-to-Zapier
Besonders interessant sieht Huginn aus.
Huginn: Das kann die Open-Source-Alternative zu IFTTT | t3n
▻http://t3n.de/news/huginn-ifttt-alternative-open-source-540123
Das Empire kann geschlagen werden.
How Platform Coops Can Beat Death Stars Like Uber to Create a Real Sharing Economy - Shareable
►http://www.shareable.net/blog/how-platform-coops-can-beat-death-stars-like-uber-to-create-a-real-sharin
PHP : hash - Manual
▻http://php.net/manual/en/function.hash.php
Pour chiffrer une chaine de caractères (mot de passe etc), utiliser de préférence hash()
avec l’algo sha256
plutôt que md5()
Name of selected hashing algorithm (e.g. “md5”, “sha256”, “haval160,4”, etc..)
#chiffrement #php #sha256
Version courte testée et approuvée ici :
▻http://drup.org/install-php-56-ubuntu-1604
add-apt-repository ppa:ondrej/php
apt-get update
apt-get install php5.6 libapache2-mod-php5.6 php5.6-curl php5.6-gd php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-sqlite3 php5.6-xml
a2dismod php7.0
a2enmod php5.6
service apache2 restart
sidkshatriya/dontbug: Dontbug is a reverse #debugger for #php
▻https://github.com/sidkshatriya/dontbug
Dontbug is a #reverse_debugger (aka time travel debugger) for PHP. It allows you to record the execution of PHP scripts (in command line mode or in the browser) and replay the same execution back in a PHP IDE debugger. During replay you may debug normally (forward mode debugging) or in reverse, which allows you to step over/out backwards, step backwards, run backwards, run to cursor backwards, set breakpoints in the past and so forth. Debugging with the ability to run in reverse allows you to hunt down bugs much more easily. It also allows you to understand the runtime behavior of large PHP codebases more (...)
phpseclib: pure PHP implementations of SSH, SFTP, RSA and X.509
►http://phpseclib.sourceforge.net
Une API alternative à libssh2 de PHP:
phpseclib is designed to be ultra-compatible. It works on PHP4+ (PHP4, assuming the use of PHP_Compat) and doesn’t require any extensions. For purposes of speed, mcrypt is used if it’s available as is gmp or bcmath (in that order), but they are not required.
Interoperability
phpseclib is designed to be fully interoperable with OpenSSL and other standardized cryptography programs and protocols.
Taking PHP Seriously
▻https://slack.engineering/taking-php-seriously-cf7a60065329
“Did Facebook, Wikipedia, Wordpress, Etsy, Baidu, Box, and more recently Slack all succeed in spite of using PHP? Would they all have been better off expressing their application in Ruby? Erlang? Haskell?”
Mes outils de développements #PHP
▻http://james.at.rezo.net/Mes-outils-de-developpements
Dans tous les projets PHP que je fais, reviennent à peu près toujours les mêmes besoins :
–Faire des tests,
–M’assurer que le code respectent certaines conventions et standards,
–Vérifier que le code fonctionnera pour un maximum de version de PHP.
Best practices for handling exceptional behavior — Nikola Poša
▻http://blog.nikolaposa.in.rs/2016/08/17/exceptional-behavior-best-practices
Dealing with exceptional situations is often neglected aspect of application development. For most, the first association of the notion is throwing/catching #exceptions, but actually it is quite a broad topic.
#PHP
A Response To #php- The Wrong Way — Medium
▻https://medium.com/@jon.lemaitre/a-response-to-php-the-wrong-way-fe7bb253e295
Il y a quelqu’un qui a créé un site nommé « PHP - The Wrong Way » qui a la prétention de lutter contre l’emprise de ces développeurs de framework qui ont pour seule envie d’enfermer la naïve communauté PHP dans leur toile d’abstraction et de coolitude dans le but d’être vénéré. L’article lié est un examen point par point de sa mauvaise foi et de ses sophismes. — Permalink