This topic is locked

Feeding variables to the PHP script.

9/5/2008 4:25:38 PM
PHPRunner General questions
J
jxfish2 author

Overview:
I'm brand new to PHP, MySQL and PHPRunner, but I am not new to scripting.
I am a Senior Unix Administrator, with a great deal of Korn Shell scripting.
But, we just installed some new Linux servers, and we're trying to develop our own MySQL DB with a Web-based front end, specifically for gathering application-related metrics.
We have hundreds of already created / working Korn shell scripts that monitor a huge application.
These Korn shell scripts automatically page out the on-call whenever any event occurs.
They also log these events to a vast number of different log files, based on the type of event.
We want to leverage the existing Korn shell scripts, feeding the resulting values / variables directly into the new MySQL database.
I envision using the PHP code to access the un-processed MySQL records, subordinating each alarm to a specific parent event via the returned webpage.
Then, using PHP, create reports and queries (Metrics) from those processed / subordinated alarms.
I just downloaded the PHPLoader software, and have established the basic connection to the database. I can see all of the tables that I previously created in the database.
At this point, all of these tables are empty.
I need to populate a few tables, so that I can have some data to query against, but I wanted to do that using the Korn shell scripts, and / or PHP scripts.
Here are some of the current questions that I have:

  1. Will the PHP code developed by the PHPLoader application run natively on the Linux server?
  2. how can I get the PHP scripts to recognize variables set by an outside process. In other words, if I export a variable at the O/S level, or by a parent process, how would I then get the PHP script to read in that variable?
    TIA

    Joe F.

Sergey Kornilov admin 9/5/2008

PHPRunner-generated code runs just fine on Linux server.
In regards to passing variables to PHP scripts you may want to check the following PHP manuals:

http://www.php.net/getenv

http://www.php.net/manual/en/reserved.vari...environment.php