PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > PHTML files showing as blank pages
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
PHTML files showing as blank pages

Réponse
 
LinkBack Outils de la discussion
Vieux 05/01/2008, 14h39   #1
A.smith
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut PHTML files showing as blank pages

Hi,

I'm having a problem getting .phtml files to display in a web browser. I
can successfully display a test.php page as per PHP install instructions but
the phtml files show up blank
(in firefox or IE).

I have added these entries to my apache httpd.conf:

LoadModule php5_module modules/libphp5.so
AddHandler php5-script .php .phtml
AddType text/html .php .phtml
#AddType application/x-httpd-php .php .php3 .php4 .phtml (I tried with this
uncommented too and without the previous entry)
AddType application/x-httpd-php-source .phps

My system is: Apache/2.2.6 (Unix) PHP/5.2.5


The phtml files I am having the problem with are from an opensource project
called CDRTool
I believe other people can run this app fine so I believe my issue is a prob
with apache/php
(also because I've never configured apache/php before so its a fair shout
Ive done something
wrong! :P)

The one thing that looks odd to me as someone who hasnt done this before is
that all
the phtml files start with a line:

<?

Anyway, hopefully its an easy one to fix if ur an expert! Any
appreciated!

thanks in advance, Andy.

________________________________________________
Message sent using UK Grid Webmail 2.7.9
  Réponse avec citation
Vieux 05/01/2008, 17h47   #2
Daniel Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHTML files showing as blank pages

On Jan 5, 2008 9:39 AM, A.smith <a.smith@ukgrid.net> wrote:
> Hi,
>
> I'm having a problem getting .phtml files to display in a web browser. I
> can successfully display a test.php page as per PHP install instructions but
> the phtml files show up blank
> (in firefox or IE).
>
> I have added these entries to my apache httpd.conf:
>
> LoadModule php5_module modules/libphp5.so
> AddHandler php5-script .php .phtml
> AddType text/html .php .phtml
> #AddType application/x-httpd-php .php .php3 .php4 .phtml (I tried with this
> uncommented too and without the previous entry)
> AddType application/x-httpd-php-source .phps
>
> My system is: Apache/2.2.6 (Unix) PHP/5.2.5
>
>
> The phtml files I am having the problem with are from an opensource project
> called CDRTool
> I believe other people can run this app fine so I believe my issue is a prob
> with apache/php
> (also because I've never configured apache/php before so its a fair shout
> Ive done something
> wrong! :P)
>
> The one thing that looks odd to me as someone who hasnt done this before is
> that all
> the phtml files start with a line:
>
> <?
>
> Anyway, hopefully its an easy one to fix if ur an expert! Any
> appreciated!
>
> thanks in advance, Andy.



A decent HOWTO to setup Apache2 and PHP5 on *nix systems:
http://dan.drydog.com/apache2php.html

Also, those <? lines are to be expected. That indicates where PHP
code begins. If you want to get involved with PHP programming, I
suggest learning the basics before trying to set up a whole system
yourself.

--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.
  Réponse avec citation
Vieux 05/01/2008, 18h19   #3
Bastien Koert
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: [PHP] PHTML files showing as blank pages


Andy,

try this

AddHandler php5-script .php .phtml
#AddType text/html .php .phtml
AddType application/x-httpd-php .php .phtml .html .htm


bastien


----------------------------------------
> Date: Sat, 5 Jan 2008 14:39:49 +0000
> To: php-general@lists.php.net
> From: a.smith@ukgrid.net
> Subject: [php] PHTML files showing as blank pages
>
> Hi,
>
> I'm having a problem getting .phtml files to display in a web browser. I
> can successfully display a test.php page as per PHP install instructions but
> the phtml files show up blank
> (in firefox or IE).
>
> I have added these entries to my apache httpd.conf:
>
> LoadModule php5_module modules/libphp5.so
> AddHandler php5-script .php .phtml
> AddType text/html .php .phtml
> #AddType application/x-httpd-php .php .php3 .php4 .phtml (I tried with this
> uncommented too and without the previous entry)
> AddType application/x-httpd-php-source .phps
>
> My system is: Apache/2.2.6 (Unix) PHP/5.2.5
>
>
> The phtml files I am having the problem with are from an opensource project
> called CDRTool
> I believe other people can run this app fine so I believe my issue is a prob
> with apache/php
> (also because I've never configured apache/php before so its a fair shout
> Ive done something
> wrong! :P)
>
> The one thing that looks odd to me as someone who hasnt done this before is
> that all
> the phtml files start with a line:
>
>
> Anyway, hopefully its an easy one to fix if ur an expert! Any
> appreciated!
>
> thanks in advance, Andy.
>
> ________________________________________________
> Message sent using UK Grid Webmail 2.7.9
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


