PHP 5.2.6 coming soon to Firmware 2.1

Discussion in 'iPod touch Firmware 2.X' started by fizk, Nov 14, 2008.

  1. fizk

    fizk New Member

    Joined:
    Nov 2, 2008
    Messages:
    22
    Likes Received:
    0
    I needed to make a few changes to the code. When I"m done, I'll post the diff files. If anyone has done this already, please post here.

    yonas's iPod:~/php/bin root# ./php
    Killed
    yonas's iPod:~/php/bin root# ldid -S php
    yonas's iPod:~/php/bin root# ldid -S php-cgi
    yonas's iPod:~/php/bin root# ./php
    <? phpinfo(); ?>
    phpinfo()
    PHP Version => 5.2.6

    System => Darwin yonas's iPod 9.4.1 Darwin Kernel Version 9.4.1: Sun Aug 10 21:23:40 PDT 2008; root:xnu-1228.7.27~12/RELEASE_ARM_S5L8900X iPod1,1
    Build Date => Nov 14 2008 05:28:59
    Configure Command => './configure' '--host=arm-apple-darwin' '--prefix=/Users/yonas/php' '--disable-shared' '--without-iconv'
    Server API => Command Line Interface
    Virtual Directory Support => disabled
    Configuration File (php.ini) Path => /Users/yonas/php/lib
    Loaded Configuration File => (none)
    PHP API => 20041225
    PHP Extension => 20060613
    Zend Extension => 220060519
    Debug Build => no
    Thread Safety => disabled
    Zend Memory Manager => enabled
    IPv6 Support => enabled
    Registered PHP Streams => php, file, data, http, ftp
    Registered Stream Socket Transports => tcp, udp, unix, udg
    Registered Stream Filters => string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed


    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
  2. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
    What are you saying? New PHP version coming? Huh?
  3. fizk

    fizk New Member

    Joined:
    Nov 2, 2008
    Messages:
    22
    Likes Received:
    0
    Yes. I'm working on getting lighttpd and php 5.2.6 (via fastcgi) working on iPhone/iPod Touch firmware 2.1.

    I just got it running, phpinfo() works. More details coming soon.
  4. Shadowriver

    Shadowriver Active Member

    Joined:
    Jun 20, 2008
    Messages:
    1,467
    Likes Received:
    1
    Device:
    iPod touch
    For what do you need php on mobile device?

    Please Register or Log in to view images

  5. eo3

    eo3 New Member

    Joined:
    Apr 2, 2008
    Messages:
    4
    Likes Received:
    0
    What's the status? I'm trying to achieve quite the same (lighty+php). So further info is appreciated quite a lot.

    Please Register or Log in to view images



    Regards!
  6. MegaMan

    MegaMan New Member

    Joined:
    Sep 16, 2007
    Messages:
    877
    Likes Received:
    2
    ya I dont get why you would want to run a web server on an iphone/ipod
    412mhz, 128mb ram, wireless
    why?
  7. tomasfn93

    tomasfn93 Member

    Joined:
    Feb 20, 2008
    Messages:
    433
    Likes Received:
    0
    i Love PHP and lightppd, with this tow things i can have working the best application ever on the firmware 1.1.X....


    IPHPPOD
  8. fizk

    fizk New Member

    Joined:
    Nov 2, 2008
    Messages:
    22
    Likes Received:
    0
    Download at: http://[PIRACY.rs].com/files/166504433/php-5.2.6-iphone.zip

    README

    Requires: Mac OSX 10.5.5 (not sure if less than 10.5.5 works)

    1. Install iPhone 2.1 SDK from apple's website

    2. Customize configure-iphone if needed [eg. change --prefix ]
    - default values work for me.

    3. ./configure-iphone
    make
    make install

    4. run "ldid -S php" and "ldid -S php-cgi" after copying the binaries to your device

    ********************************
    * NOTE:
    ***************************************

    To make php compile, I emptied some of the assembly files and commented out outdated functions in Zend/zend_extensions.c
    This means I had to disable pear support.

    There's another cross-compile of php for iPhone at http://www.wickedpsyched.com/beta. If these changes make you uncomfortable, check his version out.


    For lighttpd, add the following lines to your lighttpd.conf file:

    server.modules += ( "mod_fastcgi" )
    index-file.names = ( "index.php", "index.py", "index.pl", "index.cgi", "index.html", "default.html" )
    static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".cgi", ".py" )

    fastcgi.server = ( ".php" => ((
    "bin-path" => "/YOUR/PATH/TO/php-cgi",
    "socket" => "/tmp/php.socket"
    )))
  9. bgizzle

    bgizzle Administrator Staff Member

    Joined:
    Sep 13, 2007
    Messages:
    5,100
    Likes Received:
    543
    Device:
    iPhone 6
    fun fact: this site actually runs on lighttpd with php via fcgi
    on topic: i don't see the point of this, but it can be fun to have it to play around with php on the device, and i guess it can be used to make quick local web interfaces
  10. fizk

    fizk New Member

    Joined:
    Nov 2, 2008
    Messages:
    22
    Likes Received:
    0
    Yea, for eg. I made a pr0n app in php so that I can easily browse and download movies.

    Please Register or Log in to view images

    This helped me because the Safari DL plugin isn't fired for all download links, even if the mimetype/extension is in the plugin's plist file.

    I later made an actual iPhone app that mimics the functionality.

Share This Page