Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

amyweitron

macrumors newbie
Original poster
Oct 15, 2006
15
0
:eek: I keep getting this error message when I visit the iWeb site I have uploaded through Web Echo:

Parse error: parse error, unexpected T_STRING in /home3/weitron/weitron-www/index.html on line 1

What does it mean? Can anyone help? I appreciate it greatly!
 
php

It was made on iWeb for an outside domain, www.weitron.com.

I published the iWeb site to a folder. It generated an index.html and I put that on the server as well. Perhaps it's not meant to be in there?

the host name is host21.apollohosting.com
 
If its not .Mac, its probably a MySQL/PHP error. If it is .Mac, Im stumped. Try checking your code (on line 1 :p). Infact, could you post the code here in CODE tags?
Code:
This is a code tag example.
 
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta http-equiv="refresh" content="0;url= www.weitron.com/Home.html" /></head><body></body></html>
 
Code:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta http-equiv="refresh" content="0;url= www.weitron.com/Home.html" /></head><body></body></html>
 
The host most likely has PHP configured to parse all files as PHP, even the .html files.

the
Code:
<?xml....
is causing PHP to croak since
Code:
<?
is the short hand way of starting a PHP block.

either ask the host to disable PHP short tags or remove the
Code:
<?xml
tag.

I had a similar problem when I was setting up my development server and had that <?xml tag in my code. I just disabled short tags.
 
tomorrow morning i will contact my host and report back.

again, thanks so much!
 
I contacted my host's tech support and he said he turned off the PHP short tags...but same error occurs.

What do I delete from the code if I want to delete the tag?
 
Try clearing your cache in your browser and see if the error still occurs.

Otherwise
Code:
<?xml version="1.0" encoding="UTF-8"?>
at the beginning of the code should resolve the issue if you remove it.
 
Hopefully they didn't turn it off serverwide... :eek:
Might have some irritated folks.


Code:
<?xml version="1.0" encoding="UTF-8"?>

Just take that out. You're not sending xml code, so there isn't a reason to have it in there at all.
 
Now I get a 404 Not Found error. Requested URL not found on this server.

he said he turned it off within our bit or something...eep hope i haven't brought things crumbling down.
 
the original error says the problem is in

/home3/weitron/weitron-www/index.html on line 1

but i think it ought to be /home/, not /home3/. weird?
 
Code:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta http-equiv="refresh" content="0;url= www.weitron.com/Home.html" /></head><body></body></html>
 
no leave it as /home3/ as that has something to do with your host.

Change your META refresh to not have the www.wietron.com bit in it

Then on all your other pages remove that <?xml bit as it appears as if all your pages will have that issue.
 
okay now the last part looks like this:

Code:
</title><meta http-equiv="refresh" content="0;url=" /></head><body></body></html>

i will go to each .html page and remove that first <?xml tag.
 
okay so it looks like there are some formatting issues to deal with...but at least the face of the site is finally Effing up.
 
Is it really fixed? I am still getting the:

Code:
Parse error: parse error, unexpected T_STRING in /home3/weitron/weitron-www/index.html on line 1


Error.

??

Kevin
 
Yeah i deleted all the bad tags manually, but now I'm updating it, so all the bad tags are back. But at least now I know how to get the site to show up.

iWeb is so not one-click. Not even like, 20-click.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.