Page 1 of 1

PHP7 + Joomla 2.5

Posted: 11 Jun 2016, 14:58
by @yourservice
Hi there,

Since the update of PHP from version 5 to 7 from my ISP, my Joomla 2.5 site doesn't work anymore [removed by moderator - strict warnings are only warnings for developers and they don't influence the running of the site, in any case other parts of the site]

Code: Select all

FastCGI: server "/var/run/php-fpm/php54/php-cgi" stderr: PHP message: PHP Strict Standards: Non-static method PhocaguestbookHelperFront::getRequiredSign() should not be called statically, assuming $this from incompatible context in /sites/uitvaartverzorgingpennekamp.nl/www/components/com_phocaguestbook/views/guestbook/tmpl/default.php on line 273
I have the latest PhocaGuestBook 2.0.7

The error message I get is: You are not authorized to view this resource!

What else can I do? I will update to Joomla 3.5 soon but not just yet...

Regards,

Wilfred

Re: PHP7 + Joomla 2.5

Posted: 11 Jun 2016, 21:50
by christine
Hi Wilfred,

Usually you could remove "Strict Standard Messages" as they are warnings and not errors.
See: https://www.gavick.com/documentation/jo ... -error-fix

But: I checked your URL and there are only these scripts:
/media/system/js/mootools-core.js
/media/system/js/core.js
/media/system/js/caption.js
/media/system/js/mootools-more.js
/templates/beez5/javascript/md_stylechanger.js
/templates/beez5/javascript/hide.js

Again about the message:

Code: Select all

FastCGI: server "/var/run/php-fpm/php54/php-cgi" stderr: PHP message: PHP Strict Standards: Non-static method PhocaguestbookHelperFront::getRequiredSign() should not be called statically, assuming $this from incompatible context in /sites/uitvaartverzorgingpennekamp.nl/www/components/com_phocaguestbook/views/guestbook/tmpl/default.php on line 273
..... :getRequiredSign() > see above, there is no index.php, no guestbook etc.

See also: in nederlands taal: https://forum.joomlanl.nl/forum/64-2-5- ... is-mislukt

(daar gaat het om e-mail adress, maar ook dat het met hoster etc. te doen heeft .....)
if ((int)$this->tmpl['display_content_form'] > 0){
echo '<tr>'
.'<td><strong>'.JText::_('COM_PHOCAGUESTBOOK_CONTENT').PhocaguestbookHelperFront::getRequiredSign((int)$this->tmpl['display_content_form']).' </strong></td>'
.'<td colspan="3">'.$this->tmpl['editor'].$this->tmpl['hidden_field_output'][5].'</td>'
.'</tr>';
}
You are not authorized to view this resource!
it seems, there are configuration.php problems and/or path, permissions etc. Ask you hosting provider please.
I will update to Joomla 3.5 soon but not just yet...
See here please: https://www.phoca.cz/documents/50-phoca/ ... o-joomla-3 before going from J 2.5 to J 3.5 (J 3.6 planned in 2 weeks)

Kind regards, Christine

Re: PHP7 + Joomla 2.5

Posted: 12 Jun 2016, 00:30
by Jan
Hi, see the answer of Christine. Anyway if you run PHP 7, you should upgrade your Joomla! to version 3.5 which is ready for PHP 7. In fact it is not recommended to run Joomla! or extensions which are obsolete.

As you wrote, you are not able yet. Try to see the errorLog for php error messages, maybe they will tell more. Warnings and Notices are not errors, they are only information for the developers and they should be disabled for production site ( https://www.phoca.cz/documents/50-phoca/ ... tic-method )
They don't interrupt the php script and have no influence on running it.
my Joomla 2.5 site doesn't work anymore
Check system plugin, or template, they are running on whole site and can influence whole site, specific extension like Phoca Guestbook only runs when the specific guestbook site is called. So they cannot influence any other part of the system - e.g. site where article is displayed. (This is different to other parts like system plugins, templates, modules, etc. which when they are active are running on all pages of the site, component runs only on its own page and cannot influence any other part of the website)


Jan

Re: PHP7 + Joomla 2.5

Posted: 19 Jun 2016, 13:08
by @yourservice
Everything goes well in the update to Joomla 3.5. After step 5 though I get this msg:

Code: Select all

Fout
SQL-query:


--
-- Indexen voor geëxporteerde tabellen
--

--
-- Indexen voor tabel `jos_phocaguestbook_items`
--
ALTER TABLE `jos_phocaguestbook_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `published` (`published`);
MySQL meldt: Documentatie

#1068 - Multiple primary key defined 
Also I have the line:

Code: Select all

INSERT INTO `jos_phocaguestbook_items` ( ...
twice in my .sql database backup file...

Any idea what goes wrong? I did everything exactly as described...

Regards,

Wilfred

Re: PHP7 + Joomla 2.5

Posted: 19 Jun 2016, 13:46
by @yourservice
Possible solution:

At the end of my .sql backup file:

Code: Select all

--
-- Indexen voor geëxporteerde tabellen
--

--
-- Indexen voor tabel `jos_phocaguestbook_items`
--
ALTER TABLE `jos_phocaguestbook_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `published` (`published`);

--
-- AUTO_INCREMENT voor geëxporteerde tabellen
--

--
-- AUTO_INCREMENT voor een tabel `jos_phocaguestbook_items`
--
ALTER TABLE `jos_phocaguestbook_items`
  MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=471;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
It ALSO says: jos_phoca..., I changed these also into jos_temp_phoca...

Please add this to the migrate instructions?

Also, as stated before, there's a second row with

Code: Select all

INSERT INTO `jos_temp_phocaguestbook_items` (`id`
. When I remove this line I also get an error so I had to put it back.

Any idea why this line is stated a second time?

Regards,

Wilfred

Re: PHP7 + Joomla 2.5

Posted: 19 Jun 2016, 16:29
by Jan
Hi, what you mean with:

"Also, as stated before, there's a second row with "

In the migration guide there is only one row for INSERT ...

:idea:

Jan

Re: PHP7 + Joomla 2.5

Posted: 20 Jun 2016, 09:23
by @yourservice
Well, I have 2 lines with INSERT, if I remove the second one, I get an error when importing!

Image

Regards,

Wilfred

Re: PHP7 + Joomla 2.5

Posted: 22 Jun 2016, 15:50
by Jan
Aha, now I understand, seems like the export feature (e.g. feature of phpAdmin) split the query to more inserts. This is common way how to protect the database from memory issues. This has no influence on the query.

Jan