__________________________________________________ _______________
Read what Santa`s been up to! For all the latest, visit asksantaclaus.spaces.live.com!
http://asksantaclaus.spaces.live.com/
  Réponse avec citation
Vieux 05/01/2008, 23h37   #4
Brady Mitchell
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHTML files showing as blank pages


On Jan 5, 2008, at 639AM, A.smith wrote:
> I'm having a problem getting .phtml files to display in a web
> browser. I
> can successfully display a test.php page as per PHP install
> instructions but
> the phtml files show up blank
> (in firefox or IE).


A blank page often means that there's an error of some kind, but error
reporting is turned off.

Put the following code in the file that's giving you problems to turn
on errors, then reload the file in your browser to see what you get:

ini_set('display_errors',1);

Brady
  Réponse avec citation
Vieux 07/01/2008, 15h54   #5
Andy Smith
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHTML files showing as blank pages

Hi All,

Ok, I have resolved the problem! Interestingly from the index.phtml page I
was still unable to get any info even
after setting the display errors options as suggested by Brady. I tried
connecting direct to some other random
..phtml files included in the CDRTool app and I started getting errors
regarding missing files. The solution turned
out that there were many "pear" module dependencies that weren't mentioned
in the installation and requirements
documents for CDRTool (which simply stated PHP was required). Anyway I added
the modules one by one
depending on the error message I was seeing and now I can connect to the
index.phtml page too.

Thanks to those who replied,

cheers Andy.

----- Original Message -----
From: "Brady Mitchell" <mydarb@gmail.com>
To: "A.smith" <a.smith@ukgrid.net>
Cc: <php-general@lists.php.net>
Sent: Sunday, January 06, 2008 12:37 AM
Subject: Re: [php] PHTML files showing as blank pages


>
> On Jan 5, 2008, at 639AM, A.smith wrote:
>> I'm having a problem getting .phtml files to display in a web browser.
>> I
>> can successfully display a test.php page as per PHP install instructions
>> but
>> the phtml files show up blank
>> (in firefox or IE).

>
> A blank page often means that there's an error of some kind, but error
> reporting is turned off.
>
> Put the following code in the file that's giving you problems to turn on
> errors, then reload the file in your browser to see what you get:
>
> ini_set('display_errors',1);
>
> Brady

  Réponse avec citation
Vieux 08/01/2008, 17h58   #6
tedd
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHTML files showing as blank pages

At 3:37 PM -0800 1/5/08, Brady Mitchell wrote:
>On Jan 5, 2008, at 639AM, A.smith wrote:
>> I'm having a problem getting .phtml files to display in a web browser. I
>>can successfully display a test.php page as per PHP install instructions but
>>the phtml files show up blank
>>(in firefox or IE).

>
>A blank page often means that there's an error of some kind, but
>error reporting is turned off.
>
>Put the following code in the file that's giving you problems to
>turn on errors, then reload the file in your browser to see what you
>get:
>
>ini_set('display_errors',1);
>
>Brady



Yes, but even then you can get a blank page -- it depends upon the
type of error.

I would start with commenting everything out, and then un-commenting
statements in steps until the error(s) cause a blank page. Fix the
errors and try again.

Cheers,

tedd


--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
  Réponse avec citation
Vieux 08/01/2008, 18h02   #7
Eric Butera
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHTML files showing as blank pages

On Jan 5, 2008 9:39 AM, A.smith <a.smith@ukgrid.net> wrote:
> Hi,
>
> I'm having a problem getting .phtml files to display in a web browser. I
> can successfully display a test.php page as per PHP install instructions but
> the phtml files show up blank
> (in firefox or IE).
>
> I have added these entries to my apache httpd.conf:
>
> LoadModule php5_module modules/libphp5.so
> AddHandler php5-script .php .phtml
> AddType text/html .php .phtml
> #AddType application/x-httpd-php .php .php3 .php4 .phtml (I tried with this
> uncommented too and without the previous entry)
> AddType application/x-httpd-php-source .phps
>
> My system is: Apache/2.2.6 (Unix) PHP/5.2.5
>
>
> The phtml files I am having the problem with are from an opensource project
> called CDRTool
> I believe other people can run this app fine so I believe my issue is a prob
> with apache/php
> (also because I've never configured apache/php before so its a fair shout
> Ive done something
> wrong! :P)
>
> The one thing that looks odd to me as someone who hasnt done this before is
> that all
> the phtml files start with a line:
>
> <?
>
> Anyway, hopefully its an easy one to fix if ur an expert! Any
> appreciated!
>
> thanks in advance, Andy.
>
> ________________________________________________
> Message sent using UK Grid Webmail 2.7.9
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Try

short_open_tag = On

in php.ini as a guess.
  Réponse avec citation
Vieux 08/01/2008, 18h06   #8
Daniel Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHTML files showing as blank pages

On Jan 8, 2008 12:58 PM, tedd <tedd.sperling@gmail.com> wrote:
> At 3:37 PM -0800 1/5/08, Brady Mitchell wrote:
> >On Jan 5, 2008, at 639AM, A.smith wrote:
> >> I'm having a problem getting .phtml files to display in a web browser. I
> >>can successfully display a test.php page as per PHP install instructions but
> >>the phtml files show up blank
> >>(in firefox or IE).

> >
> >A blank page often means that there's an error of some kind, but
> >error reporting is turned off.
> >
> >Put the following code in the file that's giving you problems to
> >turn on errors, then reload the file in your browser to see what you
> >get:
> >
> >ini_set('display_errors',1);
> >
> >Brady

>
>
> Yes, but even then you can get a blank page -- it depends upon the
> type of error.
>
> I would start with commenting everything out, and then un-commenting
> statements in steps until the error(s) cause a blank page. Fix the
> errors and try again.


Or make sure your die(); and exit; lines actually display an error
prior to executing (or, in the case of die(), at the point of
execution). And be sure to set <? error_reporting("E_ALL"); ?> to see
notices, et cetera, to be sure there aren't undefined variables, et
cetera.

--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h23.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,18377 seconds with 16 queries