Announcement

#1 2017-01-12 17:52:46

daareek
Member
2017-01-12
20

PHP versions to use with pwigio and Bootstrap theme???

Hello/Hi/Greetings,

with 5.4.432.0 piwigio does not run generating this error:

"Fatal error: Cannot redeclare transliterate() in /photoalbum/include/functions.inc.php on line 340"

when downgraded using .htaccess on the application folder to 5.2.17 works however Bootstrap theme does not work, generating this error:
"
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /photoalbum/themes/bootstrapdefault/admin/admin.inc.php on line 22

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /photoalbum/themes/bootstrapdefault/admin/admin.inc.php on line 22

Parse error: syntax error, unexpected T_STRING in /photoalbum/themes/bootstrapdefault/admin/admin.inc.php on line 22"


as I have found on the forum it requires at least PHP 5.3? How to run those two togheter???

Piwigo version: 2.8.5
PHP version: 5.2.17 or 5.4.432.0
MySQL version: 5.5.51-38
Piwigo URL: http://none yet :-(

Offline

 

#2 2017-01-12 20:50:15

teekay
Member
2013-06-12
427

Re: PHP versions to use with pwigio and Bootstrap theme???

It seems your 5.4 version is sort of.. buggy. If thats a root VPS, install something sane (5.6 that is, anything below is end of life for too long already)

Offline

 

#3 2017-01-12 21:41:23

daareek
Member
2017-01-12
20

Re: PHP versions to use with pwigio and Bootstrap theme???

Hi,

it is not a VPS but my provider allows me to choose the PHP interpreter 5.2, 5.3, 5.4, 5.5, 5.6 and 7

Piwigio works only on 5.2.17 (with different templates for example with GreyDragon EXCEPT Bootstrap theme) otherwise it gives this error:

"Fatal error: Cannot redeclare transliterate() in /photoalbum/include/functions.inc.php on line 340"

5.6 version is  5.6.122.0

:-( !?!

Offline

 

#4 2017-01-12 22:16:05

teekay
Member
2013-06-12
427

Re: PHP versions to use with pwigio and Bootstrap theme???

That looks fishy. Did you test 5.6 and 7? And is that "cannot redeclare function" really the full stack trace (I would expect a second line that shows where else that function got declared)

Last edited by teekay (2017-01-12 22:26:28)

Offline

 

#5 2017-01-12 23:02:09

daareek
Member
2017-01-12
20

Re: PHP versions to use with pwigio and Bootstrap theme???

Hi,

yes, all of them.

Works only with 5.2 whenever it is selected in management interface or specificly for this folder through .htaccess file.

As I have other installations on this account (all in subfolders with separate mysql databases - this is production envirnment for few wordpress and joomla) all they work with all those versions of PHP, joomla possibly as was not updated for some times gives up on php7 with 500 server error :-)

I have debug file for PHP and for all never versions than 5.2 it say just:

[12-Jan-2017 21:31:32 Europe/Warsaw] PHP Fatal error:  Cannot redeclare transliterate() in /photoalbum/include/functions.inc.php on line 340

Offline

 

#6 2017-01-12 23:16:07

flop25
Piwigo Team
2006-07-06
7037

Re: PHP versions to use with pwigio and Bootstrap theme???

It's quite impossible that transliterate is already declared before the line 340 :  https://github.com/Piwigo/Piwigo/search … nsliterate the function is defined in only one file at line 340 or later line 350 :
so you probably don't have the good files -or hacked ones? (download&save the files to check them just in case) ; reupload by overwriting everything


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#7 2017-01-13 01:21:23

daareek
Member
2017-01-12
20

Re: PHP versions to use with pwigio and Bootstrap theme???

Hi,

first, thanks for Your reply!

I just downloaded v.2.8.4 from http://piwigo.org/download/dlcounter.php?code=2.8.4
checked md5 locally: 93e075bf705dc7a7c0b995cdfd948674 *piwigo-2.8.4.zip
Downloaded also v.2.8.5 from http://piwigo.org/download/dlcounter.php?code=latest
also checked md5: 38ab182083e8e5ae6d5a51295305ae8b *piwigo-2.8.5.zip
seems to be correct

