Go Back   MacRumors Forums > iPhone, iPod and iPad > iOS > Jailbreaks and iOS Hacks

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 7, 2010, 11:10 PM   #1
mixvio
macrumors 6502
 
Join Date: Apr 2009
Location: Sydney, Australia
Installing Apache, MySQL & PHP on iPad?

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?
mixvio is offline   0 Reply With Quote
Old Jul 10, 2010, 11:30 AM   #2
edcrusher
macrumors newbie
 
Join Date: Nov 2009
Send a message via MSN to edcrusher
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##

ed
__________________
I need GPS and remote access on everything!!
edcrusher is offline   0 Reply With Quote
Old Jul 13, 2010, 03:32 AM   #3
mixvio
Thread Starter
macrumors 6502
 
Join Date: Apr 2009
Location: 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. :\
mixvio is offline   0 Reply With Quote
Old Jul 16, 2010, 12:39 PM   #4
sjohnson2
Banned
 
Join Date: Nov 2008
I'm surprised installing these will work for some reason. I'm impressed but not suicidal (yet).


Quote:
Originally Posted by edcrusher View Post
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##

ed
sjohnson2 is offline   0 Reply With Quote
Old Aug 20, 2010, 11:27 PM   #5
scottch
macrumors newbie
 
Join Date: Aug 2010
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
scottch is offline   0 Reply With Quote
Old Jan 16, 2011, 03:48 PM   #6
johntmcii
macrumors newbie
 
Join Date: Jan 2011
Any progress on "Installing Apache, MySQL & PHP on iPad?"

Just curious if there was any progress on your original quest to get an AMP on the iPad. Here's another link that seems to evaporate, but I was hoping time has changed the possibilities for the better:

http://www.ipodtouchfans.com/forums/...d.php?t=318899
johntmcii is offline   0 Reply With Quote
Old Feb 17, 2011, 12:10 PM   #7
belencha
macrumors newbie
 
Join Date: Feb 2011
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-...-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.
belencha is offline   0 Reply With Quote
Old Mar 5, 2012, 10:26 PM   #8
orni
macrumors newbie
 
Join Date: Mar 2012
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.
orni is offline   0 Reply With Quote
Old Sep 25, 2012, 08:45 PM   #9
nouatzi
macrumors newbie
 
Join Date: Sep 2012
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.
nouatzi is offline   0 Reply With Quote
Old Oct 28, 2012, 08:28 PM   #10
johntmcii
macrumors newbie
 
Join Date: Jan 2011
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
johntmcii is offline   0 Reply With Quote
Old Oct 29, 2012, 07:52 AM   #11
Siggen
macrumors 6502
 
Join Date: Apr 2011
Location: Oslo, Norway
Quote:
Originally Posted by nouatzi View Post
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
__________________
13" MBP 2.8Ghz i7 128GB SSD + 750GB HDD 16GB RAM OSX ML
iPhone 5 64GB Black iOS6.1 Jailbreak
iPad 2 64GB Black iOS6.1 Jailbreak
ATV3 & Samsung 55" // iOS Dev Account
Siggen is offline   0 Reply With Quote
Old Oct 29, 2012, 02:09 PM   #12
nouatzi
macrumors newbie
 
Join Date: Sep 2012
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 .
nouatzi is offline   0 Reply With Quote
Old Nov 11, 2012, 09:11 AM   #13
Anrugas
macrumors newbie
 
Join Date: Nov 2012
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-l...tack/wiki/Main

Last edited by Anrugas; Dec 23, 2012 at 03:27 PM.
Anrugas is offline   0 Reply With Quote
Old Aug 6, 2013, 01:47 PM   #14
peor
macrumors newbie
 
Join Date: Feb 2013
Hello guys.

Any news how PHP can work on iPad?
peor is offline   0 Reply With Quote
Old Sep 3, 2013, 07:01 PM   #15
Anrugas
macrumors newbie
 
Join Date: Nov 2012
See http://ios-webstack.tk
Anrugas is offline   0 Reply With Quote

Reply
MacRumors Forums > iPhone, iPod and iPad > iOS > Jailbreaks and iOS Hacks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
PHP & MySQL help please. Stocktrader Web Design and Development 1 Mar 9, 2014 06:04 AM
How to have an Apache server host a Gopher site? Can PHP do it? blanka Web Design and Development 1 Sep 5, 2013 06:11 AM
Installing Apache, PHP, and MySQL on MacBook Pro astbn4 MacBook Pro 6 Jul 13, 2013 04:57 PM
PHP, MySQL help please please please Stocktrader Web Design and Development 7 Jun 5, 2013 01:29 PM

Forum Jump

All times are GMT -5. The time now is 06:01 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC