473,471 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

PHP script at start up

I would like to run a script at startup under SuSE 9. I read and
figured out that it can be done using chkconfig and setting the proper
run level. The problem I have currently is that I depend on system
environmental variables being available for PHP. I am using PHP as a
scripting language (nothing to do with the web), and this PHP script
is called from the start up bash script, but it cannot retrieve any
environmental vars at runlevel 3.

When are environmental vars set and at which runlevel? Or should I do
this some other way?

Thanks,

Slawek

Feb 8 '07 #1
2 1470
On Thu, 08 Feb 2007 08:39:22 -0800, Slawek wrote:
I would like to run a script at startup under SuSE 9. I read and
figured out that it can be done using chkconfig and setting the proper
run level. The problem I have currently is that I depend on system
environmental variables being available for PHP. I am using PHP as a
scripting language (nothing to do with the web), and this PHP script
is called from the start up bash script, but it cannot retrieve any
environmental vars at runlevel 3.

When are environmental vars set and at which runlevel? Or should I do
this some other way?

Thanks,

Slawek
$ php -r 'echo getenv("ORACLE_HOME"),"\n";'
/oracle/product/10g
$
--
http://www.mladen-gogala.com
Feb 9 '07 #2
Slawek wrote:
When are environmental vars set and at which runlevel? Or should I do
this some other way?
Different environment variables are set at different stages. Many of the
good ones are not set until you log in.

What information do you need to find out from environment variables?
Perhaps there is another way of finding it.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Feb 9 '07 #3

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

Similar topics

5
by: Paul O. Morris | last post by:
Is there a script that I can run to stop a particular SQL server service on Win2003 server? I'm looking for a similar script to restart that service as well. Thanks.
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
1
by: pmclinn | last post by:
The code below is generated by an application that allows you to put a Microsoft assistant on a webpage. I'm having a heck of a time trying to get this script to launch on a server side button...
33
by: patrick_woflian | last post by:
hey guys, im just writing a basic calculation at the moment, before building on it for an A-Level piece of work. i can add/divide etc... two numbers together yet i am having a major problem with...
7
by: C.Joseph Drayton | last post by:
I have a problem that I am hoping someone can help me with. First let me describe the problem. I have an HTML form that in one field has an onBlur call to a JavaScript function. When you exit the...
6
by: tatamata | last post by:
Hello. How can I run some Python script within C# program? Thanks, Zlatko
2
by: azmiza | last post by:
Hi friend, I am new in this area. Hope members can help me on my script below. I want to create Previous and Next button but it runs until maximum execution time. Help me <?php #script...
7
by: hlubenow | last post by:
Hi, recently there was a thread about hiding the python-script from the user. The OP could use http://freshmeat.net/projects/pyobfuscate/ H.
1
by: nafe | last post by:
Am trying to implement a shopping cart in java script which is using cookies. I have a form consisting of itemID,quantity and price. these are details that the user has selected. below is the code...
3
by: traceable1 | last post by:
Is there a way I can set up a SQL script to run when the instance starts up? SQL Server 2005 SP2 thanks!
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
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...
1
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...
0
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...
0
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...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.