Free Web Hosting Forum
(#1 (permalink))
Old
Junior Member
blueniledesign is on a distinguished road
 
Posts: 2
Join Date: Jun 2012
Question New and uploading the html - 06-28-2012, 06:31 PM

Hello all
I'm trying to upload my html i did upload it to public folder nut when i ope my website that i create it i got this msg:

"PHP Error Message
Parse error: syntax error, unexpected T_STRING in /home/a4577649/public_html/index.html on line 1"

my website was working fine with other web host but i don't know what went wrong ?

any suggestions
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
d3iti's Avatar
Super Moderator
d3iti is on a distinguished road
 
Posts: 6,515
Join Date: Jul 2009
Location: Spain
Default 06-28-2012, 08:35 PM

Are you using iweb to create your website?
One possible solution is to do a file (if not already exist) called .htaccess and include in this file the following code:
Code:
php_flag short_open_tag off


Recuerda realizar copias de seguridad de tus sitios web. Si este mensaje te ayudó puedes pulsar sobre el botón karma
Reply With Quote
(#3 (permalink))
Old
Junior Member
blueniledesign is on a distinguished road
 
Posts: 2
Join Date: Jun 2012
Question 06-29-2012, 05:38 PM

@d3iti
No i dont use iweb....im using komodo editor!!!
if i wana create that file the extension will be as you mentioned
Reply With Quote
(#4 (permalink))
Old
d3iti's Avatar
Super Moderator
d3iti is on a distinguished road
 
Posts: 6,515
Join Date: Jul 2009
Location: Spain
Default 06-30-2012, 12:04 PM

Hello,

The problem is due to use of the <? to delineate different code to PHP

The modification to the previous file configures your web site to not accept short tags (<?) to delimit PHP code.

Because of this, to include PHP scripts on your pages must use the long tag (<?php) instead of the short tag (<?)


Recuerda realizar copias de seguridad de tus sitios web. Si este mensaje te ayudó puedes pulsar sobre el botón karma
Reply With Quote
(#5 (permalink))
Old
Junior Member
wildBill is on a distinguished road
 
Posts: 1
Join Date: Jul 2012
Default 07-04-2012, 06:31 PM

Thanks for the post. This was exactly my problem. I'm using iWeb. Put in the code suggested in the file .htaccess and works like a charm.
Reply With Quote
(#6 (permalink))
Old
Bad Karma[CORE]'s Avatar
333 - only half evil
Bad Karma[CORE] is on a distinguished road
 
Posts: 6,476
Join Date: May 2008
Default 07-04-2012, 07:08 PM

Quote:
Originally Posted by blueniledesign View Post
@d3iti
No i dont use iweb....im using komodo editor!!!
if i wana create that file the extension will be as you mentioned
FYI:
The line in question is not only added by iWeb but can be added by other website editors too. So it is definitely worth checking the source code for that line
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com