phpinfo() System

General discussion on Zend Server for IBM System i

phpinfo() System

Postby kent_zacharias on Fri May 18, 2012 2:03 pm

A great deal of information is displayed by the phpinfo.php script.

At the very top of the displayed web page via phpinfo() the following is displayed:

PHP Version 5.3.3, and, further to the right, the 'php' logo.

The second line is System, 3rd line is Build Date, the 4th line is Configure Command, 5th is Server API and so forth....

Where or from what file does System come from?

Can someone tell me how this System is determined? During installation? Perhaps Apache config? Any help is greatly appreciated. Thanks.
kent_zacharias
 
Posts: 22
Joined: Mon May 09, 2011 8:05 pm

Re: phpinfo() System

Postby erich_hieden on Mon May 21, 2012 9:22 am

AFAIK this are information determined at PHP script execution time. It's definitely not set in apache config.

Guessing by looking at the values on my system:
The first one is system operating system
The second one is the host name
The third (in my case '1') and fourth ('6') are onknown to me (maybe OS version?)
The fifth correlates with DB-Name
erich_hieden
 
Posts: 373
Joined: Tue Jul 07, 2009 9:01 am

Re: phpinfo() System

Postby kent_zacharias on Tue Jul 31, 2012 8:22 pm

Thanks Erich.

Within the PHP Variables section of phpinfo.php() the following are displayed:

_SERVER["SCRIPT_URI"] http://INVINFO400.MYCOMPANYNAME:10088/phpinfo.php (for example)

and

_SERVER["SERVER_NAME"] INVINFO400.MYCOMPANYNAME (for example)

This 2 word string INVINFO400.MYCOMPANYNAME is the same as what is displayed using the CFGTCP Configure TCP/IP command option 10. Work with TCP/IP host table entries:

Internet Host
Opt Address Name

_ 10.0.11.11 INVINFO400.MYCOMPANYNAME (for example) (line 1 for example)
invinfo400 (line 2 for example)

I am assuming that the Zend Server install process selected INVINFO400.MYCOMPANYNAME from the iSeries TCP configuration?

To access a web page via a browser (wiki, Drupal, phpBB, etc) the URL has to be entered as either:

http: //10.0.11.11:10088/w/index.php?title=Main_Page (mediawiki example, note address 10.0.11.11 in front of the port number)

or

http: //invinfo400:10088/w/index.php?title=Main_Page (mediawiki example, note address invinfo400 in front of the post number)

Each Open Source installed package (ie. mediawiki, drupal, phpBB) has had to be configured to point to 10.0.11.11 because the various web browsers assume that the 2 word string INVINFO400.MYCOMPANYNAME is a web address. And, needs the 3 letters WWW appended to the beginning and .COM appended to the end.

How do I modify the phpinfo() SERVER_NAME to be a single sting word, INVINFO400 for example, without modifying CFGTCP?
kent_zacharias
 
Posts: 22
Joined: Mon May 09, 2011 8:05 pm

Re: phpinfo() System

Postby erich_hieden on Wed Aug 01, 2012 2:32 pm

I checked it on my system (ZendServer 5.6.0 HF2 for PHP 5.2) and $_SERVER['SCRIPT_URI'] and $_SERVER['SERVER_NAME'] are set on execution time using the values passed in from the browser. Using http://as400hie/ZendServer resulted in SERVER_NAME being set to as400hie and using http://10.156.101.3/ZendServer resulted in SERVER_NAME being set to 10.156.101.3

So I don't know why you have such weird values in there, but it shouldn't matter if you run a DNS on your own and put a corresponding entry (INVINFO400.MYCOMPANYNAME pointing to 10.0.11.11) into it.

The entry you showed using CFGTCP -> 10 is only for your IBM i's own host table.
erich_hieden
 
Posts: 373
Joined: Tue Jul 07, 2009 9:01 am


Return to Zend Server for IBM i

Who is online

Users browsing this forum: No registered users and 0 guests