468,248 Members | 1,490 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,248 developers. It's quick & easy.

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

Oct 17 '06 #1
7 1280
Daz

Cyberwolf wrote:
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

Oct 17 '06 #2

Daz wrote:
Cyberwolf wrote:
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.
>
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 :-)
>
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?

Oct 20 '06 #3
Rik
Cyberwolf wrote:
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
Oct 20 '06 #4

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?

Oct 23 '06 #5
Rik
Cyberwolf wrote:
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.

Grtz,
--
Rik Wasmus
Oct 23 '06 #6
Rik wrote:
Cyberwolf wrote:
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.

Cheers

Kristof

Oct 25 '06 #7
Cyberwolf wrote:
Rik wrote:
Cyberwolf wrote:
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

Oct 27 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Pedro Fonseca | last post: by
5 posts views Thread by guischarf | last post: by
13 posts views Thread by raykyoto | last post: by
5 posts views Thread by Tim Mulholland | last post: by
3 posts views Thread by Allerdyce.John | last post: by
2 posts views Thread by quicklearner | last post: by
3 posts views Thread by andersond | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.