Forum Moderators: coopster

Message Too Old, No Replies

problem upgrading from php 4 to 5,? coming up in html

         

scratch

6:56 pm on May 5, 2006 (gmt 0)

10+ Year Member



I have a site i have been developing for years now, in php 4. I am using Xampp which makes it easy to switch between 4 and 5 on the server, and i've been trying to make my code work in both version 4 and 5 at the same time.

Well i got most of the parse errors gone, i had functions with the same name as what they now have in 5, and array_merge and foreach seem like they need (array) casts. Seems like everything is working.

But there is a lot of? marks showing up in my html (thousands of em), they are in the source before the <!DOCTYPE> which i start my html with. Reverting back to php 4 fixes problem.

Anyone have this happen to them or an idea at what area i should look at.... Would like to get my code compatible with php 5.

vincevincevince

1:37 am on May 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The? sound like they might be caused by the encoding type you program in not matching that of the output.

Check the server headers and the page HTML headers for encoding type - compare the encoding settings of php 5 with your php 4 installation in php.ini.

Try switching the encoding display in your browser to a few other common encodings (Unicode UTF-8, ISO-8859-1, etc.) and see if they disappear.

If that fails - try to determine if the characters ARE question-marks - do this by pulling the page using something like wget which won't 'adjust' the download and opening it in a hex-editor or similar which will show the actual characters involved.