Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51484 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89635 invoked from network); 20 Feb 2011 15:50:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2011 15:50:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.160.42 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.160.42 mail-pw0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:38395] helo=mail-pw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/4C-21930-168316D4 for ; Sun, 20 Feb 2011 10:50:58 -0500 Received: by pwj5 with SMTP id 5so922855pwj.29 for ; Sun, 20 Feb 2011 07:50:55 -0800 (PST) Received: by 10.142.172.13 with SMTP id u13mr384271wfe.361.1298217054882; Sun, 20 Feb 2011 07:50:54 -0800 (PST) Received: from Anonymous.local (c-67-187-142-75.hsd1.ca.comcast.net [67.187.142.75]) by mx.google.com with ESMTPS id w19sm2244100wfd.8.2011.02.20.07.50.47 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 20 Feb 2011 07:50:53 -0800 (PST) Message-ID: <4D613854.7050702@lerdorf.com> Date: Sun, 20 Feb 2011 07:50:44 -0800 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: martin@herrman.nl CC: internals@lists.php.net References: <4D612CBE.5040205@thelounge.net> In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP for embedded device: reduce size From: rasmus@lerdorf.com (Rasmus Lerdorf) On 2/20/11 7:42 AM, Martin Herrman wrote: > 2011/2/20 Reindl Harald : > >> There are some more swicthes >> --disable-all Disable all extensions which are enabled by default >> >> What about "--disable-all" followed by "--enable-feature" for all >> you want to have? >> >> The follwoing are not needed in most cases >> --disable-ipv6 >> --disable-posix >> --disable-phar >> --disable-json >> __________________________________ >> >> --disable-ipv6 Disable IPv6 support >> --disable-libxml Disable LIBXML support >> --disable-ctype Disable ctype functions >> --disable-inifile DBA: INI support (bundled) >> --disable-flatfile DBA: FlatFile support (bundled) >> --disable-dom Disable DOM support >> --disable-fileinfo Disable fileinfo support >> --disable-filter Disable input filter support >> --disable-hash Disable hash support >> --disable-json Disable JavaScript Object Serialization support >> --disable-mbregex MBSTRING: Disable multibyte regex support >> --disable-pdo Disable PHP Data Objects support >> --disable-phar Disable phar support >> --disable-posix Disable POSIX-like functions >> --disable-session Disable session support >> --disable-simplexml Disable SimpleXML support >> --disable-tokenizer Disable tokenizer support >> --disable-xml Disable XML support >> --disable-xmlreader Disable XMLReader support >> --disable-xmlwriter Disable XMLWriter support > > I already had --disabled-all. I have now tested with -Os instead of > -O2 which results in a 2.8MB executable. So that helps a bit :-) 2.8M? My php binary with just about everything compiled in is around 1MB. Do this: file php See how it says "not stripped" ? That means you have left all the debugging symbols in. Now do this: strip php Then check the file size. Magic! -Rasmus