473,396 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1435
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: mike | last post by:
ok here's the problem: I have a page that displays a form for user to select individual fields and to specify their own criteria which is used to query a database and then create an excel...
2
by: Pedro Fonseca | last post by:
Greetings! In my PHP website I'm trying to raise a File Download dialog directly in a WindowsCE IE client with the following code: header( "Content-Type: application/octet-stream\n" );...
2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
5
by: guischarf | last post by:
I have the following code on files "a.php" and "b.php" ----------------------------- FILE a.php ----------------------------- <form action="a.php" method="post"> <input type="hidden"...
13
by: raykyoto | last post by:
Hi all, I'm sure this is a popular question that comes up every few months here. Indeed, I've looked at some of the past postings, but I would like to ask things differently. Basically, I'm...
5
by: Tim Mulholland | last post by:
I am trying to create an ASPX page that, based on QueryString inputs, returns another file, in this case a WMA file. I do not want to do this by redirect, because these files are not available...
3
by: Allerdyce.John | last post by:
Hi, Is there an easy way in PHP which send outs different content depends on User Agent String value? If yes, is there an example/documentation? Thank you.
2
by: quicklearner | last post by:
hi I have made a CHM file and I have linked my .CHM file with the controls on the Form in my application which is made in C# 2005. Its working fine . But I want that if user presses 'F1' then when...
3
by: andersond | last post by:
I have a PHP file that usually sends an email. Instead, it now simply displays the code beginning with line 14 (where #eol= begins). Can anybody help me with this? <?php #Change only the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.