The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > Web Apps
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 12-08-2008, 10:20 PM
What's Jailbreak?
 
Join Date: Dec 2008
Device + Firmware: iPhone 3.0
Operating System: macbookpro17'2.93Ghz500Gb7200rpm antiglare,8gbddr31066mhz,nvidiavideografx512mb,osx10a402a
Location: switzerland
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to maciator777
Php question...

First let me say hello to all inside this forum from switzerland and thanks for accepting me as a user.

I have an iPhone witch i use as webspace and i am developeing a website on it. The website is in developeing state and can be found here .maciators blogging page or .maciators blogging page , my iPhone is a 3G with Firmware 2.2 Jailbrake. I installed lighttpd on it and its working fine, people can access my website.

my websites root can be found inside /private/var/www

Now the problem i am tryin to solve is, php.

i downloaded php from Beta Software | CoreOS - iPhoneUnix

and when i connect to iphone i am allready inside / and i just extract the package and uploaded it inside this place, so now i have: /opt/iphone/...

my lighttpd.conf is inside /private/etc

and looks like this:

server.document-root = "/private/var/www/"
server.port = 80 # Default
server.modules = ( "mod_cgi","mod_indexfile","mod_dirlisting", "mod_accesslog" )
server.tag = "iPhone lighttpd"
server.name = "maciatorsblog.6x.to"
server.pid-file = "/var/run/lighttpd.pid"
dir-listing.activate = "enable"
dir-listing.external-css = "/.dirlist/iphonedirlist.css"
accesslog.filename = "/var/log/lighttpd/access.log"
server.errorlog = "/var/log/lighttpd/error.log"
index-file.names = ( "index.php", "index.py", "index.pl", "index.cgi", "index.html", "default.html", "/.dirlist/dir-generator.php" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".cgi", ".py" )
cgi.assign = ( ".pl" => "/usr/bin/perl", ".py" => "/usr/bin/python", ".rb" => "/usr/local/bin/ruby", ".cgi" => "", ".sh" => "", ".php" => "/opt/iphone/bin/php-cgi" )
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar",
# default mime type
"" => "application/octet-stream",
)

this one is everytime started automaticaly by a deamon located in:

/Library/LaunchDaemons/..

and its called com.http.lighttpd.plist

and looks like this:





Label
com.http.lighttpd
ProgramArguments

/usr/sbin/lighttpd
-f
/usr/etc/lighttpd.conf

RunAtLoad




Every restart the deamon ist launching my server!

Just the problem is, when i try to get to the index.php, its giveing me an error:

500 - Internal Server Error and just if i access the html files everything looks good.

inside the error.log file, when i try to access my index.php states this:

