Results 1 to 4 of 4
  1. #1

    Member Since
    Jul 26, 2010
    Trying to set up dev environment for PHP Extension
    Hey everyone:

    I'm new to these forums so bear with me.

    I'm hoping to become the new maintainer for PHP Extension called AMFEXT. I've been in touch with the original maintainer who has recommended a setup using Visual Studio which I am not particularly excited about.

    The basic idea is that I want to set up an IDE on my Mac (Eclipse, XCode, or whatever) and develop in a *nix environment. The problem I'm having is that the amfext source code depends very heavily on the PHP source code for a variety of macros and other stuff and it has a variety of scripts (phpize, configure, etc) that auto-generate the Makefile depending on a variety of conditions within your PHP source directories.

    I'm not really sure how to 'import' the existing code (and its makefile) into some IDE on my Mac so that it doesn't go rewriting the Makefile or creating all kinds of directory structures or whatever. I just want to see the *one* C source code file in my IDE with all the friendly code highlighting so I can take advantage of all the IDE goodies look function source locators and one-button compilation and stuff. I'm open to using pretty much any IDE that will allow me to do this.

    Can anyone suggest how I might go about this? I've been trying to import with Eclipse and XCode and am not having much luck. NOTE this is not a darwin project but a C project.

  2. #2

    Member Since
    Oct 03, 2009
    I prefer Netbeans. I use it extensively for Java development, and I know ti has strong C/C++, Ruby, and PHP support as well. Might give it a shot. Sounds like it couldn't hurt any.

  3. #3

    Member Since
    Jul 26, 2010
    Selection of an IDE is not really the issue here. The issue is how to set up whatever IDE I've chosen. This is difficult because the source code for amfext, written in C, relies on a couple of scripts to auto-generate a Makefile and various other files. These auto-generated makefiles and source files are required to make the extension play nice with the rest of the PHP project which consists of millions of lines of code.

    I fiddled around with XCode yesterday and made some progress. I created a new XCode project in the source folder and added amf.h and amf.c to the project. I also added numerous directories to the Header Search Path. This resulted in most of the code errors going away.

    However, I'm still getting 'missing symbol: _estrndup'. This should have been found because amf.c includes php.h which includes zend.h which includes zend_alloc.h which contains this:
    ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
    Write multiplayer games using Actionscript 3 and PHP 5 using FlashMOG

  4. #4

    Member Since
    Jul 26, 2010
    It did occur to me that this problem might be due to a library issue rather than a header issue, but I'm still not sure how to deal with it.

    The amf source, unless compiled directly into the huge PHP project, is designed to create a shared library object, I understand that PHP its Extensions make use of the Zend Engine's modified memory allocation routines such as estrndup. What is not clear to me is how should gain access to these routines. Do I need to add a library path in my XCode project? If so, which of the dozens of settings in the Project Settings dialog would be the one where I add this? Also, which folder would it be? I see that apache loads the php5 module from modules/

    Any help would be much appreciated.
    Write multiplayer games using Actionscript 3 and PHP 5 using FlashMOG

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Best web dev tool for apache/php/mySql
    By bascobill in forum Web Design and Hosting
    Replies: 2
    Last Post: 02-01-2013, 07:02 AM
  2. Installing MySql extension for PHP
    By cmessineo in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 05-20-2009, 11:18 AM
  3. How do I set environment variables in Leapord
    By Smacky311 in forum OS X - Development and Darwin
    Replies: 1
    Last Post: 10-03-2008, 07:33 PM
  4. How to set environment variables?
    By HSN in forum OS X - Apps and Games
    Replies: 5
    Last Post: 12-06-2007, 11:19 PM
  5. Setting up a Dev Environment
    By Neko_D in forum Web Design and Hosting
    Replies: 5
    Last Post: 08-31-2007, 06:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts