after install parse error

Having trouble installing serendipity?
mchinfa
Regular
Posts: 28
Joined: Tue May 08, 2007 4:26 pm
Contact:

after install parse error

Post by mchinfa »

Hello,
I've just install Serendipity 1.7.8 ZIP.
after admin installation I've this message.
on my server It's php version 5

Parse error: syntax error, unexpected T_NEW in (path)/include/compat.inc.php on line 119

Someone have an idea ?

I've installed for another website oldest version and all was ok but yet not....

Thanks
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: after install parse error

Post by Timbalu »

This sound like a wrong or buggy PHP version.
Which PHP 5.x.x is it exactly? And is it a MySQL version 5 too?

I remember someone else having had this kind of error too, with an early Serendipity 1.7. But the one had an additional error about mysql failing. We solved the problem by a REPAIR TABLE command via phpMyAdmin http://dev.mysql.com/doc/refman/5.1/en/ ... table.html and as far as I remember it was the serendipity_visitors table being corrupted.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
jultey
Regular
Posts: 12
Joined: Sun Aug 30, 2015 12:48 am

Re: after install parse error

Post by jultey »

Hello,
I am currently moving from V1.6.2 to V1.7 and I have the same message (Parse error: syntax error, unexpected T_NEW in /mnt/100/sda/3/a/jultey/blog/include/compat.inc.php on line 119).
I tried to update to V1.7.2 and I have the same message again.
I tried this command in my PhpMyAdmin consol : REPAIR TABLE serendipity_visitors but I have this result : Table 'jultey.serendipity_visitors' doesn't exist
Maybe it is not this table I have to repair ? But which one so ?
Do I have to continu to update my blog until V2.0.2 ? (hoping the message will be fix)

MySQL client version: 5.1.61

Thanks in advance for your help
jultey
Regular
Posts: 12
Joined: Sun Aug 30, 2015 12:48 am

Re: after install parse error

Post by jultey »

