compiling php as cgi binary

Posted on 2012-09-21
Last Modified: 2013-01-21
How can I compile php 5.4.7 as a cgi binary?
Question by:Samuraiboy
    LVL 13

    Expert Comment

    by:Hugh McCurdy
    Historically, there wasn't a true PHP compiler.  There was an obfuscator called a "compiler."

    More recently, Facebook developed hiphop.  Perhaps that's what you want.

    You might also want to look at
    LVL 13

    Expert Comment

    by:Hugh McCurdy
    You question also leads to the question of what do you want to accomplish?  Or why?  Knowing the why is critical to helping someone find a good solution.

    Author Comment

    #hmccurdy : I am creating a shared environment where i can put separate cgi binary file for individual users for testing purpose.
    LVL 13

    Accepted Solution

    One idea, if you want to use regular PHP would be to have PHP include different include files based on the user.  

    Also, depending on what you are doing, could you just write a C++ (or whatever) CGI instead?  It might be simpler.  (Depends on why you are processing PHP in the first place.)

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
    How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now