Parse error, when publishing on a site with PHP parsing enabled
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 
GenoPro Support Forum
Home        Members    Who's On
Welcome Guest ( Login | Register )
        



Parse error, when publishing on a site with PHP parsing enabled Expand / Collapse
Author
Message
Post #14249 Posted 11/6/2006 3:01:48 AM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru This user is an important contributor to the GenoPro community 

Group: Customers
Last Login: 11/4/2009 6:41:47 AM
GenoPro Version: 2.0.1.6
Posts: 199, Visits: 2,982
When publishing to a site with php parsing enabled the following error appears:
Parse error: parse error, unexpected T_STRING in home/b/bukolyi/public_html/csaladfa/home.htm on line 1

this is for several .htms.

The cause is in the first line:< ?xml version="1.0" encoding="utf-8"?>, as by default, php as configured by MAMP enables short tag support - so php is trying to interpret everything between < ? ?>.

However, if this line is replaced by < ?php echo '< ?xml version="1.0" encoding="UTF-8"?>';?> - or delete the line itself - the site is OK.

However, I do not know, what is the side effect if this change will be done globally

Note: originally there is no space between < and ? (I had to put one or the forum hides the whole )



Feri
Post #14300 Posted 11/8/2006 7:24:20 PM


Grand Master

Grand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand Master This user is a contributor to FamilyTrees.GenoPro.com This user is an important contributor to the GenoPro community 

Group: Customers
Last Login: Today @ 4:04:00 PM
GenoPro Version: 2.0.1.6
Posts: 1,328, Visits: 6,569
The xml declaration is not strictly necessary when the encoding is UTF-8 or UTF-16 but it is recommended that is used.

So yes you can remove it from all .htms. It is a pity that the php parser doesn't recognise this line for what it is.


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Post #14307 Posted 11/9/2006 1:27:51 AM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru This user is an important contributor to the GenoPro community 

Group: Customers
Last Login: 11/4/2009 6:41:47 AM
GenoPro Version: 2.0.1.6
Posts: 199, Visits: 2,982
The behaviour of the php parser is depending on a settings of php.ini (which is set by the sysadmin :( ) For more info see http://hashphp.org/knowledge_base?kb_id=12

My question is: what if you make the replacement (not the deletion of the line) in the original report(s)?

Thanks

Feri



Feri
Post #14314 Posted 11/9/2006 8:21:21 AM


IT Director GenoPro

IT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoPro  

Group: Customers
Last Login: 10/27/2009 1:00:39 PM
GenoPro Version: 2.4.0.3
Posts: 466, Visits: 6,090
fbukolyi (11/9/2006)
what if you make the replacement (not the deletion of the line) in the original report(s)?

The report generator can generate anything, from JavaScript, SVG and CSS.

You can modify the skin to generate PHP if you wish, there is no restriction at this.


If the facts don't fit the theory, change the facts.
-- Albert Einstein

Jean-Claude Morin
Information Technology Director, GenoPro.
http://www.genopro.com

Post #14317 Posted 11/9/2006 9:59:24 AM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru This user is an important contributor to the GenoPro community 

Group: Customers
Last Login: 11/4/2009 6:41:47 AM
GenoPro Version: 2.0.1.6
Posts: 199, Visits: 2,982
Jean-Claude, I would not like to generate any php

The question is:

is it possible to replace the original < ?xml version="1.0" encoding="utf-8"?> lines in the built in reports to < ?php echo '< ?xml version="1.0" encoding="UTF-8"?>';?> ?

In this case the upload of the abovementioned sites will also work - the question is the side effect (if it has any).

If not possible, I can live without it (in this case I need to make a copy of the reports I would like to use on such sites, make the replacement and that's it)

If I am the only one, who is using such a host it makes no sense to modify GenoPro :D



Feri
Post #14318 Posted 11/9/2006 10:26:12 AM


IT Director GenoPro

IT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoPro  

Group: Customers
Last Login: 10/27/2009 1:00:39 PM
GenoPro Version: 2.4.0.3
Posts: 466, Visits: 6,090
The master skin won't be changed for sure, however you are welcome to customize your own report skin.


If the facts don't fit the theory, change the facts.
-- Albert Einstein

Jean-Claude Morin
Information Technology Director, GenoPro.
http://www.genopro.com

Post #23709 Posted 2/28/2009 11:47:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Customers
Last Login: 3/3/2009 1:56:27 PM
GenoPro Version: 2.b15c
Posts: 4, Visits: 13
JcMorin (11/9/2006)
The master skin won't be changed for sure, however you are welcome to customize your own report skin.


Hi Jean-Claude,

I also get that php error on awardspace web hosting and would like to replace the original < ?xml version="1.0" encoding="utf-8"?> lines to < ?php echo '< ?xml version="1.0" encoding="UTF-8"?>';?> in html files when generating report.

Doing it manually is not an option since there are 370 html files in my report.

If I understand you correctly automatic replacement can be done by customizing a report skin. Could you mention exact steps? I tried to replace it in home.htm but it didn't help.

Thanks,
Pavel May
Post #23710 Posted 2/28/2009 1:40:38 PM


Grand Master

Grand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand Master This user is a contributor to FamilyTrees.GenoPro.com This user is an important contributor to the GenoPro community 

Group: Customers
Last Login: Today @ 4:04:00 PM
GenoPro Version: 2.0.1.6
Posts: 1,328, Visits: 6,569
Hi Pavel,


Try this way:

1. Download and install a copy the the free PsPad editor.
2. Create a new 'Customised English Narrative Report' skin
3. Run up PsPad and chose the menu item Search / Search / Replace in Files... and search for
<?xml version="1.0" encoding="utf-8"?>
and replace with
<?php echo '<?xml version="1.0" encoding="utf-8"?>';?>
chosing your new skin folder and checking the sub folders box. Enter *.htm;*.svg as file mask. Select UTF-8 as the filkes code page.

4. Click OK! This should change 30 files in the current skin version.

5. Now generate your report with this custom skin.


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: GenoProSupport, JcMorin, Ron

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 8:29 PM

Copyright 1998-2009 GenoPro. All rights reserved. GenoPro and the GenoPro logo are trademarks.