| Author |  | 
| cjagdish69 
 
 
 Joined: 20 Nov 2007
 Posts: 9
 
 
 | 
|  Posted: Tue 20 Nov '07 9:53    Post subject: phpinfo not showing result |   |  
| 
 |  
| 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: 7442
 Location: EU, Germany, Next to Hamburg
 
 | 
|  Posted: Tue 20 Nov '07 10:23    Post subject: |   |  
| 
 |  
| - 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
 
 
 | 
|  Posted: Tue 20 Nov '07 11:57    Post subject: view source of phpinfo() |   |  
| 
 |  
| 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: 7442
 Location: EU, Germany, Next to Hamburg
 
 | 
|  Posted: Tue 20 Nov '07 13:00    Post subject: Re: view source of phpinfo() |   |  
| 
 |  
|  	  | 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
 
 
 | 
|  Posted: Wed 21 Nov '07 10:48    Post subject: association of php files with apache |   |  
| 
 |  
| 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
 
 | 
|  Posted: Wed 21 Nov '07 14:04    Post subject: |   |  
| 
 |  
| if the view source is showing  then php is not set up correctly |  | 
| Back to top |  | 
| James Blond Moderator
 
  
 Joined: 19 Jan 2006
 Posts: 7442
 Location: EU, Germany, Next to Hamburg
 
 | 
|  Posted: Wed 21 Nov '07 15:00    Post subject: |   |  
| 
 |  
| 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
 
 
 | 
|  Posted: Sat 24 Nov '07 2:28    Post subject: Short open tag |   |  
| 
 |  
| 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
 
 | 
|  Posted: Sat 24 Nov '07 5:58    Post subject: |   |  
| 
 |  
| Try This Code 
  	  | Code: |  	  | <?php
 phpinfo();
 ?>
 | 
 |  | 
| Back to top |  | 
| cjagdish69 
 
 
 Joined: 20 Nov 2007
 Posts: 9
 
 
 | 
|  Posted: Tue 18 Mar '08 13:11    Post subject: apache gets stopped |   |  
| 
 |  
| 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: 7442
 Location: EU, Germany, Next to Hamburg
 
 | 
|  Posted: Tue 18 Mar '08 15:37    Post subject: |   |  
| 
 |  
| 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 |  |