2008-12-07 09:05:00: (log.c.75) server started
2008-12-07 09:06:01: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory
2008-12-07 09:06:40: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory
2008-12-07 09:22:43: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory
2008-12-07 09:41:52: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory
2008-12-07 10:32:27: (server.c.1469) server stopped by UID = 0 PID = 0
2008-12-07 10:44:19: (log.c.75) server started
2008-12-08 05:15:31: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory
2008-12-08 05:15:35: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory
2008-12-08 05:15:36: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory
2008-12-08 05:15:36: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory
2008-12-08 05:15:37: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory
2008-12-08 05:15:59: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory
2008-12-08 05:16:10: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory
2008-12-08 05:16:13: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory
2008-12-08 05:16:33: (mod_cgi.c.734) stat for cgi-handler /opt/iphone/bin/php-cgi failed: No such file or directory
2008-12-08 05:26:05: (mod_cgi.c.584) cgi died, pid: 293
2008-12-08 05:26:10: (mod_cgi.c.584) cgi died, pid: 294
2008-12-08 05:32:27: (mod_cgi.c.584) cgi died, pid: 295
2008-12-08 05:46:32: (mod_cgi.c.584) cgi died, pid: 306
2008-12-08 05:46:42: (mod_cgi.c.584) cgi died, pid: 307
2008-12-08 05:46:43: (mod_cgi.c.584) cgi died, pid: 308
2008-12-08 05:55:25: (mod_cgi.c.584) cgi died, pid: 314
2008-12-08 05:55:27: (mod_cgi.c.584) cgi died, pid: 315
2008-12-08 05:55:31: (mod_cgi.c.584) cgi died, pid: 316
2008-12-08 05:55:39: (mod_cgi.c.584) cgi died, pid: 318
2008-12-08 05:57:04: (server.c.1469) server stopped by UID = 0 PID = 0
2008-12-08 07:05:25: (log.c.75) server started
2008-12-08 07:09:51: (mod_cgi.c.584) cgi died, pid: 124
2008-12-08 07:10:28: (mod_cgi.c.584) cgi died, pid: 128
2008-12-08 07:30:44: (mod_cgi.c.584) cgi died, pid: 257
2008-12-08 07:30:47: (mod_cgi.c.584) cgi died, pid: 258
2008-12-08 07:30:48: (mod_cgi.c.584) cgi died, pid: 259
2008-12-08 07:30:50: (mod_cgi.c.584) cgi died, pid: 260
2008-12-08 07:31:44: (mod_cgi.c.584) cgi died, pid: 267
2008-12-08 08:04:40: (mod_cgi.c.584) cgi died, pid: 477
2008-12-08 08:44:47: (mod_cgi.c.584) cgi died, pid: 745
2008-12-08 08:48:02: (server.c.1469) server stopped by UID = 0 PID = 0
2008-12-08 08:49:07: (log.c.75) server started
2008-12-08 08:50:35: (mod_cgi.c.584) cgi died, pid: 88
2008-12-08 08:50:39: (mod_cgi.c.584) cgi died, pid: 90
2008-12-08 08:50:46: (mod_cgi.c.584) cgi died, pid: 91
2008-12-08 08:51:19: (mod_cgi.c.584) cgi died, pid: 103
2008-12-08 08:51:28: (mod_cgi.c.584) cgi died, pid: 108
2008-12-08 08:53:28: (mod_cgi.c.584) cgi died, pid: 127
2008-12-08 08:53:30: (mod_cgi.c.584) cgi died, pid: 129
2008-12-08 09:13:29: (mod_cgi.c.584) cgi died, pid: 368
2008-12-08 09:40:48: (mod_cgi.c.584) cgi died, pid: 568
2008-12-08 09:40:51: (mod_cgi.c.584) cgi died, pid: 569
2008-12-08 09:40:51: (mod_cgi.c.584) cgi died, pid: 570
2008-12-08 09:40:52: (mod_cgi.c.584) cgi died, pid: 571
2008-12-08 09:40:58: (mod_cgi.c.584) cgi died, pid: 573
2008-12-08 09:43:43: (mod_cgi.c.584) cgi died, pid: 591
2008-12-08 09:43:46: (mod_cgi.c.584) cgi died, pid: 592
2008-12-08 09:46:08: (mod_cgi.c.584) cgi died, pid: 608
2008-12-08 09:46:10: (mod_cgi.c.584) cgi died, pid: 609
2008-12-08 09:46:11: (mod_cgi.c.584) cgi died, pid: 610
2008-12-08 09:46:12: (mod_cgi.c.584) cgi died, pid: 611
2008-12-08 09:48:51: (mod_cgi.c.584) cgi died, pid: 628
2008-12-08 09:48:53: (mod_cgi.c.584) cgi died, pid: 629
2008-12-08 09:57:08: (mod_cgi.c.584) cgi died, pid: 694
2008-12-08 10:39:27: (log.c.75) server started
2008-12-08 10:51:30: (mod_cgi.c.584) cgi died, pid: 183
2008-12-09 01:34:02: (request.c.535) no uri specified -> 400
2008-12-09 05:13:01: (mod_cgi.c.584) cgi died, pid: 6925

inside /private/etc/

is a profile file and it looks like this:

export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games'
export PS1='\hw \u\$ '
PATH=$PATH:/opt/iphone/bin/

umask 022

for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done


i really don't know where i made a mistake but i can't get the php working and would be very nice if there is somebody could help me, and i am thanking in advance, thanks

Last edited by maciator777; 12-09-2008 at 01:04 AM.. Reason: some correction
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #2  
Old 12-26-2008, 02:56 PM
What's Jailbreak?
 
Join Date: Nov 2008
Device + Firmware: iPhone 2.1
Operating System: Windose
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

As I understood it, that PHP is an old port that was compiled for 1.1.4, not 2.2. I have also been looking for PHP but I have not come across anyone who reports to have PHP working on 2.1 or 2.2
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #3  
Old 01-29-2009, 03:46 PM
What's Jailbreak?
 
Join Date: Feb 2008
Operating System: Ubuntu 7.10 Linux
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Using your iphone as a php server is probably not your best idea (i tried it with a dell laptop.... that failed too), being an apache guy I can't really help you with this specific problem, but I can recommend an alternative course of action. Install xampp, its fully cross platform (lin/mac/win) and can be downloaded here ...

Linux: apache friends - xampp for linux
Windows: apache friends - xampp for windows
Mac: apache friends - xampp for macos x

Its a fully configured Apache + PHP + MySQL enviroment and preconfigured to boot. Should help, its what I use just cuz' it so dang simple.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > Web Apps

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 08:26 AM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top