|
|
|
|
|
|
![]() |
#1 |
Registered User
|
Get back some good info on your server
If you are paying for hosting and wondering about info on box you are hosted on heres some cool code for you
<<<---START BELOW HERE--->>> ob_start(); phpinfo(); $phpinfo = ob_get_contents(); ob_end_clean(); preg_match_all('/#[0-9a-fA-F]{6}/', $phpinfo, $rawmatches); for ($i = 0; $i < count($rawmatches[0]); $i++) $matches[] = $rawmatches[0][$i]; $matches = array_unique($matches); $hexvalue = '0123456789abcdef'; $j = 0; foreach ($matches as $match) { $r = '#'; $searches[$j] = $match; for ($i = 0; $i < 6; $i++) $r .= substr($hexvalue, mt_rand(0, 15), 1); $replacements[$j++] = $r; unset($r); } for ($i = 0; $i < count($searches); $i++) $phpinfo = str_replace($searches, $replacements, $phpinfo); echo $phpinfo; <---END HERE---> Take this code, copy an paste it into notepad, save the file as anything you like example "whatsgoingon.php" up load it to a directory on your server and run it. IE if you place it in a directory called www.yourdomain.com/php then you would type this in your browser www.yourdomain.com/php/whatsgoingon.php I got this from the php website today. The only thing I dont like about it is it outputs a whole bunch of wakky colors and you have to keep refreashing to find one you can read. But it is a nice thing, as like me I found out today my host had a very old version of php and this could be causing issues with my site.. Hope this helps, jugg.. |
![]() |
![]() |
![]() |
#2 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
you could do
Code:
<?php phpinfo(); ?> ![]()
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
![]() |
![]() |
![]() |
#3 |
Registered User
|
Right. I have that one also but that will only tell you the version, nothing more. Try this out it gives you a whole bunch of shit. All the enabled options your host has on the software etc. BTW, cd34 just the man I needed to ask something. I dont have much exp with Linux boxes and installing php. Any idea what would give a 400 Bad Request error? I have some users signing up at my site complaining that after they enter a validation code they still get an error message stating wrong user name and password. The only thing I can find looking threw the logs and crossing with their ip is that error. Thanks Jugg..
|
![]() |
![]() |
![]() |
#4 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
Well, then something is seriously wrong somewhere.
The script you have runs ob_start(), then does phpinfo(), then does ob_end_clean() -- all you have done is capture the output from phpinfo() which is then processed with random colors. The output you get from phpinfo() or the script you have posted should be no different. I did test both before posting and after your reply. Except for colors, I get identical information. As for the error 400, you'd need to give a little more info out of the error.log file. 401 would be invalid user/pass which would be much more likely. a 400 error would suggest a proxy server or something inbetween having a problem moreso than a user. Are you behind a load balancer or caching forwarder? Is it a php request that gives the error? or any request? Give me a little more info and I'll see if I can help. Might be a few days to get back to you as the winds are picking up. ![]()
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
![]() |
![]() |
![]() |
#5 | ||
Registered User
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
|
|