Unzipped to new folders, and initiated setup getting in both cases as on my first install (tried to unzip and net installation then):

"500 Internal Error The server encountered an internal error and could not complete your request."

and in PHP debug file:

[13-Jan-2017 01:04:53 Europe/Warsaw] PHP Fatal error:  Cannot redeclare transliterate() in /piwigo284/include/functions.inc.php on line 350

[13-Jan-2017 01:10:18 Europe/Warsaw] PHP Fatal error:  Cannot redeclare transliterate() in /piwigo285/include/functions.inc.php on line 350

as long as I do not force PHP to version 5.2.17, then setup starts perfectly!

You can check for Yourself at:

http://team4x4.home.pl/piwigo28x where x is 4 or 5 to call the install and phpversion.php to check the PHP in use.

What the hell?!

Offline

 

#8 2017-01-13 01:40:59

daareek
Member
2017-01-12
20

Re: PHP versions to use with pwigio and Bootstrap theme???

Small update:

tested version 2.9.0 beta1 - same problem.

Changed those 4 occurences in three files from "transliterate" to "mumbojumbo" and at least installer started to work with PHP 5.6 ?!

Offline

 

#9 2017-01-13 02:42:28

daareek
Member
2017-01-12
20

Re: PHP versions to use with pwigio and Bootstrap theme???

Update2:

done same thing renaming this function in all occurences (5 in total in 3 files)  of my running setup of Piwigo 2.5.8 and installation works like a charm! Now with PHP 5.6 so I was able to run Bootstrap Darkroom theme!

BUT WHY?! It looks like transliterate function is definied somewhere else outside of piwigo code when using PHP newer than 5.2?!

How is that possible?!

Offline

 

#10 2017-01-13 11:09:17

flop25
Piwigo Team
2006-07-06
7037

Re: PHP versions to use with pwigio and Bootstrap theme???

i think of a faulty php/apache install
you are the first reporting that so I would be surprised to see Piwigo faulty here; remember that you had the issue at all version >5.2 (5.3 is from 2009)


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#11 2017-01-13 11:58:58

teekay
Member
2013-06-12
427

Re: PHP versions to use with pwigio and Bootstrap theme???

I also think the PHP install is fishy there.

Could you try replacing "include" with "include_once" in include/common.inc.php line 106, and rename back the function to transliterate?

Could this be a clash with PECL intl's Transliterator::transliterate which is available since 5.4?

Offline

 

#12 2017-01-13 12:49:45

daareek
Member
2017-01-12
20

Re: PHP versions to use with pwigio and Bootstrap theme???

Hi,

done, nothing changes - same error, error appears from PHP version 5.3.

Reverted name of the function - works again... :-)

This happens on the service of one of the biggest hosting providers in Poland, again I'm the only one with the problem :-) Even my own other installations (wordpress, joomla, magento) works fine on the same account (separate databases)...

Furthermore I have made a simple test.php file with just the declaration of transliterate function

<?php

function transliterate()
  {
    echo phpversion('tidy');
  }


?>

The result is:

[13-Jan-2017 12:45:55 Europe/Warsaw] PHP Fatal error:  Cannot redeclare transliterate() in /photoalbum/test.php on line 6

Offline

 

#13 2017-01-13 12:51:43

flop25
Piwigo Team
2006-07-06
7037

Re: PHP versions to use with pwigio and Bootstrap theme???

okya... contact your hosting


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#14 2017-01-13 12:54:45

flop25
Piwigo Team
2006-07-06
7037

Re: PHP versions to use with pwigio and Bootstrap theme???

you might also ask on stackoverflow


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#15 2017-01-16 16:10:29

daareek
Member
2017-01-12
20

Re: PHP versions to use with pwigio and Bootstrap theme???

Hi,

got an answer from IT support of my hosting, @teekay Was right. Piwigio transliterate declaration collides with this http://php.net/manual/en/transliterator … terate.php also implemented on my server starting from PHP 5.4

Why this happens only to me? Could You modify this in future releases or I will have to do it manually on each update?

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact