Click to See Complete Forum and Search --> : phpinfo() returns text


dpbabin
03-22-2008, 12:24 AM
I have installed Apache 2.2, php 5.2.5 and mysql 5. It is all working after some fits and starts, but my php pages appear funny. I had it installed once before and phpinfo returned a nicely formatted page. This is what I am getting below. I have searched on google but can't seem to find an answer. Any help would be appreciated. I also installed phpmyadmin and it works, but the pages show a whole lot of the same type of text.

Thanks Dave

HTTP/1.1 200 OK Date: Sat, 22 Mar 2008 03:18:13 GMT Server: Apache/2.2.8 (Win32) PHP/5.2.5 X-Powered-By: PHP/5.2.5 Connection: close Content-Type: text/html 23-Mar-2007 03:10:06 GMT; path=/madmin/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: private, max-age=10800, pre-check=10800 Last-Modified: Sat, 22 Mar 2008 03:01:56 GMT Set-Cookie: pma_theme=original; expires=Mon, 21-Apr-2008 03:10:08 GMT; path=/madmin/; httponly Content-Length: 2263 Connection: close Content-Type: text/html; charset=utf-8 Off arg_separator.input&& arg_separator.output&& asp_tagsOffOff auto_append_fileno valueno value auto_globals_jitOnOn auto_prepend_fileno valueno value browscapno valueno value default_charsetno valueno value default_mimetypetext/htmltext/html define_syslog_variablesOffOff disable_classesno valueno value disable_functionsno valueno value display_errorsOnOn display_startup_errorsOffOff doc_rootc:\web\testc:\web\test docref_extno valueno value docref_rootno valueno value enable_dlOnOn error_append_stringno valueno value error_logno valueno value error_prepend_stringno valueno value error_reporting61436143 expose_phpOnOn extension_dir././ file_uploadsOnOn highlight.bg#FFFFFF#FFFFFF highlight.comment#FF8000#FF8000 highlight.default#0000BB#0000BB highlight.html#000000#000000 highlight.keyword#007700#007700 highlight.string#DD0000#DD0000 html_errorsOnOn ignore_repeated_errorsOffOff ignore_repeated_sourceOffOff ignore_user_abortOffOff implicit_flushOffOff include_path.;C:\php5\pear.;C:\php5\pear log_errorsOnOn log_errors_max_len10241024 magic_quotes_gpcOffOff magic_quotes_runtimeOffOff magic_quotes_sybaseOffOff mail.force_extra_parametersno valueno value max_execution_time3030 max_input_nesting_level6464 max_input_time6060 memory_limit128M128M open_basedirno valueno value output_buffering40964096 output_handlerno valueno value post_max_size8M8M precision1414 realpath_cache_size16K16K realpath_cache_ttl120120 register_argc_argvOffOff register_globalsOffOff register_long_arraysOffOff report_memleaksOnOn report_zend_debugOnOn safe_modeOffOff safe_mode_exec_dirno valueno value safe_mode_gidOffOff safe_mode_include_dirno valueno value sendmail_fromno valueno value sendmail_pathno valueno value serialize_precision100100 short_open_tagOffOff SMTPlocalhostlocalhost smtp_port2525 sql.safe_modeOffOff track_errorsOffOff unserialize_callback_funcno valueno value upload_max_filesize2M2M upload_tmp_dirno valueno value user_dirno valueno value variables_orderGPCSGPCS xmlrpc_error_number00 xmlrpc_errorsOffOff y2k_complianceOnOn zend.ze1_compatibility_modeOffOff
apache2handler
OnOn
Apache Version Apache/2.2.8 (Win32) PHP/5.2.5
Apache API Version 20051115

dpbabin
03-22-2008, 01:18 AM
I just tried to install joomla. The pages display different things every time I refresh. Some columns/fields are there one time, then not the next. The same for phpmysqladmin.

NogDog
03-22-2008, 01:48 AM
What does it look like if you do a "view source" on the phpinfo output in your browser?

