sa2blv / SVXportal

A web portal for svxlink reflector
http://svxportal.sm2ampr.net/
19 stars 13 forks source link

Map doesn't work #34

Closed dh9yap closed 5 months ago

dh9yap commented 5 months ago

Hello I got the current svxportal via git clone. Was able to install everything. Only the map remains empty. Here is my address: http://svxlink.ddnss.de I'd be happy for help. 73 Jürgen DH9YAP

dh9yap commented 5 months ago

There are other things that don't work, but first get the map to work

sa2blv commented 5 months ago

the code stops generateing php from here <?php if (detect_empty_cache_table () == true ){?>

 const myTimeout = setTimeout(get_station_chat_year, 450);

<?php }?>

is the trafic_day_statistics table in your database ?

sa2blv commented 5 months ago

Found the problem try run https://github.com/sa2blv/SVXportal/blob/master/sql/update2.6.sql manually in phpmyadmin. you are missing some datebase tables.

// SA2BLV Peter

dh9yap commented 5 months ago

Hello Peter thank you for the quick response. But I still don't see a map. I see the following message in the console: portal

sa2blv commented 5 months ago

try run php file in console with php index.php and the you will get the error message. the problem is that the code stope excuting when generating the map part of the page.

dh9yap commented 5 months ago

Hi Peter This is displayed in index.php in the console portal2

dh9yap commented 5 months ago

Maybe a setting in the php.ini is necessary?

sa2blv commented 5 months ago

the problem in not in php.ini. it's is somthing wrong with the mysql database. the code stops to execute. before generate the map code. try run in terminal in your www folder. ex /var/www/html run "php index.php " there you will get an error message.

dh9yap commented 5 months ago

Hallo Peter :-) here is the output:

    PHP Fatal error:  Uncaught mysqli_sql_exception: Table 'svxportal.trafic_day_statistics' doesn't exist in /var/www/html/function.php:458

Stack trace:

0 /var/www/html/function.php(458): mysqli->query()

1 /var/www/html/index.php(3698): detect_empty_cache_table()

2 {main}

thrown in /var/www/html/function.php on line 458 root@ubuntu:/var/www/html#

sa2blv commented 5 months ago

have yo added this lines to your mysql database? https://github.com/sa2blv/SVXportal/blob/master/sql/update2.6.sql as previously posted ?

you can do it using php my admin

dh9yap commented 5 months ago

update2.6.sql I imported it!!!! I installed it on another server http://212.132.119.189/ Now it works, but the login doesn't work. I probably still have to use php-mcrypt install. Which cannot be installed via apt-get. I would like to provide instructions to make it work. I'm using Ubuntu 22.04 Jammy Apache2 php8

sa2blv commented 5 months ago

Try run php login.php in terminal. can be somthing missing

dh9yap commented 5 months ago

root@ubuntu:/var/www/html# php login.php PHP Warning: Undefined array key "login" in /var/www/html/login.php on line 4 PHP Warning: Undefined array key "password" in /var/www/html/login.php on line 5 PHP Fatal error: Uncaught mysqli_sql_exception: Unknown column 'image_url' in 'field list' in /var/www/html/login.php:13 Stack trace:

0 /var/www/html/login.php(13): mysqli_query()

1 {main}

thrown in /var/www/html/login.php on line 13

dh9yap commented 5 months ago

Had problems with install.php. I imported the SQL file with phpmyadmin. Do all SQL files have to be imported and if so, in what order 73 sql

sa2blv commented 5 months ago

it seams to be a missing field. i nead to check the update file try

ALTER TABLE users ADD image_url varchar(255); if it fix the problem

sa2blv commented 5 months ago

you can add this as well ALTER TABLE users ADD Reset_token varchar(99);

dh9yap commented 5 months ago

`<!DOCTYPE html>

Database Modification

MySQL Database Modification

  1. Open the terminal on your computer.
  2. Type the following command and press Enter:
mysql -u root -p

This command connects you to the MySQL database using the username "root". You'll be prompted to enter your password.

  1. Enter your password and press Enter. Your password won't be displayed for security reasons while you type it.
  2. After successfully logging into MySQL, you need to select your specific database where you want to make changes. To do this, use the USE command followed by the name of your database. For example:
USE your_database;

Replace "your_database" with the actual name of your database.

  1. Now you can make the desired changes to your table. For example, add a new column image_url. To do this, type the following command and press Enter:
ALTER TABLE users ADD image_url varchar(255);
  1. Next, you can add another column, for example Reset_token, by entering the following command and pressing Enter:
ALTER TABLE users ADD Reset_token varchar(99);

After completing these steps, the specified changes should have been successfully made to your database. You can exit MySQL using the exit command or by closing the terminal window.

`

dh9yap commented 5 months ago

Thank you Peter :-) It works!! The map and the login. we can close the request. 73 de Jürgen