Skip to main content

Compile PHP with GD for iPhone OS 4.1



The Goal:





have a working version of PHP with the GD library working on an iPod Touch 4th Gen.





The Status:





PHP is working on the iPod (lighttpd + PHP 5.2.8 + sqlite3) without GD.





When trying to compile PHP on the iPod I get this error: http://pastebin.com/kUmgq70G





The Proposed Solution:





Can anyone point me in the direction of how to compile PHP with GD and then package it up nicely as a .deb file for everyone else to use?








The best situation I believe is to compile the latest version of PHP with the GD library included and enabled. Second best would be to settle for compiling GD as a module and then installing that into the currently working PHP that is available from Cydia. However to compile GD you would have to do this with the SAME source that was used to create the php_5.2.8-3_iphoneos-arm.deb available from Cydia - I think it would be easier and safer for everyone in the future to just compile a fresh PHP with GD already enabled and then pack it up as a .deb








Here is what I have from phpinfo of the currently installed version of PHP: System:







Darwin iPod-Touch 10.3.1 Darwin Kernel Version 10.3.1: Wed Aug 4 22:35:51 PDT 2010; root:xnu-1504.55.33~10/RELEASE_ARM_S5L8930X iPod4,1







Build Date:







Jan 25 2009 02:55:42







Configure Command:







'./configure' '--build=x86_64-unknown-linux-gnu' '--host=arm-apple-darwin9' '--enable-static=no' '--enable-shared=yes' '--prefix=/usr' '--localstatedir=/var/cache/php' '--with-iconv=/usr/arm-apple-darwin9/usr' '--with-curl=/home/dat/apl/tel/dest/iphoneos-arm/curl/usr' '--enable-fastcgi'










Here is the package information from Cydia's repo:







Package: php

Version: 5.2.8-3

Architecture: iphoneos-arm

Maintainer: Jay Freeman (saurik) <saurik@saurik.com>

Installed-Size: 14492

Depends: curl, libxml2

Filename: debs/php_5.2.8-3_iphoneos-arm.deb

Size: 4626280

MD5sum: dbb30ea608945a5d45de02df74df71b0

Section: Development

Priority: optional

Description: overly popular HTML templating language

Name: PHP: Hypertext Preprocessor

Tag: purpose::console, role::developer










P.S. I am not the only person working on this, as during my searching I found several other posts with people who need this too. Once I have this completed I will host the file somewhere so that everyone can enjoy.



Source: Tips4all

Comments

  1. From your output it seems that php compiles fine, but fails to link to the resolv library.

    If you need a workaround for getting PHP 5.2, you will need to manually add -lresolv to the linker flags.

    This seems to be a bug in PHP 5.2 compiled with apple's tools (http://bugs.php.net/49332) which is fixed in PHP 5.3, so you might try 5.3 one unless you really need 5.2 for some reason.

    ReplyDelete
  2. I didn't tried myself, but the Saurik repository should help :


    http://svn.telesphoreo.org/trunk/


    And especially this one might interest you :


    http://svn.telesphoreo.org/trunk/data/php/


    Cydia packages comes from that, thanks Saurik for his huge work of course!

    ReplyDelete
  3. This never happened. Saurik never responded to me either. So I dropped this project.

    ReplyDelete

Post a Comment

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex