Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mixvio

macrumors 6502
Original poster
Apr 12, 2009
388
0
Sydney, Australia
In the realms of "headaches and things I probably shouldn't do," I was looking into setting up Apache et al so I can run a local web server on my iPad; I do web design, so being able to serve up local copies of stuff right on my iPad itself would be awesome.

Googling around, much to my surprise there were people suicidal just like me who had exactly the same thing in mind, but for the iPhone. Sadly though their guides are all from 2007/2008, and reference using Installer.app to get to the Apache distro for the iPhone. I don't have Installer, and there seems to be no pre-compiled version available on Cydia.

So before I try, I figured I would check and see if anyone else has had any luck doing this recently. Is it too much to hope that the versions of Apache, PHP & MySQL available for OSX work out of the box on the iPad/iPhone?
 

edcrusher

macrumors newbie
Nov 27, 2009
19
0
Ok, the nearest thing you can get now is installin PHPPOD from Cydia.

It will install :

lighttp, PHP modules and SQLite 3.x, plus some othe stuff.

after installing search the htdocs and do your magic(put your files) , access by localhost.

Hope it helps! Good Luck!

## remember to install sb setting to control lighttp or it will kill your batt##

:apple: ed
 

mixvio

macrumors 6502
Original poster
Apr 12, 2009
388
0
Sydney, Australia
Ah ha, I hadn't heard of lighttpd; that's what PHPPOD was using, but I figured out I could install it from Cydia directly. Unfortunately the compiled version of PHP available from Saurik is missing all optional extensions, so I sent him an email in hopes that it could be updated with those as well. Otherwise its utility for webdev is really shot. :\
 

sjohnson2

macrumors newbie
Nov 10, 2008
8
0
I'm surprised installing these will work for some reason. I'm impressed but not suicidal (yet).
:apple:
Ok, the nearest thing you can get now is installin PHPPOD from Cydia.

It will install :

lighttp, PHP modules and SQLite 3.x, plus some othe stuff.

after installing search the htdocs and do your magic(put your files) , access by localhost.

Hope it helps! Good Luck!

## remember to install sb setting to control lighttp or it will kill your batt##

:apple: ed
 

scottch

macrumors newbie
Aug 20, 2010
1
0
More details

I am new to the ipad. hoping someone can help me get this going.

I have downloaded and installed PHPPOD from Cydia.
I would like to view local html and pdf files on the ipad.

What do I do next? Does PHPPOD automatically start or do I need to start it manually, if so how?

Where do I find the htdocs folder?

I am using winSCP to view the files on the ipad

remember to install sb setting to control lighttp or it will kill your battery - Can you provide more detailes please on this - What is SB Setting?

Thanks in advance
 

belencha

macrumors newbie
Feb 17, 2011
1
0
mysql on iphone?

i just got my iphone 4 OS 4.2.1. i installed Lighttpd, php, i was wondering if i could install mysql cause a webserver without database is kind of useless. Whatsmore, SQLitte doesn't seem good enough for programming ....i'm concerned on security.

I did some research and i found mysql daemon on a tutorial http://www.notasdesamuel.com/python-apache-php-y-mysql-en-el-iphone/

but got error when typing ./mysql_install_db


/private/var/root/mysql$ cd bin
/private/var/root/mysql/bin$ ./mysql_install_db
./mysql_install_db: line 219: /bin/hostname: No such file or directory WARNING: The host '' could not be looked up with resolveip.This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/var/root/mysql//bin/mysqladmin -u root password 'new-password'
/var/root/mysql//bin/mysqladmin -u root -h password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /var/root/mysql/ ; /var/root/mysql//bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the /var/root/mysql//bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com

plzz someone help me !! be my hero.
 

orni

macrumors newbie
Mar 5, 2012
1
0
I was trying the same unsuccessfully and finally found the answer in johntmcii's link. Look one of the last comments. :)

There is one thing missing (chmodding the executables) and one small mistake (mysqld is not in /bin) in the instructions but it works.
 

nouatzi

macrumors newbie
Sep 25, 2012
2
0
Hi guys,
I've been looking for the same thing : Apache MySQL Php (and why not phpMyAdmin) on iDevices.
So I've started to compile them 4 months ago. And the result, I made it, it's working on my Jailbreak iPad 3, under iOS 5.1.1 :
  • httpd-2.4.2 OK
  • mysql-5.5.25 OK
  • php-5.4.4 OK
  • phpMyAdmin-3.5.2 OK
