Nitroware

“Where a new invention promises to be useful, it ought to be tried” – Thomas Jefferson

Possible MySQL Solutions for iOS Apache/HTTPD Server

Great news, we have possibly found a solution for a iOS/iPhone device Web server’s MySQL component.

Throughout the internet, this seems to be the mission link for making any iOS device a web server. Right now the biggest issue we have now is making sure that it is of a legal origin.

Right now we are waiting to hear from a visitor who mentioned he had a solution for this aspect of a IOS Web server.


Categorised as: Legal iOS, MySQL


21 Comments

  1. Kamikengen says:

    I’m glad to supply a link to the iOS ARM processor compatible install of MySQL: http://www.megaupload.com/?d=JG0YMGZ7

    The install procedure is a standard Linux do; extract the files to /var/root/mysql to that the directory of the files is mysql.

    Open a Terminal connection to your iDevice, and navigate to the /var/root/mysql/bin and then run ./mysql_install_db which will then install everything and set up your basic grant tables.

    After this, however, I’m stuck. I have no idea how to get MySQL’s functions available in PHP, working with the iOS lighttpd software.

    • nitrx says:

      Thanks Kamikengen! I will try this for myself, then I will relase it as a beta guide. Following that, after a few people approving, I will add it to the guide.

      Thanks again!

      PS. Regarding you other reply, it was approved, but you commented on a different post…

  2. alex says:

    It would be great news indeed, if it would be possible to get php and mysql working together. I installed mysql, but php does not talk to it, so its quite useless at this point.
    So if there is a solution for php to work with mysql, please post it here.

    Thanks for your work!

    • Kamikengen says:

      Yes, that’s what we’re now trying to accomplish. I’ve had some edits with PHP’s configuration’s ‘h’ files, but no mysql module seems to be installed, can be installed nor activated. If this crucial link can be established, we can have ourselves a portable webserver.

  3. tiki says:

    Anybody get it working yet:?)

    • Marden says:

      I love reading these aritcles because they’re short but informative.

      • Sahadev says:

        ok, self rescue: I put this in my stotborap class, zf seems to call it for meprotected function _initDatabase() { Doctrine_Manager::connection( mysql://root:root@localhost/track ); Zend_Registry::set( doctrine_config’, array( data_fixtures_path’ => dirname(__FILE__).’/doctrine/data/fixtures’, models_path’ => dirname(__FILE__).’/models’, migrations_path’ => dirname(__FILE__).’/doctrine/migrations’, sql_path’ => dirname(__FILE__).’/doctrine/data/sql’, yaml_schema_path’ => dirname(__FILE__).’/doctrine/schema’ )); } Then in index.php, i added the generated models path, cos the models file structure / class names don’t match ZF’s autoloading pattern (?)// Ensure library/ is on include_pathset_include_path(implode(PATH_SEPARATOR, array( realpath(APPLICATION_PATH . /../library’), realpath(APPLICATION_PATH . /models/generated’), get_include_path(),)));oh, its not just generated, so just for a little variation, i added to the incude path in the config by sticking this line in the iniincludePaths.model = APPLICATION_PATH /models presumable ZF adds any includePaths.whatevers to the path, why not say that in the comments is a bit of a mystery to me, i guess they only want *really clever* developers using it. grumble grumble.

  4. Nothy says:

    I saw some old articles said they run php programs with mysql with there iphone. I already run mysql on my iphone. Just need mysql part for php now.
    I think we should try to compile php on iphone.

    • nitrx says:

      I totally agree, the trouble is getting a compiler on an iOS device. If we could compile on iOS, this site would be distributing HTTPD and Apache for iOS, not talking about how to get there.

      If you know how to compile/have a compiler for iOS, then we are talking, if not then we are back where we started.

      • Nothy says:

        I’m still trying on compile php on ios. If I got any news I will leave a message on this site.

        • Clesio says:

          1) gcc for iphone may be a pain the first times due missing libraries, but I have it working on iPad2 iOS 5.0.1
          2) php is a sh***y software as it needs to be patched to be compiled on iOS, else it’ll miss some macros and end up with error at the first file compiled. Check out svn.telesphoreo.org/trunk/data/php to see what saurik had gotten up with. There’s the need to do this on the device, as else there’s no way to bind it with Mysql.
          3) Apache will stay a dream (at least to me). There’s a bug on apr on iOS that causes SIGSYS when apache start. I have built it many times and with different versions, but it always end this way.
          4)If someone is interested, I have a built (by myself) and working deb of MySQL and PostgreSQL, while I’m still working for PHP.

  5. Nothy says:

    php-5.2.8/main -I/var/root/php-5.2.8 -I/var/root/php-5.2.8/ext/date/lib -I/var/root/php-5.2.8/TSRM -I/var/root/php-5.2.8/Zend -no-cpp-precomp -O2 -c /var/root/php-5.2.8/Zend/zend_extensions.c -o Zend/zend_extensions.lo
    /var/root/php-5.2.8/Zend/zend_extensions.c: In function ‘zend_mh_bundle_load’:
    /var/root/php-5.2.8/Zend/zend_extensions.c:242: error: ‘NSCreateObjectFileImageFromFile’ is unavailable (declared at /var/toolchain/sys30/usr/include/mach-o/dyld.h:145)
    /var/root/php-5.2.8/Zend/zend_extensions.c:246: error: ‘NSLinkModule’ is unavailable (declared at /var/toolchain/sys30/usr/include/mach-o/dyld.h:161)
    /var/root/php-5.2.8/Zend/zend_extensions.c:247: error: ‘NSDestroyObjectFileImage’ is unavailable (declared at /var/toolchain/sys30/usr/include/mach-o/dyld.h:147)
    /var/root/php-5.2.8/Zend/zend_extensions.c:250: error: ‘NSLookupSymbolInModule’ is unavailable (declared at /var/toolchain/sys30/usr/include/mach-o/dyld.h:181)
    /var/root/php-5.2.8/Zend/zend_extensions.c:252: error: ‘NSAddressOfSymbol’ is unavailable (declared at /var/toolchain/sys30/usr/include/mach-o/dyld.h:188)
    /var/root/php-5.2.8/Zend/zend_extensions.c: In function ‘zend_mh_bundle_unload’:
    /var/root/php-5.2.8/Zend/zend_extensions.c:265: error: ‘NSLookupSymbolInModule’ is unavailable (declared at /var/toolchain/sys30/usr/include/mach-o/dyld.h:181)
    /var/root/php-5.2.8/Zend/zend_extensions.c:267: error: ‘NSAddressOfSymbol’ is unavailable (declared at /var/toolchain/sys30/usr/include/mach-o/dyld.h:188)
    /var/root/php-5.2.8/Zend/zend_extensions.c:271: error: ‘NSUnLinkModule’ is unavailable (declared at /var/toolchain/sys30/usr/include/mach-o/dyld.h:169)
    /var/root/php-5.2.8/Zend/zend_extensions.c:271: warning: passing argument 2 of ‘NSUnLinkModule’ makes integer from pointer without a cast
    /var/root/php-5.2.8/Zend/zend_extensions.c: In function ‘zend_mh_bundle_symbol’:
    /var/root/php-5.2.8/Zend/zend_extensions.c:277: error: ‘NSLookupSymbolInModule’ is unavailable (declared at /var/toolchain/sys30/usr/include/mach-o/dyld.h:181)
    /var/root/php-5.2.8/Zend/zend_extensions.c:278: error: ‘NSAddressOfSymbol’ is unavailable (declared at /var/toolchain/sys30/usr/include/mach-o/dyld.h:188)
    make: *** [Zend/zend_extensions.lo] Error 1
    when I compile php on my iphone, it comes these Errors. Any idea?

  6. Peaches says:

    I hadn’t seen this article, and have just installed LightTPD with PHP, and SQLite3 on an iPod Touch. PHP seems to work ok, but tried to add ASP.NET support using Mono, and couldn’t get it to work. Would Apache be able to do it? Or is there another way?

  7. Nothy says:

    PHP 5.2.8 (cli) (built: Oct 3 2011 16:42:19)
    Copyright (c) 1997-2008 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    I did it. But I disable-all.

Leave a Reply

Your email address will not be published. Required fields are marked *