Corruption of PHP statement...

Hi.

I have been writing PHP for 6 years now and never had a problem until now.

My company has switched hosting providers to 1and1 where my problem starts and ends.

Any PHP line fails to terminate.

EG: Take this example file…

/////////// START ///////////////////

<?php session_start(); ?> TEST PAGE HTML - Hello World from Test.php
<?php echo "PHP - Hello World from Test.php"; ?>

/////////// END ///////////////////

On all the the servers in our company, the output is as follows:

HTML - Hello World from Test.php
PHP - Hello World from Test.php

On the 1&1 server the output is:

HTML - Hello World from Test.php
PHP - Hello World from Test.php
"; ?>

They say they can’t help as they do not have any php knowledge.

Can this error occur as a result of version mismatches?

Any help would be much appreciated, before I lose my job :frowning:

Hi there,

Very strange, I have to say. Out of interest what does it do if you use single quotes (’) and/or html entities for the tags.

Have you tried phpinfo() to see what version it is?

hmm, this is a wierd one, id say thats definitely a problem! Have you checked your php.ini against your previous one to see if there is anything obvious thats changed?

One of 1&1’s many quirks is that php 5 files will only run properly if you add the 5 to the filename, so myfile.php5, give that a go.

If this is the case then you can use .htaccess as a fix for this.

Failing that I would switch hosts, 1&1 dont have the best rep as it is…

Contact me for some good business vps hosting deals :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service