Jump to content


Photo

Interpreting the phpinfo() output tables


  • Please log in to reply
8 replies to this topic

#1 m august

m august
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 20 July 2006 - 07:24 PM

When using phpinfo(), is there a link or some documentation that explains the information output in the table entitled 'apache2handler'?  Specifically, when I look in the list under 'LOADED MODULES', I see an entry for mod_php5, not the specific file designated in the  LoadModule php5_module "c:/php5/php5apache2_2.dll"  directive I inserted into my httpd.conf.  How do I check to be sure that the file literally specified is the one that was used?

Also, the table entitled 'Additional Modules' at the bottom of the output contains absolutely nothing. Is that normal?

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 20 July 2006 - 07:33 PM

Specifically, when I look in the list under 'LOADED MODULES', I see an entry for mod_php5, not the specific file designated in the  LoadModule php5_module "c:/php5/php5apache2_2.dll"  directive I inserted into my httpd.conf.  How do I check to be sure that the file literally specified is the one that was used?

If Apache didnt load the PHP module correctly, Apache will either refuse to start or whenever you go to a PHP file it'll ask you to download it, or it'll display the source code for that file, which will verify that Apache hasn't loaded the php5 module.

FYI, I get the same too. I thinks its to do with how Apache get the correct module name from the module file itself. Or the way PHP displays the information.

Also, the table entitled 'Additional Modules' at the bottom of the output contains absolutely nothing. Is that normal?

I get the same too. I'm not sure what this for.

#3 m august

m august
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 20 July 2006 - 08:10 PM

You said Apache dumps a listing of source file when an error occurs. Well, in the long table output under the 'PHP Core' heading, at the 'doc_root' directive, I get a lengthy printout of a section of the php.ini file that includes everything in php.ini from the 'Paths and Directories' section at the doc_root directive through 'File Uploads', 'Fopen wrappers', 'Dynamic Extensions',  and 'Module Settings'  all the way down to a few lines past the [Session] subsection.

Yet it obviously found the specified doc_root or it couldn't have found my php page in htdocs to load in the first place. Why does it list that lengthy portion of the php.ini file after the doc_root directive?

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 20 July 2006 - 08:14 PM

If the doc_root isnt set PHP will use Apaches directory root (specified in the httpd.conf file).

#5 m august

m august
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 20 July 2006 - 08:50 PM

Yes, I assumed that was the case, but I wondered if it considered the php.ini directive as some kind of error.  Interestingly enough, when I comment out the doc_root directive in php.ini, the dump of source code disappears and, just as you would expect, it still works fine because the Apache document_root is indeed pointing to the Apache2.2\htdocs file.

It just seems odd that it would issue a dump when one has the unnecessary doc_root file in the php.ini, or is it still needed for some other use internal to PHP?

#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 20 July 2006 - 08:55 PM

Oh I see what you mean now. This happens when you haven't closed your your quoters properly

#7 m august

m august
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 20 July 2006 - 11:08 PM

In my php page, I use the following call to mysql_connect:

mysql_connect('localhost', 'mysql_user', 'mysql_password');


Since I don't have a clue as to what my user id is, it did not come as any surprise that I got the following error:

Access denied for user 'mysql_user'@'localhost' (using password: YES)


How do I figure out what my user id is, and my password for that matter. Is it listed in the output for phpinfo()? Or is that just the password and userid (root) that I'm already using when I use MySQL

#8 m august

m august
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 20 July 2006 - 11:29 PM

It finally dawned on me. OBVIOUSLY, it must need the password to convey over to the MySQL area. I simply entered 'root' for my user id - which is what I use over on MySQL- and I used the same password I use to sign on to the MySQL command line console. It actually says, for the first time:

Connected successfully

which reflects the debug insertion in my php page:

echo 'Connected successfully';


Hallelujah.  (It only took 6 days. Some guys have been at this since April)

#9 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 21 July 2006 - 10:11 AM

Yeah when you use mysql connect you use the same username/password combo you use when you login to mysql through the  command line.

Glad you got everything sorted out.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users