Apache & PHP

Discussion in 'iPod touch' started by ferrellw, Oct 23, 2007.

  1. ferrellw

    ferrellw New Member

    Joined:
    Sep 21, 2007
    Messages:
    10
    Likes Received:
    0
    Device:
    iPhone 3G (White)
    Please, I've installed it, but its asking me to add the installed directories "opt/iphone/bin/" to the $path. I'm assuming thats the system path. I fallowed this guide but still no luck. What am i doing wrong?
  2. hack27e

    hack27e New Member

    Joined:
    Nov 24, 2007
    Messages:
    85
    Likes Received:
    0
    Using winscp, or another sftp client ftp into your ipod touch (You should be able to do this if you have setup the ssh/sftp for jailbreaking in the first place). Open the following file for editing: /etc/httpd/httpd.conf.

    Once you have the conf file open search for: <IfModule mod_alias.c>

    Somewhere within this if add the following (I added it to the end right before the endif)


    Code:
    ScriptAlias /php /opt/iphone/bin
    AddType application/x-httpd-php .php
    Action application/x-httpd-php "/php/php-cgi"Save the conf file and reupload it.

    Now using your sftp client download and edit /etc/profile

    Add the PHP Path to the path details, after your done the PATH line should read:


    Code:
    PATH = "/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin:/opt/iphone/bin"4) Create a php file on your pc named index.php and add the following code to it:


    Code:
    <?php

    phpinfo();

    ?>)


    Upload this file to Library/WebServer/Documents/. This is your apache web directory for your new server.



    Was that of any help?

Share This Page