Any framework is compatible with HipHop

643 views
Skip to first unread message

Ryan Chan

unread,
Feb 4, 2011, 10:02:57 PM2/4/11
to HipHop for PHP Dev
Hi all,

Up to now, any framework is compatible with HipHop?

Sammy Moshe

unread,
Feb 4, 2011, 10:13:12 PM2/4/11
to hiphop-...@googlegroups.com
I dont know if any frameworks are or arent supported. So much variance there that it would be hard to say. It would depend on how the framework is designed. Which were you thinking of using? I should have some time to play with it this weekend.

Sent from my HTC Touch Pro2 on the Now Network from Sprint®.

Ryan Chan

unread,
Feb 5, 2011, 5:21:40 AM2/5/11
to HipHop for PHP Dev


On 2月5日, 上午11時13分, Sammy Moshe <idontunderstandgi...@gmail.com> wrote:
> I dont know if any frameworks are or arent supported. So much variance there that it would be hard to say. It would depend on how the framework is designed. Which were you thinking of using? I should have some time to play with it this weekend.
>
> Sent from my HTC Touch Pro2 on the Now Network from Sprint®.
>

Definitely would be Codeigniter if I can run it using HiHop.

Sam M.

unread,
Feb 6, 2011, 4:47:43 AM2/6/11
to hiphop-...@googlegroups.com
I've heard of that one.
Good things.

Will codeigniter support regular old mysql bindings?
I haven't heard anything about it from anyone, but every time I've ever tried using pdo with hiphop, it's generated weird nonsensical errors.

Ryan Chan

unread,
Feb 6, 2011, 4:55:30 AM2/6/11
to HipHop for PHP Dev


On 2月6日, 下午5時47分, "Sam M." <idontunderstandgi...@gmail.com> wrote:
> I've heard of that one.
> Good things.
>
> Will codeigniter support regular old mysql bindings?
> I haven't heard anything about it from anyone, but every time I've ever
> tried using pdo with hiphop, it's generated weird nonsensical errors.
>
>

Yes, codeigniter support the use of mysql extensions.

Basically it is a very simple PHP framework.

John Clegg

unread,
Feb 9, 2011, 2:07:58 PM2/9/11
to HipHop for PHP Dev
I've just managed to get basic CodeIgniter 2.0 install to work with
Hiphop.

I will upgrade our 1.7.2 Codeigniter site to 2.0 to see it work with
Hiphop.

Sam M.

unread,
Feb 10, 2011, 12:43:25 AM2/10/11
to hiphop-...@googlegroups.com
What did you have to do to it?
Curious.

This thread is getting interesting.

Ryan Chan

unread,
Feb 10, 2011, 9:24:52 AM2/10/11
to hiphop-...@googlegroups.com
Will you share at github?

We can contribute if you don't mind.

John Clegg

unread,
Feb 10, 2011, 3:48:12 PM2/10/11
to HipHop for PHP Dev
Hi

The key thing I had to change two "eval" statements in the DB.php in
both Codeigniter 1.7.2 and 2.0. I created two new files and used an
"include" statement to load the files with the single line of php that
was in the eval statement. (I would love to know if there is a better
way of doing this)

There is also an eval statement in the Loader.php that should be
replaced, but I haven't bothered because we are not using short tags.
I have managed to get a base installation CodeIgniter 2.0 working
under hiphop , and get it fetch something from the database.

When I port our application, by adding all our libraries, models,
views, controllers, and config. The site compiles but gives a PHP as
the $this variable is NULL in the view. I have noticed that the
variable plus hundreds of others are picked up as an
"UseUndefinedVariable" in the compile errors.

I'm not sure how to fix as the $this global is being loaded via the
framework and then additional models are loaded . When the first view
is loaded and refers to the $this variable I get a php error and
everything stops.

Hope that helps.

John

John Clegg

unread,
Mar 17, 2011, 7:58:27 PM3/17/11
to HipHop for PHP Dev
Hi

Just an update .

Thanks to a patch ( https://github.com/ckwalsh/hiphop-php/commit/0549c4efb9f27ff1fcbc6fdbeb50a1478d57ea5d
) I have managed to get Code Igniter and Hiphop working.

I would be interested if you guys have had any success in gettting CI
and hiphop working.

John

Keith Clark

unread,
Mar 17, 2011, 11:40:04 PM3/17/11
to hiphop-...@googlegroups.com
Does NetBeans work for Hiphop? If not I'll just revert to CI.
--
Cordially,

Keith Clark Chairman and CEO of Jana

Matthew 7:7

Viktor

unread,
Apr 13, 2011, 9:22:38 AM4/13/11
to HipHop for PHP Dev
Hello,

I was wondering, has anyone tried to run hiphop on Kohana 3.0.x
version ? I`m getting bunch of errors and I`d appreciatte any help:

Theese are the params I`m using for translating the project.
hphp/hphp --input-dir=kohana_project_root/ --keep-tempdir=1 --log=3 -
o /home/vikky/hiphop-translated/fotolida_jenIndex --force=1 -v
"AllDynamic=true" -v "AllVolatile=true"

--> UseUndeclaredGlobalVariable in views where Kohana is sending
variables to view through extract and dynamic include like this:
protected static function capture($kohana_view_filename, array
$kohana_view_data)
{
extract($kohana_view_data, EXTR_SKIP);
ob_start();
include $kohana_view_filename;
return ob_get_clean();
}
Variable are then available like $title, etc., which triggers the
error.

--> UnknownClass ($this->_db = Database::instance($this->_db);) and
few similar to this

abstract class Kohana_Model {
protected $_db = 'default';
public function __construct($db = NULL)
{
if (is_string($this->_db))
{
$this->_db = Database::instance($this->_db);
}
}
}

--> And serveral mistakes(UseUndeclaredConstant, UnknownClass)
concerning standart php classes (and they`re not php 5.3, so should be
OK), it`s SPL.php (ArrayObject), filter.php.

Can anybody give me a hint how to work around theese, or where have I
gone wrong?

Thanks,

Viktor



On 18 bře, 05:40, Keith Clark <klownkee...@gmail.com> wrote:
> Does NetBeans work for Hiphop? If not I'll just revert to CI.
>
>
>
>
>
>
>
>
>
> On Thu, Mar 17, 2011 at 7:58 PM, John Clegg <j...@projectx.co.nz> wrote:
> > Hi
>
> > Just an update .
>
> > Thanks to a patch (
> >https://github.com/ckwalsh/hiphop-php/commit/0549c4efb9f27ff1fcbc6fdb...

joern

unread,
Apr 26, 2011, 4:04:11 AM4/26/11
to HipHop for PHP Dev
Hi Victor
Theres a problem with $this in include Files. Known Bug.
Try this:
{
extract($kohana_view_data, EXTR_SKIP);
$thisClass = $this;
ob_start();
include $kohana_view_filename;
return ob_get_clean();
}

And then use $thisClass instead of $this in your views.

Joern
Reply all
Reply to author
Forward
0 new messages