phpinfo

How to get phpinfo() variables from php programmatically?

我们两清 提交于 2019-12-03 05:16:44
I am attempting to get a list of dependable(consistent across requests) list of "hidden" constants in PHP(as in, the client-side won't know about it in most cases without hacking). Some of the things I am interested in is the following: ./configure options. I would also like the very first System value in phpinfo. The loaded PHP modules(as shown in the Apache section) The build date of PHP. Registered PHP streams Registered stream socket transports Registered stream filters How can I get either just a portion of the phpinfo or get these values as a regular string? Note that it doesn't matter

$_SERVER['REQUEST_METHOD'] does not exist

怎甘沉沦 提交于 2019-12-02 01:29:23
I've just installed WAMP and I can access localhost and get the phpinfo() output. However, although I can see _SERVER['REQUEST_METHOD'] is set to GET, I'm trying to use the following PHP: if ($_SERVER["REQUEST_METHOD"]=="POST") { ... but it produces this error: PHP Notice: Undefined index: REQUEST_METHOD in C:\ ... \test.php on line 40 Using Komodo to stop at line 40 and check $_SERVER - it does not have 'REQUEST_METHOD' in the array at all - not even GET. Anyone have any ideas? Do I have to enable POST, REQUEST_METHOD? Why can I see REQUEST_METHOD=GET in the phpinfo but not in the PHP script.

Problem of different PHP versions reported

六月ゝ 毕业季﹏ 提交于 2019-12-01 18:53:27
问题 I have upgraded to PHP 5.3 on a development machine (Windows 7 box). php-v shows PHP 5.3.3 (cli) (built: Jul 21 2010 20:36:55) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies However, phpinfo.php shows that the version on the machine is: 5.2.14 as shown The loaded configuration file rightly loads the correct php.ini file for 5.3 The configuration file (php.ini) Path wrongly reads: C:\Windows - I don't install PHP on the said path. I have

PHP Fatal error Out of memory

大城市里の小女人 提交于 2019-12-01 13:29:39
I am calling the below two function inside a function called RebuildSummary() create_summary() insertdatafromfile() 1. create_summary function create_summary function fetches activity data from database and loop through activities using for each loop, and insert data into the below text file like below: zfilename71801404123.txt A|201309|R|C|2|014000956|014000956|2200|201211|M|3118.72|35215.12|1639.96|40749.29|46183.13|44653.83|1529.3|||423|9999|EVERGREEN IMPLEMENT INC A|201309|R|C|2|014000956|014000956|2201|201211|M|0|13.86|0|15.22|13.86|15.22|-1.36|||423|9999|EVERGREEN IMPLEMENT INC 2.

phpinfo() is not working on my CentOS server

…衆ロ難τιáo~ 提交于 2019-11-30 08:48:06
I have PHP installed on my CentOS server. However, when running a phpinfo() inside my script to test it, I receive the HTML, not the interpreted information. I can see the folders for PHP. I can even see the php.ini in the etc folder. But PHP itself does not seem to be working. I mean my test.php file looks like this: <?php phpinfo(); ?> And the response looks like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html><head> <style type="text/css"> body {background-color: #ffffff; color: #000000;} body, td, th, h1, h2 {font-family: sans-serif

How to check mod_headers and mod_expires modules enabled in apache

北慕城南 提交于 2019-11-30 03:44:35
I want to check whether mod_headers and mod_expires modules enabled or not in my server Is there a way available to list apache enabled/disabled modules using some php function just like we list php information with phpinfo(); function? speeves On Debian: user@machine:~$ /usr/sbin/apache2 -l Most GNU/Linux distros: user@machine:~$ /usr/sbin/httpd -l Ubuntu: user@machine:~$ ls /etc/apache2/mods-enabled On Mac OSX: user@mymac:~$ httpd -l On Win 7 (64-bit): C:\Users\myuser>"\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe" -l Try these commands from a terminal window in all

How was my running php compiled?

a 夏天 提交于 2019-11-29 17:32:39
问题 I'm trying to compile a new instance of PHP (5.4.0) from the source code and want to keep compatibility with the one (PHP 5.3.6-13ubuntu3.6) already installed from the distro, Ubuntu-11.10. That is, I want to run ./configure with the same directives as the installed PHP. I always could see the ./configure command outputted by phpinfo() but this time, for my surprise, it's not provided. Do you know of any flag that prevent phpinfo of outputting the compile configuration? Or, Do you know of any

PHP configuration to enable sessions

一个人想着一个人 提交于 2019-11-29 10:54:20
On our development server, sessions handling works fine. On our production server, it doesnt. phpinfo on the development server shows: session Session Support enabled Registered save handlers files user mm sqlite Registered serializer handlers php php_binary wddx phpinfo on the production server shows: session Session Support enabled Registered save handlers files user Registered serializer handlers php php_binary wddx What is "mm sqlite" and could it be causing the problem? How do I enable this? What are these settings anyway? The rest of the settings are common between the two: Directive

How to check mod_headers and mod_expires modules enabled in apache

独自空忆成欢 提交于 2019-11-29 00:45:06
问题 I want to check whether mod_headers and mod_expires modules enabled or not in my server Is there a way available to list apache enabled/disabled modules using some php function just like we list php information with phpinfo(); function? 回答1: On Debian: user@machine:~$ /usr/sbin/apache2 -l Most GNU/Linux distros: user@machine:~$ /usr/sbin/httpd -l Ubuntu: user@machine:~$ ls /etc/apache2/mods-enabled On Mac OSX: user@mymac:~$ httpd -l On Win 7 (64-bit): C:\Users\myuser>"\Program Files (x86)

phpinfo() - is there an easy way for seeing it?

丶灬走出姿态 提交于 2019-11-28 15:42:56
问题 Each time I want to see the phpinfo(); I have to: Create a info.php file; Write phpinfo(); in it. Go to the browser and type my "thisproject.dev/info.php" I'm on Ubuntu. Isn't there a more practical way to see phpinfo in the browser? 回答1: From your command line you can run.. php -i I know it's not the browser window, but you can't see the phpinfo(); contents without making the function call. Obviously, the best approach would be to have a phpinfo script in the root of your web server