[FLOW3-general] PHP Parse error: syntax error, unexpected $end

Regine Rosewich regine.rosewich at hoellenberg.biz
Fri Mar 18 15:25:52 CET 2011


Hi folks,

I fought myself through the Model/Domain Classes necessary to run the blog
example. To save you the time to do this yourself (although you can learn a
lot about the doctrine 2 layer) here is the database schema - without any
warranty -.

-- phpMyAdmin SQL Dump
-- version 3.3.9.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Erstellungszeit: 18. März 2011 um 15:18
-- Server Version: 5.5.9
-- PHP-Version: 5.3.5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Datenbank: `flow3_beta1`
--
DROP DATABASE `flow3_beta1`;
CREATE DATABASE `flow3_beta1` DEFAULT CHARACTER SET utf8 COLLATE
utf8_general_ci;
USE `flow3_beta1`;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `account`
--

DROP TABLE IF EXISTS `account`;
CREATE TABLE IF NOT EXISTS `account` (
  `artificialId` int(11) NOT NULL AUTO_INCREMENT,
  `accountIdentifier` varchar(255) NOT NULL,
  `authenticationProviderName` varchar(100) NOT NULL,
  `credentialsSource` varchar(100) NOT NULL,
  `creationDate` datetime NOT NULL,
  `expirationDate` datetime NOT NULL,
  `roles` text NOT NULL,
  `party_id` int(11) NOT NULL,
  PRIMARY KEY (`artificialId`),
  UNIQUE KEY `accountIdentifier`
(`accountIdentifier`,`authenticationProviderName`),
  KEY `party_id` (`party_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Daten für Tabelle `account`
--


-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `blog`
--

DROP TABLE IF EXISTS `blog`;
CREATE TABLE IF NOT EXISTS `blog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(80) NOT NULL,
  `description` varchar(150) NOT NULL,
  `blurb` text NOT NULL,
  `twitterUsername` varchar(80) NOT NULL,
  `authorPicture_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `authorPicture_id` (`authorPicture_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Daten für Tabelle `blog`
--


-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `category`
--

DROP TABLE IF EXISTS `category`;
CREATE TABLE IF NOT EXISTS `category` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(80) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Daten für Tabelle `category`
--


-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `comment`
--

DROP TABLE IF EXISTS `comment`;
CREATE TABLE IF NOT EXISTS `comment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` datetime NOT NULL,
  `post_id` int(11) NOT NULL,
  `author` varchar(80) NOT NULL,
  `emailAddress` varchar(100) NOT NULL,
  `content` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `post_id` (`post_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Daten für Tabelle `comment`
--


-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `electronicAddress`
--

DROP TABLE IF EXISTS `electronicAddress`;
CREATE TABLE IF NOT EXISTS `electronicAddress` (
  `artificialId` int(11) NOT NULL AUTO_INCREMENT,
  `identifier` varchar(255) NOT NULL,
  `type` varchar(20) NOT NULL,
  `usage` varchar(20) NOT NULL,
  `approved` tinyint(4) NOT NULL,
  PRIMARY KEY (`artificialId`),
  UNIQUE KEY `identifier` (`identifier`,`type`,`usage`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Daten für Tabelle `electronicAddress`
--


-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `image`
--

DROP TABLE IF EXISTS `image`;
CREATE TABLE IF NOT EXISTS `image` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) NOT NULL,
  `resource_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `resource_id` (`resource_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Daten für Tabelle `image`
--


-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `party`
--

DROP TABLE IF EXISTS `party`;
CREATE TABLE IF NOT EXISTS `party` (
  `artificialId` int(20) NOT NULL AUTO_INCREMENT,
  `party_id` int(11) NOT NULL,
  `electronicAddress_id` int(11) NOT NULL,
  `name_id` int(11) NOT NULL,
  PRIMARY KEY (`artificialId`),
  KEY `party_id` (`party_id`),
  KEY `electronicAddress_id` (`electronicAddress_id`),
  KEY `name_id` (`name_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Daten für Tabelle `party`
--


-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `personName`
--

DROP TABLE IF EXISTS `personName`;
CREATE TABLE IF NOT EXISTS `personName` (
  `artificialId` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(60) NOT NULL,
  `firstName` varchar(100) NOT NULL,
  `middleName` varchar(100) NOT NULL,
  `lastName` varchar(100) NOT NULL,
  `otherName` varchar(100) NOT NULL,
  `alias` varchar(100) NOT NULL,
  `fullName` varchar(500) NOT NULL,
  `party_id` int(11) NOT NULL,
  PRIMARY KEY (`artificialId`),
  KEY `party_id` (`party_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Daten für Tabelle `personName`
--


-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `post`
--

DROP TABLE IF EXISTS `post`;
CREATE TABLE IF NOT EXISTS `post` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `blog_id` int(11) NOT NULL,
  `title` varchar(100) NOT NULL,
  `linkTitle` varchar(100) NOT NULL,
  `date` datetime NOT NULL,
  `author` varchar(50) NOT NULL,
  `content` text NOT NULL,
  `image_id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `blog_id` (`blog_id`),
  KEY `category_id` (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Daten für Tabelle `post`
--


-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `posts_tags`
--

DROP TABLE IF EXISTS `posts_tags`;
CREATE TABLE IF NOT EXISTS `posts_tags` (
  `post_id` int(11) NOT NULL,
  `tag_id` int(11) NOT NULL,
  PRIMARY KEY (`post_id`,`tag_id`),
  KEY `tag_id` (`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Daten für Tabelle `posts_tags`
--


-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `related_posts`
--

DROP TABLE IF EXISTS `related_posts`;
CREATE TABLE IF NOT EXISTS `related_posts` (
  `post_id` int(11) NOT NULL,
  `related_id` int(11) NOT NULL,
  PRIMARY KEY (`post_id`,`related_id`),
  KEY `related_id` (`related_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Daten für Tabelle `related_posts`
--


-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `resource`
--

DROP TABLE IF EXISTS `resource`;
CREATE TABLE IF NOT EXISTS `resource` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `resourcePointer_id` int(11) NOT NULL,
  `publishingConfiguration` text NOT NULL,
  `filename` varchar(100) NOT NULL,
  `fileExtension` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `resourcePointer_id`
(`resourcePointer_id`,`filename`,`fileExtension`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Daten für Tabelle `resource`
--


-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `resourcePointer`
--

DROP TABLE IF EXISTS `resourcePointer`;
CREATE TABLE IF NOT EXISTS `resourcePointer` (
  `hash` int(11) NOT NULL,
  PRIMARY KEY (`hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Daten für Tabelle `resourcePointer`
--


-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `tag`
--

DROP TABLE IF EXISTS `tag`;
CREATE TABLE IF NOT EXISTS `tag` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Daten für Tabelle `tag`
--


--
-- Constraints der exportierten Tabellen
--

--
-- Constraints der Tabelle `account`
--
ALTER TABLE `account`
  ADD CONSTRAINT `account_ibfk_1` FOREIGN KEY (`party_id`) REFERENCES
`party` (`artificialId`);

--
-- Constraints der Tabelle `blog`
--
ALTER TABLE `blog`
  ADD CONSTRAINT `blog_ibfk_1` FOREIGN KEY (`authorPicture_id`) REFERENCES
`resource` (`id`);

--
-- Constraints der Tabelle `comment`
--
ALTER TABLE `comment`
  ADD CONSTRAINT `comment_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `post`
(`id`);

--
-- Constraints der Tabelle `image`
--
ALTER TABLE `image`
  ADD CONSTRAINT `image_ibfk_1` FOREIGN KEY (`resource_id`) REFERENCES
`resource` (`id`);

--
-- Constraints der Tabelle `party`
--
ALTER TABLE `party`
  ADD CONSTRAINT `party_ibfk_3` FOREIGN KEY (`name_id`) REFERENCES
`personName` (`artificialId`),
  ADD CONSTRAINT `party_ibfk_1` FOREIGN KEY (`party_id`) REFERENCES `party`
(`artificialId`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `party_ibfk_2` FOREIGN KEY (`electronicAddress_id`)
REFERENCES `electronicAddress` (`artificialId`);

--
-- Constraints der Tabelle `personName`
--
ALTER TABLE `personName`
  ADD CONSTRAINT `personname_ibfk_2` FOREIGN KEY (`party_id`) REFERENCES
`party` (`artificialId`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints der Tabelle `post`
--
ALTER TABLE `post`
  ADD CONSTRAINT `post_ibfk_3` FOREIGN KEY (`category_id`) REFERENCES
`category` (`id`),
  ADD CONSTRAINT `post_ibfk_1` FOREIGN KEY (`blog_id`) REFERENCES `blog`
(`id`),
  ADD CONSTRAINT `post_ibfk_2` FOREIGN KEY (`blog_id`) REFERENCES `blog`
(`id`);

--
-- Constraints der Tabelle `posts_tags`
--
ALTER TABLE `posts_tags`
  ADD CONSTRAINT `posts_tags_ibfk_2` FOREIGN KEY (`tag_id`) REFERENCES `tag`
(`id`),
  ADD CONSTRAINT `posts_tags_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES
`post` (`id`);

--
-- Constraints der Tabelle `related_posts`
--
ALTER TABLE `related_posts`
  ADD CONSTRAINT `related_posts_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES
`post` (`id`),
  ADD CONSTRAINT `related_posts_ibfk_2` FOREIGN KEY (`related_id`)
REFERENCES `post` (`id`),

--
-- Constraints der Tabelle `resource`
--
ALTER TABLE `resource`
  ADD CONSTRAINT `resource_ibfk_1` FOREIGN KEY (`resourcePointer_id`)
REFERENCES `resourcePointer` (`hash`);


Hope it helps.


-----Ursprüngliche Nachricht-----
Von: flow3-general-bounces at lists.typo3.org
[mailto:flow3-general-bounces at lists.typo3.org] Im Auftrag von Marcus
'biesior' Biesioroff
Gesendet: Freitag, 18. März 2011 15:03
An: flow3-general at lists.typo3.org
Betreff: [FLOW3-general] PHP Parse error: syntax error, unexpected $end

ellou' List!

I can confirm Regine's problem with files generated by compiler
http://forge.typo3.org/issues/13796

What happens:
'./flow3 compile' command creates perfectly valid files, but without PHP 
closing tag ?> (which is valid as well). Omitting closing tag is the 
reason... but... I've no idea why...

I used regexp search & replace function of my IDE to insert the tag and 
after that operation it ran, I think that's fastest way to fix it is 
change compiler behaviour to insert this tag by default...

However I'm wondering why it doesn't work as omitting closing tag is 
fully allowed and even preferred way to ending the scripts, maybe 
something about php.ini ? any ideas?




-- 
Marcus 'biesior' Biesioroff
http://www.typo3.pl | TYPO3 Polish Community
T3CI
_______________________________________________
FLOW3-general mailing list
FLOW3-general at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general




More information about the FLOW3-general mailing list