|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Problem getting php running
i trying to get php set up on openbsd4.5. i already installed php5-core. the install file say to create a symbolic link to /var/www/conf/modules/ which i already did.
i also create the index.php file with the content below to test that php is running < ?php phpinfo() ?> when i try to view apache (http://localhost) from my web browser it still shows me apache welcome page. if i try (http://localhost/php.index) it just opens the file content and if i try (http://localhost/php.index/) it shows a broken link error. i assume there is more that needs to be done and not just install the php5-core but i cant seem to figure out what next. pls how do i get php up and running |
|
|||
Quote:
Also i am trying to edit the /var/www/conf/httpd.conf file using vi but i get the error read-only file, not written. i stopped apache and it stil did not help. any idea what is accessing the file to prevent me from editing it? |
|
||||
Quote:
First, rc.conf contains only environment variables used by rc(8), it is not an executable script; local execution is done in rc.local(8). Second, while there is an httpd related environment variable associated with Apache execution by rc(8), the variable is "httpd_flags". Third, the best practice is to make local variable changes in rc.conf.local(5), rather than in rc.conf itself; as rc.conf is a system file subject to change during upgrades. Quote:
|
|
|||
Quote:
Now let me digest all the first second & third explanation above bcos it seems like greek to me. lol |
|
||||
During a normal boot, the kernel probes your hardware (white text on blue background appears), then starts init(8). Init runs the rc(8) script -- it's a script you should look at some time, when you're bored -- the file is /etc/rc. When output switches from white-on-blue to white-on-black, you are seeing output from rc.
The rc script mounts partitions, configures and starts your network, starts daemons (background services, such as Apache), enables the console for log in, makes configuration settings .... and any other tasks need to prepare the OS for use. rc uses a bunch of variables, which it reads from /etc/rc.conf, which describes settings that control what rc does. One example is the "httpd_flags" variable. By default, this is set to "NO", which tells rc not to start the Apache webserver. After reading /etc/rc.conf, and setting variables, rc will then look for and read in /etc/rc.conf.local, if the file exists, and reset any variables accoring to the value(s) found in that file. So /etc/rc.conf.local settings *override* settings in /etc/rc.conf. For 3rd party applications that have daemons, the rc.conf and rc.conf.local files are not used, as these only contain variables which rc knows about -- settings associated with built-in daemons, primarily. After rc has completed running, it launches /etc/rc.local. The rc.local script is where you put 3rd party daemon startup commands, since rc.conf or rc.conf.local are not used. |
|
|||
Hi jggimi, just want to get something clear.
After creating my rc.conf.local i realized that performing an #apachetl graceful gave an error. it started but gave an error as follows # apachectl graceful /usr/sbin/apachectl: /etc/rc.conf.local[107]: .: /etc/rc.conf.local: Too many open files /usr/sbin/apachectl graceful: httpd gracefully restarted searching for a solution, i found that you have to delete the last 2 lines or comment them as follows. this worked as i did not get the error message again but why is this the case #local_rcconf="/etc/rc.conf.local" # [ -f ${local_rcconf} ] && . ${local_rcconf} # Do not edit this line |
|
||||
Just like rc(8), apachectl acquires httpd_flag settings from rc.conf(8). rc.conf will source variables from rc.conf.local if it exists (the last two lines of rc.conf or rc.conf.local that you have commented out perform that function).
You have a recursion problem. My guess is that you copied rc.conf to rc.conf.local. That is not a valid rc.conf.local configuration. rc.conf.local should only contain local changes to rc(8) variables. For example, if on installation of OpenBSD, you elected not to have an sshd(8) service running, the install script will create a one-line rc.conf.local file containing sshd_flags=NO. If you intend to use rc.conf.local, which is a best practice, please ensure that /etc/rc.conf is in the exact state it had when originally installed, and place only your local changes in rc.conf.local. If you need to restore /etc/rc.conf, here is a link to a copy of rc.conf for 4.5-release: http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/etc/rc?rev=1.321;content-type=text%2Fplain And in case you are using 4.4-release, here is a link to that version: http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/etc/rc?rev=1.318;content-type=text%2Fplain |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Netbeans running application problem. | bsdnewbie999 | Programming | 7 | 2nd November 2015 10:44 PM |
Running as a WPA-RADIUS AP? | Sunnz | OpenBSD Security | 7 | 23rd September 2009 02:09 AM |
Running your own web server | JMJ_coder | General software and network | 28 | 13th February 2009 01:15 AM |
Problems running jdk-1.7 | incripshin | OpenBSD Packages and Ports | 10 | 10th August 2008 05:54 PM |
Cron running but not working | stukov | Other BSD and UNIX/UNIX-like | 26 | 24th July 2008 01:17 PM |