Jump to content

BIMAQ-Admin

Members
  • Posts

    18
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

BIMAQ-Admin's Achievements

Jr. Member

Jr. Member (3/6)

4

Reputation

  1. Thank you da², that was very helpful! I am not yet finished, but I could locate the problems quite closely using your tips.
  2. Sorry for the (maybe silly) question, I am not so familiar with php: Are this lines to add in the template I want to debug? What is still puzzling me, is that the error only occurs with php V8.1.2 and not with php V7.4.33
  3. How can I log value of variables used in a template? I now attach the complete template "publications.php": On the old server (which uses PHP 7.4.33) it works fine, the new server (PHP 8.1.2-1ubuntu2.18) throws the error message, which is defined in wire/core/Selectors.php: public function create($field, $operator, $value) { $not = false; if(!isset(self::$selectorTypes[$operator])) { // unrecognized operator, see if it's an alternate placement for NOT "!" statement $op = ltrim("$operator", '!'); if(isset(self::$selectorTypes[$op])) { $operator = $op; $not = true; } else { if(is_array($value)) $value = implode('|', $value); if(is_array($field)) $field = implode('|', $field); $debug = $this->wire()->config->debug ? "field='$field', value='$value', selector: '$this->selectorStr'" : ""; if(empty($operator)) $operator = '[empty]'; throw new WireException("Unknown Selector operator: '$operator' -- was your selector value properly escaped? $debug"); } } $class = wireClassName(self::$selectorTypes[$operator], true); /** @var Selector $selector */ $selector = $this->wire(new $class($field, $value)); if($not) $selector->not = true; return $selector; As I upgraded PW before the migration also wire/core/Selectors.php is exactly the same on both servers.
  4. Climbing through the whole site map, I found more instances of the "count("-type errors which could be successfully deleted, but there are two other errors: (maybe this is more a PHP than PW problem, but perhaps someone here has an idea of the reasons) 1. "Unknown Selector operator: '[empty]' -- was your selector value properly escaped? (in wire/core/Selectors.php line 222)",which seems to be caused by site/templates/publications.php, because it only occurs where this template is used (-> PW-publications-error.PNG). The corresponding lines of "publications.php" are: 2. " Uncaught TypeError: renderContactSmall(): Argument #1 ($contact) must be of type Page, bool given, called in site/templates/structure.php on line 25 and defined in site/templates/includes/functions.php:670" (-> PW-lfstroemung-err) The URL of the still active old webserver is: https://www.bimaq.de, the URL of the new webserver is: https://web.bimaq.uni-bremen.de
  5. Indeed, after removing "count()" in this place the main page is displayed completely. In the other pages there are still bugs, I will look for next week - Thank you for your help!
  6. Thank you - of course this was a silly mistake, but not the main one. The most important mistake was no connection to the database: At the old system database name is 'processwire' and database user is 'processwire', at the new installation database name is 'processdb' and database user is 'processuser' by default. Last week I made a database dump from the 'processwire' database and imported this dump into the new 'processdb' database (with new user). Today I added a new database with the old name and user, imported the same dump and copied the old site/config.sys with the old database configuration but new server names into the new site folder: Now it looks like the database connection is working, as I can login in the PW web interface, where I find the complete Page Tree, users and so on. But there is still an Fatal Error maybe due to different php-versions and/or database-versions?: Old server: PHP 7.4.33 (cli) (built: Jun 5 2024 05:05:14) ( NTS ) + mysql Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1 (PHP 7.4.33 is the newest version which can be installed in centos 7) New server: PHP 8.1.2-1ubuntu2.18 (cli) (built: Jun 14 2024 15:52:55) (NTS) + mysql Ver 15.1 Distrib 10.6.18-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper I also tried out the new site/config.php with old database configuration and corrected prepend- and append-variables, but the result was worse. Attached are screenshots of the homepage with errors and the line where the Fatal Error occured - I have no idea how to fix it.
  7. I tried out this procedure with PW 3.0.229 at old and new server, but there are still 2 Problems: 1. header and footer are not output despite I modified the new site/config.php accordingly: // Prepend this file in /site/templates/ to any rendered template files // wb240816: $config->prependTemplateFile = '_init.php'; $config->prependTemplateFile = '_head.php'; // Append this file in /site/templates/ to any rendered template files // wb240816: $config->appendTemplateFile = '_main.php'; $config->appendTemplateFile = '_foot.php'; and made shure, they are in the same subdirectory on both systems: root@bimadmin-www:/var/www/html/processwire/site/templates/includes# ls -l total 112 -rw-rw-r-- 1 www-data www-data 2445 Aug 16 12:10 _foot.php -rw-rw-r-- 1 www-data www-data 16906 Aug 16 12:10 _head.php 2. Since the migration I cannot longer login as PW-admin, getting the error message: "admin - Login failed" Directly before the migration I defined another PW-user, which also cannot login any longer! The database seems to work, as the main content is displayed, you can try it out yourself with follwing links: Old Server: https://www.bimaq.de/ , New Server: https://web.bimaq.uni-bremen.de/ Does anybody have an idea what the reasons coud be and how to fix the problems?
  8. After a shutdown due to urgent changes at the power supply of our housing center, the 8th effort to upgrade was successfull! I assume the blank page was caused by the old PHP version as iank supposed 4 weeks ago: I used the same files as directly after upgrading PHP, but then I did not reboot. This part of the migration to a new server is completed, now I still have to deal with the transfer of the content to the target system with different databasename and -user. Thank you very much for your support!
  9. By accident I made the interesting observation, that a little mistake in "/var/www/html/processwire/site/config.php" lead to blank page display at the new system and the following error-message in /var/log/apache2/error.log: [Tue Aug 06 16:35:42.898593 2024] [php:error] [pid 40975] [client 10.242.2.3:52499] PHP Parse error: syntax error, unexpected identifier "i", expecting ")" in /var/www/html/processwire/site/config.php on line 114 This problem could be solved by eliminating the wrong character in "/var/www/html/processwire/site/config.php" From this I conclude that my upgrade problem is also a PHP-problem.
  10. After another break due to summer holidays I now have to continue with the migration: Could you tell me more details about "replace the database" - I am not so familiar with databases: What I already tried out is a dump like: mysqldump -u username -p database_name > data-dump-www.sql and import like: mysql -u processuser -p processdbn < data-dump-www.sql Did you mean dump from the old server, transfer to the new server and import into the new database? And what has to be adjusted in the "/site/config.php"? My old server uses: $config->dbName = 'processwire'; $config->dbUser = 'processwire'; the new server: $config->dbName = 'processdb'; $config->dbUser = 'processuser'; Do you think I should change Name and User at the new server to the old values and transfer the old "userAuthSalt" to the new system?
  11. No, because I only know links to the current master Version and the latest Version of PW.
  12. The upper tutorial did not work because it uses the "yum-config-manager", which was not yet installed, but with another tutorial (https://unihost.com/help/how-to-update-php-centos-7/) I could install PHP 7.4.33 (cli) (built: Jun 5 2024 05:05:14) ( NTS ) successfully. Nevertheless I still saw a blank-page after PW upgrade. Then I again tried to upgrade PHP to version 8, which was not possible because it requires Centos 8, but nevertheless the last step in this tutorial caught my attention: "6. Update all your websites and or applications to use the latest PHP build you installed." How can I do this in PW?
  13. You are right, my PHP-Version is 5.4.16 (cli) (built: Apr 1 2020 04:07:17). I will try to upgrade according to: https://patrickdomingues.com/2021/05/01/how-to-upgrade-to-php-8-on-centos-7/ and retry the PW upgrade.
  14. Sorry for the delay, I had to finish another very urgent task until now. As you can see in the history of last Friday, I first upgraded "index.php" and ".htaccess", checked if the website still worked with the new files an then I activated the upgrade for about 6 minutes: As soon as I had upgraded "wire/.." the website was blank. In the /var/log/httpd/processwire_error.log I the only message between 12:10 and 12:16 is the bold one: This kind of error message also can be found the day before, during the time I made another effort: What is puzzling me, is that there is no client IP belonging to our institute or the University Bremen. The error message does not help me, so I can only guess that the reason for the upgrade-problem may come from the old centos linux, which uses another database name and database user as the new installation on the target system. Is it really necessary to upgrade PW before migration of the content to newly setup webserver? Perhaps with the "Export Site Profile" module that is installed (V 3.0.0)?
  15. There is no error message and no number. Below I add screenshots of the webpage and the source view in upgraded version. Then we tried out another proposal from but this also did not work. And we only switched back to the original "wire/" (version 3.0.62), leaving the upgraded versions of ".htaccess" and "index.php" with which the website works fine.
×
×
  • Create New...