Logo 
Search:

PHP Forum

Ask Question   UnAnswered
Home » Forum » PHP       RSS Feeds

Issue php files are displayed as text

  Asked By: Willie    Date: Sep 04    Category: PHP    Views: 2221
  

one issue may not really by a PHP issue, but hoping someone can
help nonetheless..

I have php 4.4.7 and 5.2.2. When I load libph5.so, any php files are
displayed as text, ie source code.

I have
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddHandler php-script php
AddType text/html php
LoadModule php5_module modules/libphp5.so

in my httpd.conf. This is a os/x box.

So with php4 loaded (replacing php5_module and libphp5.so with 4),
when trying to use gallery2 or coppermine, I get
Error: your PHP __FILE__ directive is not functioning correctly.
Please file a support request with your webserver administrator or in
the Gallery forums.

Any suggestions?

Share: 

 

3 Answers Found

 
Answer #1    Answered By: James Williams     Answered On: Sep 04

In your php  page. do you have this at the top

<?php

?>
and this on the bottom,

unless your using include

 
Answer #2    Answered By: Albert Ellis     Answered On: Sep 04

Yes. This is with every php  page.

info.php consists of
<?php
phpinfo();
?>
Loads fine if I use php4, but in 5 it shows nothing.

 
Answer #3    Answered By: Dannon Jones     Answered On: Sep 04

Sounds like as much of problem with configuring the gallery software as
anything. I'd
probably open up all the gallery software and do a search thru all open docs for
the error
lines you copied below. Anyway, that error is coming from your software, not
PHP.

 
Didn't find what you were looking for? Find more on Issue php files are displayed as text Or get search suggestion and latest updates.




Tagged: