Not Found error in HipHop application

26 views
Skip to first unread message

Jeffery Fernandez

unread,
Feb 28, 2010, 7:53:22 PM2/28/10
to hiphop-...@googlegroups.com
I have compiled the latest (2585051a4d802b11c794cb3bf131949715c06e44) of hiphop and starting building my application. However I only get a "Not Found" message when I access the application on port 8080 of my server. Anywhere I should start tracking what the issue is? Any hints?

cheers,
Jeffery

Arnaud Granal

unread,
Feb 28, 2010, 7:59:23 PM2/28/10
to HipHop for PHP Dev

/index.php

:)

Arnaud.

Jeffery Fernandez

unread,
Feb 28, 2010, 8:10:19 PM2/28/10
to hiphop-...@googlegroups.com
nope, I tried that. Anything I build results in a "Not Found". I tried a simple phpinfo page and still the same.

This is my little bash script I use:

#!/bin/bash
export HIPHOP_BUILD_HOME=~/Documents/Development/hiphop
export CMAKE_PREFIX_PATH=$HIPHOP_BUILD_HOME
export HPHP_HOME=$CMAKE_PREFIX_PATH/hiphop-php
export HPHP_LIB=$HPHP_HOME/bin
hphp=$HPHP_HOME/src/hphp/hphp
hphpi=$HPHP_HOME/src/hphpi/hphpi


function buildFilesList
{
    find $PROJECT_ABSOLUTE_PATH -name "*.php" > $PROJECT_ABSOLUTE_PATH/hiphop/files.list
    cat $PROJECT_ABSOLUTE_PATH/hiphop/files.list
}

function buildProjectHipHop
{
$hphp \
--input-list=$PROJECT_ABSOLUTE_PATH/hiphop/files.list \
--keep-tempdir=1 \
--log=3 \
--include-path="." \
--force=1 \
-v \
"AllDynamic=true" \
--output-dir=$PROJECT_ABSOLUTE_PATH/hiphop
}

function launchHipHopApplication
{
$PROJECT_ABSOLUTE_PATH/hiphop/program \
-m server \
-p 8080 \
-v "Server.SourceRoot=$PROJECT_ABSOLUTE_PATH" \
-v "Server.DefaultDocument=index.php"
-c $HPHP_HOME/bin/mime.hdf
}

if [ -d "$1" ]; then
    PROJECT_PATH=$1
    PROJECT_ABSOLUTE_PATH=`readlink -f $PROJECT_PATH`
    echo $PROJECT_ABSOLUTE_PATH

    if [ ! -d "$PROJECT_ABSOLUTE_PATH/hiphop" ]; then
        mkdir "$PROJECT_ABSOLUTE_PATH/hiphop" || exit 1;
    fi

    # Cleanup old files
    rm -fR $PROJECT_ABSOLUTE_PATH/hiphop/*

    buildFilesList

    buildProjectHipHop

    launchHipHopApplication
   
else
    echo "Please provide a project path to compile"
    exit 1
fi

Arnaud Granal

unread,
Feb 28, 2010, 9:48:15 PM2/28/10
to HipHop for PHP Dev
On 1 mar, 03:10, Jeffery Fernandez <jefferyfernan...@gmail.com> wrote:
> nope, I tried that. Anything I build results in a "Not Found". I tried a
> simple phpinfo page and still the same.
>

The /index.php thingy was not so stupid though.


Your problem is here:
find DOC_ROOT -name '*.php'

This creates a file-list looking like
DOC_ROOT/index.php

Therefore, to access the file you would have to do:
http://your_server:your_port/DOC_ROOT/index.php


To solve this issue:
just pushd/cd to DOC_ROOT and do all the commands from there (e.g.
find)

Arnaud.

Jeffery Fernandez

unread,
Feb 28, 2010, 10:43:15 PM2/28/10
to hiphop-...@googlegroups.com
Thanks Arnaud,

That was it. I got my application running, albeit without styles and images.

cheers,
Jeffery

Haiping Zhao

unread,
Feb 28, 2010, 11:41:29 PM2/28/10
to hiphop-...@googlegroups.com
To get styles and images, try to follow WordPress’s example in feeding MIME extensions. Let us know if it works for you.

-Haiping

Jeffery Fernandez

unread,
Mar 1, 2010, 5:52:59 AM3/1/10
to hiphop-...@googlegroups.com
Thanks Haiping,

I got it working now, it was a typo in my script which prevented the styles/images from loading.

cheers,
Jeffery
Reply all
Reply to author
Forward
0 new messages