dpbabin
03-22-2008, 10:47 AM
Thanks for the quick reply. I did a lot of research last night and found a setting to add to my php.ini which gives me the formatted phpinfo page except for the very top which show this: the line I added was:
mime_magic.magicfile = "C:/php/extras/magic.mime"

Having said that joomla and phpmyadmin still look funny. Here are the lines on phpinfo at the top:

HTTP/1.1 200 OK Date: Sat, 22 Mar 2008 13:40:33 GMT Server: Apache/2.2.8 (Win32) PHP/5.2.5 X-Powered-By: PHP/5.2.5 Connection: close Content-Type: text/html ss="v">127.0.0.1 _SERVER["DOCUMENT_ROOT"]C:/web/test _SERVER["SERVER_ADMIN"]admin@david-84d15d2b8.Belkin _SERVER["SCRIPT_FILENAME"]C:/web/test/info.php _SERVER["REMOTE_PORT"]4426 _SERVER["GATEWAY_INTERFACE"]CGI/1.1 _SERVER["SERVER_PROTOCOL"]HTTP/1.0 _SERVER["REQUEST_METHOD"]GET _SERVER["QUERY_STRING"]no value _SERVER["REQUEST_URI"]/info.php _SERVER["SCRIPT_NAME"]/info.php _SERVER["PHP_SELF"]/info.php _SERVER["REQUEST_TIME"]1206161693

Here is the top part of looking at the source: it starts looking right at the header for PHP License.

HTTP/1.1 200 OK
Date: Sat, 22 Mar 2008 13:40:33 GMT
Server: Apache/2.2.8 (Win32) PHP/5.2.5
X-Powered-By: PHP/5.2.5
Connection: close
Content-Type: text/html

ss="v">127.0.0.1</td></tr>
<tr><td class="e">_SERVER["DOCUMENT_ROOT"]</td><td class="v">C:/web/test</td></tr>
<tr><td class="e">_SERVER["SERVER_ADMIN"]</td><td class="v">admin@david-84d15d2b8.Belkin</td></tr>
<tr><td class="e">_SERVER["SCRIPT_FILENAME"]</td><td class="v">C:/web/test/info.php</td></tr>
<tr><td class="e">_SERVER["REMOTE_PORT"]</td><td class="v">4426</td></tr>
<tr><td class="e">_SERVER["GATEWAY_INTERFACE"]</td><td class="v">CGI/1.1</td></tr>
<tr><td class="e">_SERVER["SERVER_PROTOCOL"]</td><td class="v">HTTP/1.0</td></tr>
<tr><td class="e">_SERVER["REQUEST_METHOD"]</td><td class="v">GET</td></tr>
<tr><td class="e">_SERVER["QUERY_STRING"]</td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">_SERVER["REQUEST_URI"]</td><td class="v">/info.php</td></tr>
<tr><td class="e">_SERVER["SCRIPT_NAME"]</td><td class="v">/info.php</td></tr>
<tr><td class="e">_SERVER["PHP_SELF"]</td><td class="v">/info.php</td></tr>
<tr><td class="e">_SERVER["REQUEST_TIME"]</td><td class="v">1206161693</td></tr>
</table><br />
<h2>PHP License</h2>

NogDog
03-22-2008, 09:33 PM
It's weird, because it looks like it's outputting the HTTP headers directly to your browser display. I've never run into anything like that. If it were my computer, I'd probably uninstall and install again. :rolleyes:

dpbabin
03-23-2008, 05:52 PM
You think everything or just PHP. It really is weird since my install of php was from the zip file from php.net.

NogDog
03-23-2008, 10:10 PM
Looks like more of an Apache problem to me, but that's just a guess. Only other thing I can think of is maybe your Apache config is pointing to the CLI version of PHP instead of the SAPI module (or at least the CGI version).

Maybe you could search your httpd.conf file for all references to "php" and post them here?