473,503 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

print_r(ini_get_all()); does not work!

5 New Member
Hello, this is my first post in here and when I try to run the following script:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. echo "<pre>";
  3. print_r(ini_get_all());
  4. echo "</pre>";
  5. ?>
in my Apache web server installed on a windows vista business computer, I do net get any results but the following:

"; print_r(ini_get_all()); echo ""; ?>

How to fix it please?


Thank you.



Cypherinfo.
Attached Images
File Type: jpg webpage.JPG (26.9 KB, 128 views)
Mar 2 '10 #1
5 2039
Niheel
2,456 Recognized Expert Moderator Top Contributor
Seems either the file you are using is not a .php file or your webserver isn't set to run PHP.

I would check to make sure that you've installed apache properly.

Your code seems right.
Mar 2 '10 #2
cypherinfo
5 New Member
To tell the truth I was managing to change the magic quotes setting in the php.ini.

Before that edit all right, after it the fault. The issue does not disappear even after I set the php.ini to the previouse settings.

The two php.ini I as editing are in the following folders:
the first here: C:\xampp\apache\bin\php.ini
the second here: C:\xampp\php\php.ini

I have attached the section of them about those settings.



Thank you.



Cypherinfo.
Attached Images
File Type: jpg php1.jpg (25.6 KB, 127 views)
File Type: jpg php2.jpg (21.4 KB, 129 views)
Mar 2 '10 #3
cypherinfo
5 New Member
Hi, if I try to change the code as here:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. print_r(ini_get_all());
  4.  
  5. ?>
I get a blank page!



Cypherinfo.
Mar 2 '10 #4
Atli
5,058 Recognized Expert Expert
It seems to me that Apache isn't regognizing your PHP pages as PHP pages, passing the PHP code to the browser as HTML. - Check the source of the blank page you get when you run the code in your last post. Is the code show in the source?

Typically, to get Apache to execute PHP code, you need to enable the Apache PHP module. You can do that by adding the following to the Apache configuration file. (Usually "conf/httpd.conf" under your Apache install directory. It can also have the .ini extension on Windows.)
Expand|Select|Wrap|Line Numbers
  1. LoadModule php5_module modules/php5apache2_2.dll
  2. AddType application/x-httpd-php .php .phtml .php3
  3. AddType application/x-httpd-php-source .phps
(The path in the first line may vary, depending on your OS and PHP install method.)

Edit.
Just noticed that you are using XAMPP. Seeing as it should have taken care of installing PHP for you (in it's own unique way), you may want to just re-install XAMPP.
Mar 2 '10 #5
cypherinfo
5 New Member
Hello and thanks for your reply; I tried your code and same issue.

Bye.


Cypherinfo.
Mar 4 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
6465
by: Peter | last post by:
L.S. I am developing a PHP-login script (on Lycos Tripod) that uses Session to pass on variables. Below is the entire (stripped) structure that I use. It opens a page where you can Set and Read...
3
4053
by: cv | last post by:
Hello All, I have used MultipartRequest like the following to upload images. MultipartRequest multi = new MultipartRequest(request, "../webapps/coreprogram/dealerlogos", 1024 * 1024); It...
4
4469
by: Field | last post by:
Hi, the following snippet shows once executed this output: 2 2 I'd have rather expected this output: 2 10
4
2876
by: Das | last post by:
Hi, I have made an application in ASP.net with C#. The application works fine with localhost. I have uploaded the site. I'm using web user controls in the form. but some of the button do not work...
7
1818
by: Tom | last post by:
Hi Is this a conditional ? what is the structure of the statement? ch Tom
6
8814
by: Chris Anderson | last post by:
Anyone know of a fix (ideally) or an easy workaround to the problem of escape characters not working in regex replacement text? They just come out as literal text For example, you'd think that thi...
10
16601
by: Antoine | last post by:
I can't work out what is causing this problem. Can anyone suggest what the typical causes beyond the obvious might be? Could you get it with datasets? Maybe I should run in debug mode and test...
5
2761
by: Jason | last post by:
I've got a small form (400 X 310) and I want it to start up in the lower right corner of the screen. Is there a way I can easily do this? Thanks
1
3101
by: Newbie in ChiTown | last post by:
Here's my code: I am using MS Access and I am trying to update a table (InvoiceDetails) with data input by the user on a form. However, it does not update nor does it give me an error message. ...
11
3365
by: Jim | last post by:
Hi, I want to schedule a Python program that reads the command line for input. However, when adding an argument to the command line Python will not pick it up when using Windows scheduled...
0
7192
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7064
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7445
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5559
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4665
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1492
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
369
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.