473,545 Members | 937 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

php embedded

I am working on an embedded platform which will serve a small number of
dynamic webpages. Right now we are looking at php+javascript with
apache as the webserver.

Do we need to compile the entire php tarball or is the php module in
apache enough to run php? Similarly, what is the minimum configuration
of php we need, assuming we only need to access flat-file ascii data?

Does anyone of any how-tos or guides for compiling php for embedded
platforms?

Thanks,

--Yan
Jan 9 '06 #1
5 2015
Captain Dondo wrote:
I am working on an embedded platform which will serve a small number of
dynamic webpages. Right now we are looking at php+javascript with
apache as the webserver.

Do we need to compile the entire php tarball or is the php module in
apache enough to run php? Similarly, what is the minimum configuration
of php we need, assuming we only need to access flat-file ascii data?


The first question is what is the embedded platform? (Windows, linux, etc.?)

If you are loading the php module for apache, you either have already
compiled the php source, or do not need to unless you need additional
features.

How do you plan on accessing the files? (which functions, etc.)

I'm betting that you'd be spending most of your time deciding which
extensions to *disable* rather than enable.

--
Justin Koivisto, ZCE - ju****@koivi.co m
http://koivi.com
Jan 9 '06 #2
Justin Koivisto wrote:
Captain Dondo wrote:
I am working on an embedded platform which will serve a small number of
dynamic webpages. Right now we are looking at php+javascript with
apache as the webserver.

Do we need to compile the entire php tarball or is the php module in
apache enough to run php? Similarly, what is the minimum configuration
of php we need, assuming we only need to access flat-file ascii data?

The first question is what is the embedded platform? (Windows, linux, etc.?)


Linux on arm, basically running a very stripped system.
If you are loading the php module for apache, you either have already
compiled the php source, or do not need to unless you need additional
features.
I guess my question is: "If I have the apache module, do I need any
other php-related stuff - libraries, modules, etc?"

How do you plan on accessing the files? (which functions, etc.)
All the PHP routines will do is read in a file, pre-fill a form, and
then write out the file based on form submission.

I'm betting that you'd be spending most of your time deciding which
extensions to *disable* rather than enable.
Exactly. I'm hoping someone has a guide out there on how to strip out
all those things I don't need...

Jan 9 '06 #3
Captain Dondo wrote:
Justin Koivisto wrote:
Captain Dondo wrote:
I am working on an embedded platform which will serve a small number of
dynamic webpages. Right now we are looking at php+javascript with
apache as the webserver.

Do we need to compile the entire php tarball or is the php module in
apache enough to run php? Similarly, what is the minimum configuration
of php we need, assuming we only need to access flat-file ascii data?


The first question is what is the embedded platform? (Windows, linux,
etc.?)


Linux on arm, basically running a very stripped system.
If you are loading the php module for apache, you either have already
compiled the php source, or do not need to unless you need additional
features.


I guess my question is: "If I have the apache module, do I need any
other php-related stuff - libraries, modules, etc?"


Only if the code you write (or install) in PHP needs them. That would
then bring up more questions, of which the most important is:

Will the php code be embedded as well, or will others have the
opportunity to run their own code on this embedded system?
How do you plan on accessing the files? (which functions, etc.)


All the PHP routines will do is read in a file, pre-fill a form, and
then write out the file based on form submission.


Is this something similar to a firewall configuration? If so, then you
won't likely need other libraries or modules if the scripts don't need them.
I'm betting that you'd be spending most of your time deciding which
extensions to *disable* rather than enable.


Exactly. I'm hoping someone has a guide out there on how to strip out
all those things I don't need...


There won't be a guide as it will depend on the intended use (as per
above statements).

The way I'd go about this is to first compile the default configuration
and see what was enabled by viewing the output of php_info(). From
there, you should be able to "--without-PACKAGE" where necessary until
you think you have the minimum that your code needs. My suggestion about
this route is to disable no more than 2 or 3 extensions at a time and
test - especially if you didn't write the PHP code.

HTH

