|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 I have the default "recommended" php.ini installed under both: /usr/local/apache2/conf /usr/local/apache2/php as I wasnt certain where it should go... My system is: Apache/2.2.6 (Unix) PHP/5.2.5 The phtml files are from an opensource product called CDRTool which other people are using successfully so I think the most likely problem I have is I have something badly configured on my apache/php side (particularly as this isnt something Ive attemtped to configure before). One thing I noticed regarding all of the CDRTool .phtml files is that they all have a first line like: <? Is that normal? I suppose someone who knows php will know what it means :S Thanks in advance for any advice, Andy. ________________________________________________ Message sent using UK Grid Webmail 2.7.9 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Jan 5, 7:49 pm, a.sm...@ukgrid.net ("A.smith") wrote:
> Hi, > > I'm having a problem getting .phtml files to display in a web browser. I > can successfully display a test.phppage as perPHPinstall instructions but > the phtml files show up blank (in firefox or IE). > > I have added these entries to myapachehttpd.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 Try: LoadModule php5_module modules/libphp5.so AddType application/x-httpd-php .php AddType application/x-httpd-php .phtml I suspect that you do not need to use AddHandler. > > I have the default "recommended"php.ini installed under both: > /usr/local/apache2/conf > /usr/local/apache2/php > as I wasnt certain where it should go... > > My system is:Apache/2.2.6 (Unix)PHP/5.2.5 > > The phtml files are from an opensource product called CDRTool which other > people > are using successfully so I think the most likely problem I have is I have > something > badly configured on myapache/phpside (particularly as this isnt something > Ive > attemtped to configure before). > One thing I noticed regarding all of the CDRTool .phtml files is that they > all have a first line like: > > <? > > Is that normal? I suppose someone who knowsphpwill know what it means :S <? is opens PHP code block. It is normal. But will PHP process it or not depends on short_open_tag directive from PHP.ini. it should be On, like: short_open_tag=On If short_open_tag=Off, the <?php should be used instead of <? |
|
![]() |
| Outils de la discussion | |
|
|