Jump to content

Archived

This topic is now archived and is closed to further replies.

m august

Interpreting the phpinfo() output tables

Recommended Posts

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?

Share this post


Link to post
Share on other sites
[quote]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?[/quote]
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.

[quote]Also, the table entitled 'Additional Modules' at the bottom of the output contains absolutely nothing. Is that normal?[/quote]
I get the same too. I'm not sure what this for.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
If the doc_root isnt set PHP will use Apaches directory root (specified in the httpd.conf file).

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Oh I see what you mean now. This happens when you haven't closed your your quoters properly

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.