For now, I launch Apache and MySQL on command line.
So right now, I'm developing a clean apple application that I will put on AppStore, I hope at the end of October.
I will keep you in touch when it will be available.
See you around.
 

johntmcii

macrumors newbie
Jan 16, 2011
2
0
AMP in AppStore?

Hi nouatzi,

I just stumbled across this thread again after posting to it 18 months ago. I forgot to set up my profile on this forum to email me with updates, but I'll make sure I do now. It would be liberating if you can get a clean AMP application in the AppStore!

Thanks, good luck, and keep us posted!
johntmcii
 

Siggen

macrumors 6502
Apr 1, 2011
488
0
Oslo, Norway
Hi guys,
I've been looking for the same thing : Apache MySQL Php (and why not phpMyAdmin) on iDevices.
So I've started to compile them 4 months ago. And the result, I made it, it's working on my Jailbreak iPad 3, under iOS 5.1.1 :
  • httpd-2.4.2 OK
  • mysql-5.5.25 OK
  • php-5.4.4 OK
  • phpMyAdmin-3.5.2 OK
For now, I launch Apache and MySQL on command line.
So right now, I'm developing a clean apple application that I will put on AppStore, I hope at the end of October.
I will keep you in touch when it will be available.
See you around.

Can you please call it "iAMP"? would be a fitting name!
or maybe iOSamp.

this would be the naming convetion for something like this.
Thinking LAMP, MAMP and WAMP.

Ill download it from appstore :) any mailing list or anything to get an update when it is released?

I will start with installing the GameBoy HTML5 / Javascript emulator.

Any chance for a beta key? Ill PM u my mail address and UDID and what not :)
 

nouatzi

macrumors newbie
Sep 25, 2012
2
0
Hi guys !
Here's some news :
The transition from an jailbreak idevice to a clean one was really difficult... knowing that on jailbreak idevice, you can fork(), pthread_create and others stuffs (needed by apache-mysql-php) easily !!!
but on a clean idevice, there is a lot restrictions that I have to deal with !!
well, finally, I think I've made it again... I've managed to compile apache as a static library, php as static module for apache, and mysql as static library (things needed by a clean idevice). For now, apache is working with one thread (it's called debug_mode). And mysql is already threaded so it's ok.
I've integrated a web browser inside the app, so you won't have to leave the app to view your embed web pages :) .
And i'll embed phpMyAdmin to handle mysql configuration.
(it's a shame we won't be able to use flash...)
so now I'm working on the GUI, and after that, I'll run some bench tests to see if everything's going fine.
and the final step will be the Apple's approval. Knowing that apache-mysql-php are under GPL licence (same problem with VLC and Apple), so we'll see about that.
And even if Apple doesn't approve the app, I'll put it on cydia and other repositories.
And yeah, I was hoping to call it iAMP ;) .
 

Anrugas

macrumors newbie
Nov 11, 2012
2
0
For guys who have an AppleTV or who can't wait:
If your device is jailbroken and if you are satisfied with Lighttpd you can use my 'just one click' iOS-WebStack solution.
With this composition you get a full web stack to host your own content.

It includes:
  • Lighttpd v1.4.31
  • MySQL v5.1.67
  • PHP v5.4.9 (with GD, MySQL, XSLT and more)
  • Libpng v1.2.50
  • Libjpeg v8d
Just add the repo source http://ios-webstack.tk/cydia/ in cydia or to your source lists in /etc/apt/sources.list.d .

If you have installed 'PHP' and 'mysql' from cydia, please remove this packages befor you install my iOS-WebStack solution.
  • If you have an AppleTV please install the package 'atv-lighttpd-php-mysql'. After that please open the site http://ip_addresse_of_your_atv and setup MySQL with Adminer.
  • If you have an iPad/iPhone/iPod please install the package 'ios-lighttpd-php-mysql'. After that please start Safari and open the site http://localhost and setup MySQL with Adminer. (Please really use Safari. E.g. iOS Chrome has some problems with 'Login Pages'.)
You will also find some example web content packages:
  • Wordpress
  • WebsiteBaker
  • ownCloud
  • Contao
  • TYPO3
  • phpMyAdmin
If you need more information, please have a look at:
http://code.google.com/p/cydia-ios-lighttpd-php-mysql-web-stack/wiki/Main
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.