Connecting Tech Pros Worldwide Help | Site Map

including a PHP file displays the file's content to the user agent (PHP 5.1)

 
LinkBack Thread Tools Search this Thread
  #1  
Old October 17th, 2006, 10:15 AM
Cyberwolf
Guest
 
Posts: n/a
Default including a PHP file displays the file's content to the user agent (PHP 5.1)

Hi all

I'm having a strange problem when upgrading the content management
system eZ publish from PHP 4.4 to PHP 5.1. Some cache files related to
i18n are included with the "include" function, but they are being
displayed to the user agent instead of being parsed by PHP. With PHP
4.4 there was no problem.

You can download a test script from:
http://blog.kristofcoomans.be/wp-con...loads/test.tar

Thanks for your help

Cheers

--

Kristof


  #2  
Old October 17th, 2006, 05:15 PM
Daz
Guest
 
Posts: n/a
Default Re: including a PHP file displays the file's content to the user agent (PHP 5.1)


Cyberwolf wrote:
Quote:
Hi all
>
I'm having a strange problem when upgrading the content management
system eZ publish from PHP 4.4 to PHP 5.1. Some cache files related to
i18n are included with the "include" function, but they are being
displayed to the user agent instead of being parsed by PHP. With PHP
4.4 there was no problem.
>
You can download a test script from:
http://blog.kristofcoomans.be/wp-con...loads/test.tar
>
Thanks for your help
>
Cheers
>
--
>
Kristof
Do any other php pages parse properly? If not, then it will most likely
be a problem with your install and/or configuration. If you can parse
some php pages, it might be worth checking your PHP 5 configuration,
and then Apache's configuration if nothing jumps out at you in there.

Is there any particular reason you chose to go with PHP 5? I have heard
of lots of people having problems with it, which is why I stay away
from it. Well, until I understand it a bit better anyway...

Would it not be appropriate to just stick with PHP 4?

It might also be worth checking that the correct modules have been
added to Apache's enabled-modules folder. After which you would need to
restart Apache for the change to take effect if you haven't done so
already.

All the best.

Daz

  #3  
Old October 20th, 2006, 11:15 AM
Cyberwolf
Guest
 
Posts: n/a
Default Re: including a PHP file displays the file's content to the user agent (PHP 5.1)


Daz wrote:
Quote:
Cyberwolf wrote:
Quote:
Hi all

I'm having a strange problem when upgrading the content management
system eZ publish from PHP 4.4 to PHP 5.1. Some cache files related to
i18n are included with the "include" function, but they are being
displayed to the user agent instead of being parsed by PHP. With PHP
4.4 there was no problem.

You can download a test script from:
http://blog.kristofcoomans.be/wp-con...loads/test.tar

Thanks for your help

Cheers

--

Kristof
>
Do any other php pages parse properly? If not, then it will most likely
be a problem with your install and/or configuration. If you can parse
some php pages, it might be worth checking your PHP 5 configuration,
and then Apache's configuration if nothing jumps out at you in there.
>
Everything else works fine.
Quote:
>
Is there any particular reason you chose to go with PHP 5? I have heard
of lots of people having problems with it, which is why I stay away
from it. Well, until I understand it a bit better anyway...
>
Would it not be appropriate to just stick with PHP 4?
>
A discussion about that goes beyond the scope of my question :-)
Quote:
>
It might also be worth checking that the correct modules have been
added to Apache's enabled-modules folder. After which you would need to
restart Apache for the change to take effect if you haven't done so
already.
>
Thanks for your answer, but I'm quite familiar with PHP so it didn't
really bring me any closer to a solution.

A PHP guru please who can explain me what has changed between PHP 4 and
5 to make the file not being parsed as PHP anymore?

  #4  
Old October 20th, 2006, 02:45 PM
Rik
Guest
 
Posts: n/a
Default Re: including a PHP file displays the file's content to the user agent (PHP 5.1)

Cyberwolf wrote:
Quote:
A PHP guru please who can explain me what has changed between PHP 4
and 5 to make the file not being parsed as PHP anymore?
Even though I usually have no problem opening UTF-8 files, the file seems
corrupt here...

--
Rik Wasmus


  #5  
Old October 23rd, 2006, 01:05 PM
Cyberwolf
Guest
 
Posts: n/a
Default Re: including a PHP file displays the file's content to the user agent (PHP 5.1)


Rik wrote:
Quote:
>
Even though I usually have no problem opening UTF-8 files, the file seems
corrupt here...
>
Can you confirm that it parses well with PHP 4?

  #6  
Old October 23rd, 2006, 04:45 PM
Rik
Guest
 
Posts: n/a
Default Re: including a PHP file displays the file's content to the user agent (PHP 5.1)

Cyberwolf wrote:
Quote:
Rik wrote:
Quote:
>>
>Even though I usually have no problem opening UTF-8 files, the file
>seems corrupt here...
>>
>
Can you confirm that it parses well with PHP 4?
I can deny it....
Both PHP4 AND PHP5 parse the file, (I can print_r($data)), but the
character encoding is incorrect.

Grtz,
--
Rik Wasmus


  #7  
Old October 25th, 2006, 09:35 AM
Cyberwolf
Guest
 
Posts: n/a
Default Re: including a PHP file displays the file's content to the user agent (PHP 5.1)

Rik wrote:
Quote:
Cyberwolf wrote:
Quote:
Rik wrote:
Quote:
>
Even though I usually have no problem opening UTF-8 files, the file
seems corrupt here...
>
Can you confirm that it parses well with PHP 4?
>
I can deny it....
Both PHP4 AND PHP5 parse the file, (I can print_r($data)), but the
character encoding is incorrect.
>
I'm using Suse 10.1/PHP 5.1.2.

A manually compiled version of PHP 5.1.6 on the same machine seems to
work well, so I guess it's a bug in PHP that has been fixed now or it
is a Suse-specific issue.

Cheers

Kristof

  #8  
Old October 27th, 2006, 11:55 AM
Cyberwolf
Guest
 
Posts: n/a
Default Re: including a PHP file displays the file's content to the user agent (PHP 5.1)

Cyberwolf wrote:
Quote:
Rik wrote:
Quote:
Cyberwolf wrote:
Quote:
Rik wrote:
>>
>Even though I usually have no problem opening UTF-8 files, the file
>seems corrupt here...
>>
>
Can you confirm that it parses well with PHP 4?
I can deny it....
Both PHP4 AND PHP5 parse the file, (I can print_r($data)), but the
character encoding is incorrect.
>
I'm using Suse 10.1/PHP 5.1.2.
>
A manually compiled version of PHP 5.1.6 on the same machine seems to
work well, so I guess it's a bug in PHP that has been fixed now or it
is a Suse-specific issue.
>
I found what caused the problems I had. It happens when PHP is compiled
with --enable-zend-multibyte and the mbstring extension is enabled.

Cheers

Kristof

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.