Apache server

I’m french and I don’t speak very well english.

I need your help to install Apache on QNX, configure it and i want to know how to use Apache. I’m a novice in web and php.

Thanks for your help.

I have read apache’s documentation and this documentation talk to 3 files :

I don’t have the 3 files. I have only httpd.h, and only files with the extension .h

When I want find this files, the computer find nothing.
When I find apache, it’s present in the repertories :

What files must I configure?

When i write httpd in a terminal, i have this :

Could not determine the server’s fully qualified domain nam, using for ServerName

What files must I change ?

How can I use apache as root ?
how must i configure httpd.conf ?

Eventually , i have found httpf.conf, srm.conf and access.conf.
They are in /etc/apache

which lines can i modifie ?

assuming you have qnx6 and apache-1.3.x

configuration file is /etc/apache/httpd.conf

“ServerName” is apache configuration directive which can be manually set-up in httpd.conf or apache can get ServerName from FQDN. There is /etc/net.cfg which contains FQDN configuration (hostname, domain). You can use phlip application to change hostname and domain in net.cfg.

“User” and “Group” are apache configuration directives which set-up effective uid and gid of the httpd process. Even though you can change them as “User root” and “Group root” it is not recommended due to increased security risk. It is recommended to run apache as “User nobody” and “Group nobody”.

I want know how change php files directory, because I use Slinger and all my files are in the repertory : /usr/webdoc
So I want change php files directory and I want php files target are the repertory : /usr/webdoc
I suppose I must change http.conf but which lines ?

Sorry for my english’s level… ;-)

In my errorlog’s file, I have this:

[Wed Apr 7 10:50:31 2004] [alert] mod_unique_id: unable to gethostbyname(“iris”)

I don’t understand. What must I change?

Concerning slinger: Slinger is not able to run php scripts (It can be done by writing a shell script which will run php executable manually but it is not much effective solution)

Concerning apache: Easiest way to set-up system to recognize “iris” name is to edit /etc/hosts where you add line “ iris” (you have to replace with your system IP address) and in phlip application (Launch → Configure → Network) in tab “Network” enable “look in local ‘hosts’ file first” checkbox

QNX documentation: qnx.com/developers/docs/mome … /momentics
Slinger documentation: qnx.com/developers/docs/mome … inger.html
Apache documentation: httpd.apache.org/docs

Thanks you for your help… but I have again a problem.
When i click on button “Enregistrer”, i have this :

Method Not Allowed
The requested method POST is not allowed for the URL /Hserie.php.
Apache/1.3.27 Server at iris Port 80

Here sources of my files:


Hacheur Mode Serie

Hacheur Mode Serie

Frequence (de 0 a 10000 Hz):

Rapport Cyclique (de 0.02 a 1 par pas de 0.02):


<? $fp=fopen ("aaa.txt","w"); $periode=1/$Frequence; $alpha=$Rapport*$periode; $periode_alpha=$periode-$alpha; fputs($fp,0); fputs($fp,"\n"); fputs($fp,$alpha); fputs($fp,"\n"); fputs($fp,$periode_alpha); ?>

If not, I have one well index.html but it’s not important.
I don’t see where are my problem (:frowning: ) even if I have read Apache’s documentation
Else, i don’t use Slinger because Apache is sufficient.

Thanks for your help

Are you sure your apache is configured for php? Can you confirm it? just create a “test.php” file like this:


then point your browser to it to see if it can print out the php information of your server.

Perhaps I made an error, but it does not go(sorry but my bad english’s level)

I have this :

Parent Directory 01-Apr-2004 17:19 -
test.php 09-Apr-2004 09:03 1k
Apache/1.3.27 Server at iris-qnx587 Port 80

and when I click on test.php, I have this :

<?php phpinfo(); ?>

I think I made an error but where ???
I use Mozilla as browser or MozillaFireBird. If I must configue apache, how can configure it for accept php ???

Must i have php 4.1.2 install on my computer ???

Sorry but PHP 4.3.1 is install on my computer !!!
But I don’t always understand why I have this :

Method Not Allowed
The requested method POST is not allowed for the URL /Hserie.php.
Apache/1.3.27 Server at iris Port 80

PHP 4.3.1 and Apache 1.3.27 are install !!!
Help me

I think it’s an installation’s problem because PHP are in the repertories :

Apache are in the repertories :
/usr/share with the repertories cig-bin, htdocs and icons

httpd.conf are in the repertory /etc/apache with the repertory /lib and the repertory /htdocs which I have create, with and my files in HTML and PHP in th repertory htdocs of /etc/apache/htdocs

Must I uninstall PHP and Apache and reinstall in a same repertory ???

Put following in /etc/apache/httpd.conf

LoadModule php4_module /usr/lib/apache/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php

Restart apache. Now check /var/log/error_log, if you have “Not enough memory” error there then I don’t know how to help you :slight_smile:

Now I have this as problem

You don’t have permission to access /Page_index/vierge.html on this server.

Indeed, I wanted install another Apache’s version but as I did not arrive there, i wanted reinstall Apache by QNX Installer and I have this new problem. I don’t have chance with QNX and Apache

If you are using QNX 6.2.1, you will definitely get the “Not enough memory” error :frowning:

Your options:

  1. donwgrade to QNX 6.2.0
  2. wait for QNX 6.3 that will be out end of second quarter of this year. (can anybody who is on the 6.3 beta program test to see if this problem is fixed?)
  3. use the following hack:
    start the apache with the normal httpd.conf (without php stuff), once httpd is running, you can then modify the httpd.conf to add the php stuff as mezek mentioned above, finally send a SIGHUP to the controlling httpd (you can use “apachectl restart” to achieve this).

Can you explain more the option 3 please…

What noc mean is:

  1. Start apache without these lines in httpd.conf: “LoadModule php4_module /usr/lib/apache/libphp4.so” and “AddModule mod_php4.c”
    The apache will start but without php support

  2. Add the lines in httpd.conf (LoadModule, AddModule) and “restart” apache by executing apachectl restart. This “restart” doesnt do actual process exit but rather reads configuration files again and “apply changes” or whatever it does. However this “restart” will not fail with the Not Enough Memory and you will get “working” apache + php

A very thing for your help. Also, I want now why must write apchectl restart? Why there is this problem ?Why apache must to be restart ?