GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 

GenoPro Support Forum




Parse error, when publishing on a site with PHP parsing enabled

Click to view RSS...
Author
Posted Sunday, November 5, 2006 - Post #14249
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Important Contributors
Customers
GenoPro version: 2.5.4.0

Last Login: Tuesday, November 14, 2017
Posts: 193, Visits: 4,268
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 Smile

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



Feri


Edited: Sunday, November 5, 2006 by fbukolyi
Posted Wednesday, November 8, 2006 - Post #14300
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: Yesterday @ 11:49 PM
Posts: 3,346, Visits: 25,636
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"
Posted Wednesday, November 8, 2006 - Post #14307
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Important Contributors
Customers
GenoPro version: 2.5.4.0

Last Login: Tuesday, November 14, 2017
Posts: 193, Visits: 4,268
The behaviour of the php parser is depending on a settings of php.ini (which is set by the sysadmin Sad ) 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
Posted Thursday, November 9, 2006 - Post #14314
Forum Master

Forum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum Master

Gamma
Moderators
Administrators
FamilyTrees.GenoPro.com
Customers
GenoPro version: 3.1.0.0

Last Login: Wednesday, October 7, 2020
Posts: 952, Visits: 10,075
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.

Posted Thursday, November 9, 2006 - Post #14317
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Important Contributors
Customers
GenoPro version: 2.5.4.0

Last Login: Tuesday, November 14, 2017
Posts: 193, Visits: 4,268
Jean-Claude, I would not like to generate any php Smile

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 BigGrin



Feri
Posted Thursday, November 9, 2006 - Post #14318
Forum Master

Forum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum Master

Gamma
Moderators
Administrators
FamilyTrees.GenoPro.com
Customers
GenoPro version: 3.1.0.0

Last Login: Wednesday, October 7, 2020
Posts: 952, Visits: 10,075
The master skin won't be changed for sure, however you are welcome to customize your own report skin.

Edited: Sunday, November 12, 2006 by GenoProSupport
Posted Saturday, February 28, 2009 - Post #23709
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Customers
GenoPro version: 3.0.0.9

Last Login: Sunday, May 10, 2020
Posts: 4, Visits: 15
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


Edited: Saturday, February 28, 2009 by PavelM
Posted Saturday, February 28, 2009 - Post #23710
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: Yesterday @ 11:49 PM
Posts: 3,346, Visits: 25,636
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. Smile

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"


Edited: Saturday, February 28, 2009 by Ron
Posted Friday, July 9, 2010 - Post #26143
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Forum Members

Last Login: Monday, September 6, 2010
Posts: 1, Visits: 45
I had the same issue as documented above with a PHP parsing enabled site. I did manage to follow the instructions above and all worked well. So far, all functions on my site work except for displaying the Genomap. Whenever I hit the "tree" to display the genomap, I get a parsing error as follows:

XML Parsing Error: not well-formed
Location: http://www.familytree.vacau.com/ArbreFamille/genomaps/genomap0.svg
Line Number 13, Column 8:

I actually tried to get around this error by removing that section in the genomap0.svg file but then I hit another similar error down the file.

Anyone have the same problem and have a workaround? I tried to look around for a non-PHP free host site and it's not an easy task. Smile
Any help would be appreciated. Keep in mind I'm not a programmer and most of this is foreign to me but I do manage to figure my way around things with instructions...most of the time.


Similar Topics

Click to view RSS...
Expand / Collapse

Reading This Topic

Expand / Collapse