Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Resolved Question

PHP Script 5.2.14 and 5.2.17

Dec 28, 2011 6:26AM PST

Dear reader,

I have a problem, and really dont know the little problem. I have transfered a website i made, from a free hoste to a paid host.

Here is the problem. My php script code gives a error on the contact page. Well it shows the php code and doesnt work.
I didnt had this problem on the free hoste.
The difference is the php version.
free host: 5.2.17
paid host: 5.2.14

now i want to know if this really is the problem?
For more info just ask
Both webpages are exactly the same.

The websites
free host: http://www.folkert.goodluckwith.us/contact.html
paid host: http://folkert.eu/webtechniek/contact.html

Thank you for your help Happy

Discussion is locked

noobiegamer has chosen the best answer to their question. View answer

Best Answer

- Collapse -
Close
Jan 10, 2012 9:27PM PST

I place a lock on this. I have more problems with the host.
And i move my webpage to another host.

Thanks for help everyone

- Collapse -
Answer
Two things to check
Dec 28, 2011 11:47PM PST

Are both the contact.html files, the one on the paid and free host, completely identical?

Is your code surrounded by <?php and ?> brackets?

~Sovereign

- Collapse -
Checked
Dec 31, 2011 1:01AM PST

Thanks for your reply, but this isnt solving the problem.
I checked the html and php scripts and they are identical.
Also i added the <?php but i still have the problem

- Collapse -
Answer
Check this out
Dec 30, 2011 4:30AM PST

This is at the top of the page on the paid host contact.html file

<?
////////////////////////////////////////////////
//////// www.sitemasters.be ////////////////////
//////// Door Tuinstoel ////////////////////////
//////// Een eenvoudig mailformuliertje ////////
////////////////////////////////////////////////

ob_start(); // Voor het cookie setten, anders zal dat hoogst waarschijnlijk niet werken.
$cNaam = 'Folkert Joosse'; // Je naam...
$cEmail = 'folkert.joosse@student.hu.nl'; // email waar het heen moet
$cOndPre = 'Emailtje -'; // prefix voor onderwerp
$cOndSuf = '- van mij'; // suffix achter onderwerp
$cSpam = 10; // Anti Spam, X aantal minuten
?>

It's missing the php part.. Change the first <? to <?php

- Collapse -
Checked
Dec 31, 2011 1:02AM PST

Thanks for your reply.
But this isnt solvind my problem. I added the <?php. but i still have the problem

- Collapse -
Try this
Jan 4, 2012 5:05AM PST

Open notepad and paste the following into it:

<?php phpinfo(); ?>

then save the file as info.php

Now upload the file to your paid host and visit it. What does it display?

~Sovereign

- Collapse -
reply :D
Jan 8, 2012 5:49AM PST

It gives a long page with a lot of information xD

look here

But i'm soon changing to another host... i have more problems with it

- Collapse -
Now you know
Jan 9, 2012 5:12AM PST

that PHP is most definitely working.

I just noticed that your file extensions are .html and you can't use PHP code in HTML files. Resave your file with a .php extension and then try to visit it.

~Sovereign

- Collapse -
PHP
Feb 15, 2012 12:16AM PST

thanks