I tried a REPAIR on all tables on my database and I still have the same error message on my blog :(
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: after install parse error

Post by Timbalu »

Maybe you don't have a serendipity_vistors table, which is only there if you have used the statistik plugin before?! I assume you will need to find out which other table might need a repair. Please also check if your table PREFIX everwhere is really "serendipity_" and not something else.

To Update it is NOT needed to take every single version in line until last. You can ALWAYS jump right to the last current available version designed for your system. Say, if you use MySQL 5 for server and client and min PHP 5.3+ (better more up though) you can jump right into Serendipity 2.0.2.

But you need to fix the table issue first.
You could place a

Code: Select all

$serendipity['production'] = false;
temporary into the user area of your serendipity_config_local.inc.php file, to get a more verbose error message (perhaps).
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
jultey
Regular
Posts: 12
Joined: Sun Aug 30, 2015 12:48 am

Re: after install parse error

Post by jultey »

Hi,
Thanks Timbalu for your feedback,

I confirm I havn't the table serendipity_visitors or any table having "visitor" in its name (and never used the statistik plugin).
My prefix is "serendipity_" and anyway I tried to repair all tables of my database without result :(

Thanks for the information concerning the jump to the final version. I was not aware of that.

- So, when I was in V1.6.2 everything was nice.
- After update to V1.7 I had this message : (Parse error: syntax error, unexpected T_NEW in /mnt/100/sda/3/a/jultey/blog/include/compat.inc.php on line 119)
- After update to V1.7.2 I had the same message : (Parse error: syntax error, unexpected T_NEW in /mnt/100/sda/3/a/jultey/blog/include/compat.inc.php on line 119)
- So, I tried to downgrade to V1.6.2 and it worked fine.
- After I tried to jump in V2.0.2 as you indicated and I had this 2 messages : Warning: Wrong parameter count for session_set_cookie_params() in /mnt/100/sda/3/a/jultey/blog/serendipity_config.inc.php on line 15
Parse error: syntax error, unexpected T_NEW in /mnt/100/sda/3/a/jultey/blog/include/compat.inc.php on line 114

- So, I downgraded again to V1.6.2 and it worked fine again.
- After I upgraded in V1.7.0 and of course I still have the same message.

I added the verbose parameter ($serendipity['production'] = false;) and I had no more informations.
I also tried with $serendipity['production'] = 'debug'; and same thing... no more information.

Very strange...
jultey
Regular
Posts: 12
Joined: Sun Aug 30, 2015 12:48 am

Re: after install parse error

Post by jultey »

The error occurs here (in the else) cf. code below :

Code: Select all

if (!$serendipity['dbConn']) {
     echo '<p>' . $errStr . ' in ' . $errFile . ' on line ' . $errLine . '</p>';
} else {
     throw new ErrorException($errStr); // tracepath = all, if not ini_set('display_errors', 0);
}
In the file compat.inc.php (v1.6.2) I haven't any occurence of ErrorException and it works fine. In compat.inc.php (v1.7) this occurence generates the error and when I set it in comment this is the next occurence of ErrorException which generates the error.

It seems that this function Error Exception is the source of my issue...
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: after install parse error

Post by Timbalu »

Yes, that is why I wrote "take the last available version designed for your system".
And you need this too:
Timbalu wrote:MySQL 5 for server and client and min PHP 5.3+
you only showed the client version number and not the others. The difference between S9y 2.0x and S9y 1.7x is, that the 1.7 Series sets a minimum requirement of PHP 5.2.
I am pretty sure you don't have a PHP >= 5.2.0 version.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
jultey
Regular
Posts: 12
Joined: Sun Aug 30, 2015 12:48 am

Re: after install parse error

Post by jultey »

Hi, you're right, I'm in PHP Version 4.4.3-dev :(
I just update my.htaccess file and now I can access to PHP 5.6.8.
I am now updating my Serendipity version. Let's see how it 'll work... I'll keep you in touch.

Thanks a lot Timbalu
jultey
Regular
Posts: 12
Joined: Sun Aug 30, 2015 12:48 am

Re: after install parse error

Post by jultey »

Haha :) I have now this message (V2.0.2) :

Code: Select all

Fatal error: Uncaught --> Smarty: Unable to load template file 'admin/upgrader.inc.tpl' <-- thrown in /var/www/sda/3/a/jultey/blog/bundled-libs/Smarty/libs/sysplugins/smarty_internal_template.php on line 219

Code: Select all

  // checks if template exists
        if (!$this->source->exists) {
            if ($parentIsTpl) {
                $parent_resource = " in '{$this->parent->template_resource}'";
            } else {
                $parent_resource = '';
            }
           throw new SmartyException("Unable to load template {$this->source->type} '{$this->source->name}'{$parent_resource}");
        }
It seems some topics about this issue exist. I'm going to search if the solution is listed before come back to you :)
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: after install parse error

Post by Timbalu »

Can you please check, if that mentioned path "/var/www/sda/3/a/jultey/blog/" is the same path as where the templates/ directory with the 2k11/admin/upgrader.inc.tpl file lives?!

Additionally please add this (temporary once) into here
https://github.com/s9y/Serendipity/blob ... .php#L1206

Code: Select all

$serendipity['smarty']->testInstall();exit;
Then reload you website and paste the output here.

And did you check you really have all files added to your site correct?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
jultey
Regular
Posts: 12
Joined: Sun Aug 30, 2015 12:48 am

Re: after install parse error

Post by jultey »

Thanks for your help :)

The templates/ directory is located in /jultey/blog/. And the templates/ directory contains the file 2k11/admin/upgrader.inc.tpl.
But as my website is on a free provider, I cannot check the beginning of the path (/var/www/sda/3/a/) on the server.

I used another template which didn't include a file /admin/upgrader.inc.tpl so, I came back in V1.6.2, select the 2k11 template for my blog, and after updaded again in V2.0.2, and... same message.

I included $serendipity['smarty']->testInstall();exit; and indeed it seems I have a problem with the path. /mnt/100/sda/3/a seems to be used in place of /var/www/sda/3/a/
I think I have to change the path in the database ? Do you know where it is stored ?

For info, I have a lot of lines in the table serendipity_pluginlist begin with /mnt/146/sda/3/a/. But no trace of /mnt/100/sda/3/a...

The output is

Code: Select all

Smarty Installation test...
Testing template directory...
FAILED: /mnt/100/sda/3/a/jultey/blog/templates/default/ does not exist.
FAILED: /mnt/100/sda/3/a/jultey/blog/templates/2k11/ does not exist.
FAILED: /mnt/100/sda/3/a/jultey/blog/templates/2k11/ does not exist.
FAILED: /mnt/100/sda/3/a/jultey/blog/plugins/ does not exist.
FAILED: /mnt/100/sda/3/a/jultey/blog/templates/default/ does not exist.
Testing compile directory...
FAILED: /mnt/100/sda/3/a/jultey/blog/templates_c/ does not exist.
Testing plugins directory...
/var/www/sda/3/a/jultey/blog/bundled-libs/Smarty/libs/plugins is OK.
Testing cache directory...
FAILED: ./cache/ does not exist.
Testing configs directory...
FAILED: /mnt/100/sda/3/a/jultey/blog/templates/2k11/ does not exist.
Testing sysplugin files...
... OK
Testing plugin files...
... OK
Tests complete.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: after install parse error

Post by Timbalu »

You did not need to extra select the 2k11 template for your blog to run the upgrade process. The backend lives in 2k11/admin, which is the default template for the backend, automatically chosen.

The Serendipity Smarty initiation sets the correct paths for your Server. If this fails - as you can see - you can not have access to the included directory template files. It seems "/mnt/100" and "/var/www" are symlinked or something else I don't know about. You'll have to ask your free host about about this, I assume.

This full path is stored in the $serendipity['serendipityPath'] fullpath variable, which is in the Backends Configuration - Path - "FullPath" option and stored in the database as "serendipityPath" in the serendipity_config database table. Maybe you will find it set to "/mnt/100/sda/3/a/jultey/blog/" and can successfully change it to "/var/www/sda/3/a/jultey/blog/". You need all these FAILED directories to work properly.

If everything fails you might need to define these path parts by hand somewhere else... (maybe...)!

I cannot assume what happend to, or with these path mentioned to be "/mnt/146" in table pluginlist.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
jultey
Regular
Posts: 12
Joined: Sun Aug 30, 2015 12:48 am

Re: after install parse error

Post by jultey »

Haha. It was better but...

So, I updated serendipityPath in the database from /mnt/100/sda/3/a/jultey/blog/ to /var/www/sda/3/a/jultey/blog/
and the result was :

Code: Select all

Smarty Installation test...
Testing template directory...
/var/www/sda/3/a/jultey/blog/templates/default is OK.
/var/www/sda/3/a/jultey/blog/templates/2k11 is OK.
/var/www/sda/3/a/jultey/blog/templates/2k11 is OK.
/var/www/sda/3/a/jultey/blog/plugins is OK.
/var/www/sda/3/a/jultey/blog/templates/default is OK.
Testing compile directory...
/var/www/sda/3/a/jultey/blog/templates_c is OK.
Testing plugins directory...
/var/www/sda/3/a/jultey/blog/bundled-libs/Smarty/libs/plugins is OK.
Testing cache directory...
FAILED: ./cache/ does not exist.
Testing configs directory...
/var/www/sda/3/a/jultey/blog/templates/2k11 is OK.
Testing sysplugin files...
... OK
Testing plugin files...
... OK
Tests complete.
So, it was pretty good. After, I removed the temporary code and came back to my blog and I saw the update Wizard (from 1.6.2 to 2.0.2)
It informed me that some modifications in the file structure will be performed... I clicked on "Yes, do the modifications" and...
BOUMMM...

Now, when I try to reach my blog, I have a nice page from my provider : Error 500 - Internal error of the server

Haaaaa... It's very hard to update Serendipity !!!! :) Hopefully there is this forum, otherwise...
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: after install parse error

Post by Timbalu »

jultey wrote:It's very hard to update Serendipity !!!!
NO it is not!!! :) It is very easy and stable!
But your condition of installation is a weird one.

I think I had a quick look yesterday or the day before and found a smarty init error, which was based to a not found include of another file by constant S9Y_INCLUDE_PATH.
But what you have now is a FATAL error which is errored to the error.log file of the Apache server. Ask you hoster about this, to get known of this error and condition.
Maybe its a simple permission error, while some directories and files needs write access.

What I don't get on is, why you use this freehosting service and have a domain (somewhere else?) and put the freehost output via iframe to your domain? Isn't there a better way?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply