Solved

Compile php scripts as DSO

Posted on 2004-08-20
6
245 Views
Last Modified: 2008-03-10
Good day!

I would like to know if it is possible to compile a php script as a DSO under Apache and Linux. (How?)

If not, how would I create a DSO (under Apache and Linux) that can receive "POST" and "GET" and connect to a MySQL Database?

Thanx in advance!

p.s the keyword here is "free product" - Zend compiler is out of the question.

-RR-
0
Comment
Question by:rogueripper
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 48

Expert Comment

by:hernst42
ID: 11851822
If your apache is complied with DSO support you can easy configure php to be used as a DSO by compiling PHP with the option

./configure --with-apxs=`which apxs` (apache 1.3)
./configure --with-apxs2='which apxs2` (apache 2.0)
make
make install

see http://de3.php.net/manual/en/install.unix.apache.php or http://de3.php.net/manual/en/install.unix.apache2.php
0
 

Author Comment

by:rogueripper
ID: 11868877
Hi hernst42

I would like to compile a php script as a DSO and not the php interpreteritself. I want to leave the php interpreter as a 3rd party installation away from apache.

Thanx!
0
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
ID: 11868985
I don't think it is possible to to compile a php-script so it is usable as standalone without any php-interpreter.

To create such a DSO you have to register certain functions in apache for your DSO and you have to write that DSO in C. A good start might be the SAPI-handler for apache in the PHP-souces (sapi/apache) or you look at other apache-modules like mod_mysql, but that will be a lot of work to realize such a thing.
0
 

Author Comment

by:rogueripper
ID: 11878688
Hi hernst42

Thanx for the help!

I suppose that what I am trying to achieve is not possible.

If I compile the php interpreter as a DSO, would I be able to use the php functions in a C script? and then compile that script as a DSO?

-RR-
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

632 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