logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: phpinfo not showing result
Author
cjagdish69



Joined: 20 Nov 2007
Posts: 9

PostPosted: Tue 20 Nov '07 9:53    Post subject: phpinfo not showing result Reply with quote

I have installed OpenSuSE 10.3. While installation i have selected php/mysql/apache also.

They are installed in my machine.
Php5-5.2.4-11
mysql-5.0.45-22
apache2-2.2.4-10
are the versions installed on my machine.

now in a user called "mohan" i have created a file called "test.php" as follows :
<?
phpinfo();
?>

and i am trying to invoke this file in firefox(2.0.0.6) but i am not getting the output of phpinfo().

What will be the problem ?

Kindly guide.

TIA.

- JAGDISH.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 20 Nov '07 10:23    Post subject: Reply with quote

- What do you see, if you "view source" in your browser?
- Did you add an include or was automatic added to httpd.conf where PHP is loaded or in httpd.conf itself?
Back to top
cjagdish69



Joined: 20 Nov 2007
Posts: 9

PostPosted: Tue 20 Nov '07 11:57    Post subject: view source of phpinfo() Reply with quote

Sir,

The view source is showing the output as :

<?
phpinfo();
?>

The content of my httpd.conf file is as follows :



LoadModule php5_module /usr/lib/apache2/mod_php5.so


Kindly guide.

Mod: Note removed unneeded stuff of httpd.conf
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 20 Nov '07 13:00    Post subject: Re: view source of phpinfo() Reply with quote

cjagdish69 wrote:

LoadModule php5_module /usr/lib/apache2/mod_php5.so


So there is the module loaded, but not associated with the PHP files. So there is no parsing

so you add after the load of the php module

e.g.
Code:

LoadModule php5_module                    /usr/lib/apache2/mod_php5.so

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps


maybe you set a path to your php.ini

e.g.
Code:

PHPIniDir "/etc/php5"


but an first it should run with standart config. I'm not used to SUSE Linux

Don't forget to reload or restart apache
Back to top
cjagdish69



Joined: 20 Nov 2007
Posts: 9

PostPosted: Wed 21 Nov '07 10:48    Post subject: association of php files with apache Reply with quote

Sir,

I have added the association of php files to the apache to the httpd.conf file in /etc/apache2/, but it is of no use.

Still i am getting blank page. The view source is showing me the content of the file test.php correctly.

What will be the problem. Kindly guide in this regard.

- JAGDISH.
Back to top
bentogoa



Joined: 09 Feb 2007
Posts: 66
Location: GOA

PostPosted: Wed 21 Nov '07 14:04    Post subject: Reply with quote

if the view source is showing
Code:
<?
phpinfo();
?>
then php is not set up correctly
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 21 Nov '07 15:00    Post subject: Reply with quote

A second thing I can thing of is the short tag ( <? )

You may try to start with a long tag <?php
Back to top
andrisem



Joined: 24 Nov 2007
Posts: 1

PostPosted: Sat 24 Nov '07 2:28    Post subject: Short open tag Reply with quote

Hello!

James Blond solution helped to me with openSuse 10.3. Thanks a lot!

If You want to use <? style tag not <?php then edit
Your php.ini file and set short_open_tag = On

; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.
short_open_tag = On
Back to top
bentogoa



Joined: 09 Feb 2007
Posts: 66
Location: GOA

PostPosted: Sat 24 Nov '07 5:58    Post subject: Reply with quote

Try This Code
Code:

<?php
phpinfo();
?>
Back to top
cjagdish69



Joined: 20 Nov 2007
Posts: 9

PostPosted: Tue 18 Mar '08 13:11    Post subject: apache gets stopped Reply with quote

I got the solution to the blank page. My virus scanner firewall was active. I have de-activated the firewall and then installed the php with proper php association suggested in the above posts.

Now the phpinfo() script is showing me the output for just a second or two seconds and immediately after that the apache server gets stopped automatically.

My apache log file say as follows :
"httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.16.5.22 for ServerName
[Tue Mar 18 16:25:55 2008] [warn] pid file C:/apache2.2.8/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Tue Mar 18 16:25:55 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.5 configured -- resuming normal operations
[Tue Mar 18 16:25:55 2008] [notice] Server built: Jan 18 2008 00:37:19
[Tue Mar 18 16:25:55 2008] [notice] Parent: Created child process 736
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.16.5.22 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 172.16.5.22 for ServerName
[Tue Mar 18 16:25:56 2008] [notice] Child 736: Child process is running
[Tue Mar 18 16:25:56 2008] [notice] Child 736: Acquired the start mutex.
[Tue Mar 18 16:25:56 2008] [notice] Child 736: Starting 64 worker threads.
[Tue Mar 18 16:25:56 2008] [notice] Child 736: Starting thread to listen on port 80.
[Tue Mar 18 16:28:47 2008] [notice] Parent: child process exited with status 3221225477 -- Restarting."
what will be the reason for this ?


- JAGDISH.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 18 Mar '08 15:37    Post subject: Reply with quote

I've seen this restarting with some PHP extensions.
So disable all extension in php.ini and try again. And than enable only extension you need one by one to see if a extension chrashes your apache when you call phpinfo page.
Back to top


Reply to topic   Topic: phpinfo not showing result View previous topic :: View next topic
Post new topic   Forum Index -> Other Software