That is pretty much dead on. Some things to note: I decided not to go through the headache of compiling php and apache myself on AIX. There are some wonderful folks at a community college that created packages for smit.
http://pware.hvcc.edu/ <http://pware.hvcc.edu/>I typed up everything I did to get it installed, so if anyone is interested, let me know. The idea is not to use the AIX/Universe machine as a webserver, but, to use Apache/PHP to receive requests from a webserver. So its possible that the "pware" folks put that environment setting in their build of apache. I don't know enough about it to say one way or the other. Whatever the case may be, you can find what apache and php are doing by using the following php script, and calling it in a browser (NOT a shell). <pre> <?php echo system('set'); //Display the environment. $path = '/path-to-valid-universe-account'; chdir($path); putenv('LDR_CNTRL='); //Setting it equal to nothing works. //exec('unset LDR_CNTRL'); //Executing unset does not work. echo 'BEFORE Universe is executed.' . "<br/>"; echo system('/usr/ibm/uv/bin/uv 2>&1'); //Be sure and redirect stderr to stdout. echo 'AFTER Universe is executed' . "<br/>"; ?> </pre> The echo system('set'); and the redirection of universe's stderr to stdout should let you see what is happening. Then to actually get universe to fire up, you can just follow Kevin's example. <?php $current = getenv('LDR_CNTRL'); //Get the current value. On my system it was set to LDR_CNTRL=MAXDATA=0x80000000 putenv('LDR_CNTRL='); //Set it to equal to nothing. exec('/usr/ibm/uv/bin/uv'); //Fire up Universe. putenv('LDR_CNTRL=' . $current); //Put it back after universe exits. ?> This is on Universe 10.3.4 on AIX 5.3. I'm guessing the same problem would exist on version 11 too. I did call our support with Rocket and they were clueless, so I'll probably email it on over to them (just to be a good messenger). Also someone posted this link earlier from the IBM website. http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=/com.ibm.itame3.doc_5.1/am51_perftune113.htm On Sat, May 7, 2011 at 12:11 AM, Kevin King <[email protected]> wrote: > When John and I were working on this we noticed that the LDR_CNTRL > environment variable wasn't set at all on a normal telnet login. When we > DID set it manually on the telnet session, Universe wouldn't start with the > 4 22 message. So the simplest version the script was basically like this > (and forgive me as I'm reciting from memory): > > <?php > $current = getenv('LDR_CNTRL'); > putenv('LDR_CNTRL='); > exec('/u1/uv/bin/uv'); > putenv('LDR_CNTRL=' . $current); > ?> > > John has been working on this more after we got this far so I'll defer to > him for more details. Note that all this script was proving was the ability > to start UV successfully from a PHP script invoked through Apache. There > is > more going on with moving data in and out of UV using JSON, which allows > massive amounts of structured data to be moved into and out of the > environment. > > -K > _______________________________________________ > U2-Users mailing list > [email protected] > http://listserver.u2ug.org/mailman/listinfo/u2-users > -- John Thompson _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
