background preloader

PHP

Facebook Twitter

Custom PHP.ini tips and tricks. .htaccess code from Ultimate htaccess file ^ AddHandler application/x-httpd-php .php .htm AddHandler php-cgi .php .htm AddHandler phpini-cgi .php .htm Action phpini-cgi /cgi-bin/php5-custom-ini.cgi AddHandler fastcgi-script .fcgi AddHandler php-cgi .php .htm Action php-cgi /cgi-bin/php5-wrapper.fcgi AddHandler php-cgi .php .htm Action php-cgi /cgi-bin/php.cgi When php run as Apache Module (mod_php) ^ in root .htaccess SetEnv PHPRC /location/todir/containing/phpinifile.

Custom PHP.ini tips and tricks

Detector [BETA] - combined browser- & feature-detection for your app. Php cache class. Chrisbliss18/php-ico. Whoops! - php errors for cool kids. Features Includes providers for Silex and Zend Framework 2, with community-provided support for other platforms and frameworks Now included in the Laravel 4 core!

whoops! - php errors for cool kids

Detailed & intuitive page for errors and exceptions (PrettyPageHandler) Code view for all frames in a stack trace with line highlights (PrettyPageHandler) Frame comments & analysis through custom middle-ware/handlers (PrettyPageHandler) Request & app-specific information through custom middle-ware/handlers (PrettyPageHandler) JSON & AJAX support (JsonResponseHandler) XML & SOAP support (XmlResponsehandler, SoapResponseHandler) Clean and tested code-base that's easy to extend and build on to make it work just right for your project Download With Composer: $ cd my_project $ composer install Use In your Silex project, register the bundled Service Provider: $app->register(new Whoops\Provider\Silex\WhoopsServiceProvider); For integration instructions with other frameworks or platforms, check out the README file. require __DIR__ .

PHP Emailing

PHP CMS. PHP Framework. PHP IDE. Linux: 25 PHP Security Best Practices For Sys Admins. PHP is an open-source server-side scripting language and it is a widely used.

Linux: 25 PHP Security Best Practices For Sys Admins

The Apache web server provides access to files and content via the HTTP OR HTTPS protocol. A misconfigured server-side scripting language can create all sorts of problems. So, PHP should be used with caution. Here are twenty-five php security best practices for sysadmins for configuring PHP securely. Our Sample Setup For PHP Security Tips DocumentRoot: /var/www/htmlDefault Web server: Apache ( you can use Lighttpd or Nginx instead of Apache)Default PHP configuration file: /etc/php.iniDefault PHP extensions config directory: /etc/php.d/Our sample php security config file: /etc/php.d/security.ini (you need to create this file using a text editor)Operating systems: RHEL / CentOS / Fedora Linux (the instructions should work with any other Linux distributions such as Debian / Ubuntu or other Unix like operating systems such as OpenBSD/FreeBSD/HP-UX).Default php server TCP/UDP ports: none #1: Know Your Enemy . # ....

Detecting Mobile Devices Using PHP. Don't you wish there were an easy way to detect whether your web site visitor is connecting with a desktop PC or a mobile device of some sort? The good news is that using PHP (or another server-based scripting language), it's sort of easy to detect some devices by parsing the UserAgent string. Because the code is run on the server rather than in the browser itself (such as JavaScript), these PHP-based techniques yield better reliability in detecting mobile devices. Just remember that there are lots of important caveats, including: These techniques depend on the contents of the UserAgent string.

As a result, these techniques may not work if the browser is emulating a different one (e.g., some mobile browsers can be set to emulate Internet Explorer). Introducing the "uagent_info" Class I created a PHP class called "uagent_info" to encapsulate the logic for detecting mobile devices. Here is a sample block of the code so you can see how it is organized: Using the "uagent_info" Class. Imdbphp. Free scripts downloads. Freeware PHP Scripts. PHP JPEG Progressive Check. PhpFlickr - Zenphoto - Simpler web gallery management.