[Question] Apache/PHP/MySQL and running a webserver on an iDevice (iOS 4.0+)

Discussion in 'iOS Jailbreak & Cydia' started by albatross, Oct 26, 2010.

  1. albatross

    albatross New Member

    Joined:
    Jun 28, 2010
    Messages:
    22
    Likes Received:
    0
    Device:
    iPhone 3G (Black)
    First off-- This is a serious discussion. Please don't do/say the following:

    • "What's the point"
    • "This is stupid"
    • "What a waste of time"
    • "It can't be done"
    • "WAHhhh...it will waste your battery/wifi/disk writing"
    • "SQLite works fine"
    • Or any derivative of this

    I will report ALL nasty comments and derogatory statements to the mods. Be respectful.

    Yes yes, I know...there's already THREADS FOR THIS, but look closely and you will see they are outdated by 3 years. 2007 and iOS 1.0/Installer.app was a LONG time ago. Also, none of them cover how to get MySQL working. Only PHP and Apache. Plus, the packages they reference are gone.

    I need this in order to demo sites for clients and to have a development machine at all times so I can test new code, hook to a db and more. This is not a hobby.

    As of now I have PHP and lighttpd (plus 'lighttpd SBSettings') installed via Cydia. (note: PHP installs via iPHPPod). I was able to find an iPhone friendly version of MySQL here: LINK (directions for installing are included in a readme)

    Now, that said PHP does not see MySQL. PHP doesn't have the MySQL module/extension installed. It only has a PDO for attaching to SQLite. Problem is, most web apps (Wordpress, etc) need MySQL to work. SQLite doesn't have the same parameters as MySQL. In fact i find ZERO information on how to attach it or use it. There's no username/password/server address like with MySQL. BUT THAT DOESN'T MATTER. I do NOT want to use SQLite. I can't. Besides, it's slow. I already tried it.

    Note: Wordpress does have a PLUGIN that allows you to use SQlite, but what about all the other apps I want to install? No options.

    phpmyadmin also doesn't work. Without MySQL it won't work. It can't.

    So, the point of this thread is:

    How do we attach PHP/Apache/MySQL and have a full running webserver on our iDevice?

    I have searched for 3 days and my Google-Fu is strong. However, nothing relative to this exists. It seems odd there's no package for this, anywhere. There used to be a great tutorial HERE, but all the files are gone.

    So, let's get this going. I know someone has to be interested.

    I have included a screenshot of phpinfo running to prove it is a working server. Now it needs MySQL to be a better, more usable, server.

    Attached Files:

  2. albatross

    albatross New Member

    Joined:
    Jun 28, 2010
    Messages:
    22
    Likes Received:
    0
    Device:
    iPhone 3G (Black)
    For the unaware, there's also another benefit of this:

    Storing documents and more in a folder for easy access.
  3. albatross

    albatross New Member

    Joined:
    Jun 28, 2010
    Messages:
    22
    Likes Received:
    0
    Device:
    iPhone 3G (Black)
  4. albatross

    albatross New Member

    Joined:
    Jun 28, 2010
    Messages:
    22
    Likes Received:
    0
    Device:
    iPhone 3G (Black)
    I wanted to share some screenshots to give you guys an idea how this can be helpful land how well it works, so far.

    Everything you see is running on my iPhone 3G.


    Main Index - This link is the Index File so you can use it on your server. Better than a plain boring HTML page and sized for iPhone.

    Please Register or Log in to view images



    iPHPpod - an alternative to the iPod player. You can upload your own files via SSH without using iTunes. INCLUDING MOVIES

    Please Register or Log in to view images



    iWebKit - the standard kit for making a web based app

    Please Register or Log in to view images



    PHP - PHP running (with some of the iPhone server settings visible)

    Please Register or Log in to view images



    Wordpress - Uploaded to the server, but not working since there is no MySQL

    Please Register or Log in to view images



    Wordpress - As you can see, this is as far as it gets

    Please Register or Log in to view images



    eyeOS - a web based operating system with amazing features.

    Please Register or Log in to view images



    DirList - a CSS formatted directory listing

    Please Register or Log in to view images



    See, it has a purpose and can be even MORE amazing with MySQL.
  5. therealduckie

    therealduckie Member

    Joined:
    Apr 9, 2008
    Messages:
    318
    Likes Received:
    6
    Device:
    4G iPod touch
    Incredibly valid point made by a poster in another thread:

    With the new jailbreak capabilities, this can be installed and run on one of the new AppleTVs. In other words: a $99 server.

    So, anyone have that MySQL package or an idea or way to install it? This could really pick up steam with the right people involved.
  6. hacker2021

    hacker2021 Member

    Joined:
    Jul 5, 2008
    Messages:
    241
    Likes Received:
    0
    Device:
    4G iPod touch
    I'm sure I remember seeing a small MySQL package available a few months ago. Surely 3.x had it working fine.

    The iPod/iPhone/iPad concept is nice, but I'd really like to see this spring off with an Apple TV which would almost never have it's hardware fully utilized to the point where a simple Apache server couldn't work.
  7. therealduckie

    therealduckie Member

    Joined:
    Apr 9, 2008
    Messages:
    318
    Likes Received:
    6
    Device:
    4G iPod touch
    hacker2021,

    As the OP stated, there was a MySQL package available, but the original website that had it is no longer active and the file is gone. Someone has to have it laying around somewhere on a hard drive. Seeing as it is a Unix package I don;t see why it would not still work on iOS.
  8. u4ia24

    u4ia24 New Member

    Joined:
    Nov 6, 2010
    Messages:
    2
    Likes Received:
    0
    Here's a link for the Apache on the old Installer.app:

    http://www.iphonesoftwarecentral.net/download/Apache.zip

    I have yet to use it because I'm not really sure if I just extract it and it will work.

    I currently using Lighttpd + PHP from the PHPPod in Cydia.
    Looking forward to having MySQL working on my iPod Touch 3g.
  9. therealduckie

    therealduckie Member

    Joined:
    Apr 9, 2008
    Messages:
    318
    Likes Received:
    6
    Device:
    4G iPod touch
    Thanks for that, u4ia24

    If only someone could find that old MySQL we'd be set.
  10. Kentora

    Kentora New Member

    Joined:
    Nov 16, 2010
    Messages:
    5
    Likes Received:
    0
    PHP on ipod?

    Hi. I got lighttp workin, and installed phppod, but PHP isn't working. (Neither is the phppod..)

    Any idea anyone?

Share This Page