--
Justin Koivisto, ZCE - ju****@koivi.co m
http://koivi.com
Jan 9 '06 #4
Captain Dondo wrote:
I am working on an embedded platform which will serve a small number of
dynamic webpages. Right now we are looking at php+javascript with
apache as the webserver.
What kind of hardware resources is available? Both PHP and Apache are
fairly large.
Do we need to compile the entire php tarball or is the php module in
apache enough to run php? Similarly, what is the minimum configuration
of php we need, assuming we only need to access flat-file ascii data?


It's been a while since I compiled PHP on Linux. I don't believe the
language core compiles into a separate dynamically loaded library as it
does on Windows. The Apache module should be all you need. There are a
number of extensions that are included by default. Look at the options
available to the autoconf script for more info. Around 400 functions
are bundled in the standard extension and cannot be removed without
altering the source. So even if you will never call highlight_sourc e()
or convert_cyr_str ing(), you're more or less stuck with them.

Jan 10 '06 #5
C.
"fairly large" - well yes. It sounds like this will not be a high
volume webserver, but with an ARM processor, there should be enough CPU
to get it running. I'd definitely consider ditching apache and using
thttpd or monkey or even one of the webservers written in PHP.

When I looked after production systems I prefered using prebuilt rpms
(along with a good upgrade tool) - it made management so much easier -
but I did build php5 with MySQL, GD, PECL and SQLLite. The stripped
binary was about 1Mb.

HTH

C.

Jan 10 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
4423
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat Enterplise Linux 3 ES, and applied FixPack fp5_mi00069.tar to it. After creating an instance, starting the database, creating a database, and entering...
11
4232
by: Mark Yudkin | last post by:
The documentation is unclear (at least to me) on the permissibility of accessing DB2 (8.1.5) concurrently on and from Windows 2000 / XP / 2003, with separate transactions scope, from separate threads of a multithreaded program using embedded SQL. Since the threads do not need to share transaction scopes, the sqleAttachToCtx family of APIs do...
8
8072
by: Colleyville Alan | last post by:
I have been working on an Access app that takes info from a file and writes it to a spreadsheet on a form, simultaneously saving the spreadsheet to Excel. I got the idea that the same concept could work in reverse, i.e. we have a cost model written in Excel that calculates the profitability of customer accounts based on several inputs and...
0
2190
by: Nick White [MSFT] | last post by:
Hello fellow Microsoft Windows Mobile and Embedded enthusiasts: I invite you to peruse the list below of upcoming technical chats and Webcasts offered by the Windows Mobile and Embedded Devices Group. For the full list of upcoming Windows Mobile and Embedded chats, to review archived chat sessions, or to request a reminder for a chat,...
59
7114
by: Jeff Bowden | last post by:
For ease of configuration and other reasons, I would like for my single-user GUI app to be able to use postgresql in-process as a library accessing a database created in the users home directory. I think I could possibly get what I want by launching a captive copy of postmaster with appropriate args but it seems conceptually cleaner to not...
49
8905
by: Alex Vinokur | last post by:
Are there any restrictions/problems for use of C++ STL in development in embedded systems? In particular: * Does STL require too much space/memory? * Is 'implementation of STL algorithms/methods' reenterable/reentrant? * What is the cost to provide continuity of vectors in memory? Any other problems? -- Alex Vinokur
0
2244
by: YellowFin Announcements | last post by:
Whitepaper: "Yellowfin Reporting" enables Embedded Business Intelligence -------------------------------------------------------------------------------- Embedded reports are a standard requirement of most applications. But users are increasingly demanding more sophisticated reporting from applications - seeking such features as custom...
1
1644
by: leeanngriego | last post by:
I have a client who has asked me to find him some solid up and coming embedded engineers. 2 to 3 years expereince with Embedded Linux, VxWorks, Nucleus or any other RTOS who has working in L2/L3 networking. The object is to bring them on board and train in SAN/NAS switching, as long as they are solid C, Unix and Embedded programmers that have...
20
2013
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
There are a few guarantees I exploit in the C Standard. For instance, I might write (unsigned)-1 to get the maximum value for an unsigned integer. Also, I might rely on things such as: memset(data,-1,sizeof data)
30
4254
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
Let's say we had a simple function for returning the amount of days in a month: unsigned DaysInMonth(unsigned const month) { switch (month) { case 8: case 3: case 5:
0
7467
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7419
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7756
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5326
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4944
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3442
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1879
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.