TheNAF / naflm

NAFLM - NAF League Manager
Other
35 stars 34 forks source link

Unable to create pdf roster #267

Closed algomu closed 4 years ago

algomu commented 5 years ago

Thank you for your effort, I have a question, I try this version after user OBBLM for several years. Each time I try to print roster pdf in my first installation I get:

Notice: ob_clean(): failed to delete buffer. No buffer to delete in /var/www/html/modules/pdf/fpdf.php on line 994

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/modules/pdf/fpdf.php:994) in /var/www/html/modules/pdf/fpdf.php on line 1018
FPDF error: Some data has already been output, can't send PDF file.  Case I2

Code related:

  case 'I':
                        //Send to standard output
                        if(ob_get_length())
                                $this->Error('Some data has already been output, can\'t send PDF file. Case I1');
                        if(php_sapi_name()!='cli')
                        {
                                //We send to a browser
                                header('Content-Type: application/pdf');
                                if(headers_sent())
                                        $this->Error('Some data has already been output, can\'t send PDF file. Case I2');
                                header('Content-Length: '.strlen($this->buffer));
                                header('Content-Disposition: inline; filename="'.$name.'"');
                                header('Cache-Control: private, max-age=0, must-revalidate');
                                header('Pragma: public');
                                ini_set('zlib.output_compression','0');
                        }
                        echo $this->buffer;
                        break;
The-J-Bird commented 4 years ago

I had this same problem.

This change fixed it.

Hope it helps.

https://github.com/The-J-Bird/naflm/commit/da2ae5a6462c042c4b6e8e2b8b875d5197ba2f9d

algomu commented 4 years ago

Fantastic! It works perfectly!!

Thanks!!!

algomu commented 4 years ago

Seems that since last updates I get a similar error:

Notice: Undefined index: Wizard in /var/www/html/modules/pdf/pdf_roster.php on line 487

Fatal error: Uncaught exception 'Exception' with message 'FPDF error: Some data has already been output, can't send PDF file (output started at /var/www/html/modules/pdf/pdf_roster.php:487)' in /var/www/html/modules/pdf/fpdf.php:271 Stack trace: #0 /var/www/html/modules/pdf/fpdf.php(1049): FPDF->Error('Some data has a...') #1 /var/www/html/modules/pdf/fpdf.php(999): FPDF->_checkoutput() #2 /var/www/html/modules/pdf/pdf_roster.php(570): FPDF->Output('DeadPackets 202...', 'I') #3 [internal function]: PDFroster::main(Array) #4 /var/www/html/lib/class_module.php(66): call_user_func(Array, Array) #5 /var/www/html/handler.php(12): Module::run('PDFroster', Array) #6 {main} thrown in /var/www/html/modules/pdf/fpdf.php on line 271
thefloppy1 commented 4 years ago

Hi Algomu, what was the last update you installed? I have tested with my league that I am the admin of and the latest pfdf software and it all works. I also did a clean install on my test server, and it works. So I need more info, could you get me some information on your install, your browser etc.

byrnesvictim commented 4 years ago

Same here, have been testing fresh and exisiting installs all week and no sign on this problem myself. A release was pushed last night if not already on that version, can you install that and see if it fixes it? The latest version contains patches to the PDF generating code.

https://github.com/TheNAF/naflm/releases/tag/V1.1-Spike9.0

algomu commented 4 years ago

Hi! No, I get the same error. I tried to clone master and install the new branch and I get error in both installations:

Notice: Undefined index: Wizard in /var/www/html/modules/pdf/pdf_roster.php on line 487

Fatal error: Uncaught exception 'Exception' with message 'FPDF error: Some data has already been output, can't send PDF file (output started at /var/www/html/modules/pdf/pdf_roster.php:487)' in /var/www/html/modules/pdf/fpdf.php:271 Stack trace: #0 /var/www/html/modules/pdf/fpdf.php(1049): FPDF->Error('Some data has a...') #1 /var/www/html/modules/pdf/fpdf.php(999): FPDF->_checkoutput() #2 /var/www/html/modules/pdf/pdf_roster.php(570): FPDF->Output('Beodos 2020-07-...', 'I') #3 [internal function]: PDFroster::main(Array) #4 /var/www/html/lib/class_module.php(66): call_user_func(Array, Array) #5 /var/www/html/handler.php(12): Module::run('PDFroster', Array) #6 {main} thrown in /var/www/html/modules/pdf/fpdf.php on line 271

The last version that works was naflm-BB2016-DZ2 modifying fpdf.php line 994:

//Changing
    ob_clean(); 
//with
    if (ob_get_contents()) ob_clean();

But, then, the error was different...

byrnesvictim commented 4 years ago

This is very weird,

@algomu Can I ask you to do a couple things to help us identify why on your install this is happening;

@The-J-Bird by chance have you done a fresh install of NAFLM v1.1 Spike v9.1 on your host, and is it happening for you still also?

algomu commented 4 years ago

@byrnesvictim, my permissions were 0644, I changed but error persists, I am using php 5.6 and a lot of browsers, safari, firefox and chrome, I can create you a test admin user if you want to see the error.

thefloppy1 commented 4 years ago

Can you run /troubleshoot.php and post it here as well.

On Thu, 16 Jul 2020, 18:03 algomu, notifications@github.com wrote:

@byrnesvictim https://github.com/byrnesvictim, my permissions were 0644, I changed but error persists, I am using php 5.6 and a lot of browsers, safari, firefox and chrome, I can create you a test admin user if you want to see the error.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/TheNAF/naflm/issues/267#issuecomment-659232513, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD25NBTOG73SA4KU7LNDRGLR32X5JANCNFSM4IUA3A4Q .

byrnesvictim commented 4 years ago

@byrnesvictim, my permissions were 0644, I changed but error persists, I am using php 5.6 and a lot of browsers, safari, firefox and chrome, I can create you a test admin user if you want to see the error.

Yes please. That would be great.

williamleonard commented 4 years ago

This error would indicate that some whitespace is left after an ending PHP tag. For example:

?> with an enter would cause this if it was in the right location. Removing an end tag in some cases is good.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Davidmailto:notifications@github.com Sent: Thursday, July 16, 2020 4:17 AM To: TheNAF/naflmmailto:naflm@noreply.github.com Cc: Subscribedmailto:subscribed@noreply.github.com Subject: Re: [TheNAF/naflm] Unable to create pdf roster (#267)

@byrnesvictimhttps://github.com/byrnesvictim, my permissions were 0644, I changed but error persists, I am using php 5.6 and a lot of browsers, safari, firefox and chrome, I can create you a test admin user if you want to see the error.

Yes please. That would be great.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/TheNAF/naflm/issues/267#issuecomment-659239623, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGATDDOGM27NJQO34WZ4TTR32ZR3ANCNFSM4IUA3A4Q.

thefloppy1 commented 4 years ago

I checked that early as well, the >? was removed from the pdf_roster.pdf some years ago.

This error would indicate that some whitespace is left after an ending PHP tag. For example: ?> with an enter would cause this if it was in the right location. Removing an end tag in some cases is good. Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10 From: Davidmailto:notifications@github.com Sent: Thursday, July 16, 2020 4:17 AM To: TheNAF/naflmmailto:naflm@noreply.github.com Cc: Subscribedmailto:subscribed@noreply.github.com Subject: Re: [TheNAF/naflm] Unable to create pdf roster (#267) @byrnesvictimhttps://github.com/byrnesvictim, my permissions were 0644, I changed but error persists, I am using php 5.6 and a lot of browsers, safari, firefox and chrome, I can create you a test admin user if you want to see the error. Yes please. That would be great. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub<#267 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGATDDOGM27NJQO34WZ4TTR32ZR3ANCNFSM4IUA3A4Q.

algomu commented 4 years ago

@byrnesvictim, my permissions were 0644, I changed but error persists, I am using php 5.6 and a lot of browsers, safari, firefox and chrome, I can create you a test admin user if you want to see the error.

Yes please. That would be great.

http://bloodbowl.com.es:8000

test/bloodbowl!!

algomu commented 4 years ago

Can you run /troubleshoot.php and post it here as well.

image

algomu commented 4 years ago

If I comment line 487 on pdf_roster.php and it works!!!!

Wizards line...

// print_inducements($x, $y, $h, $bgcol, $linecol, $fontsize, $ind_name, $ind_amount, $ind_value)
$pdf->print_inducements(MARGINX, ($currenty+=$h), $h, COLOR_ROSTER_NORMAL, DEFLINECOLOR, 8, 'Bloodweiser Babes (0-2):', $ind_babes, $pdf->Mf($inducements['Bloodweiser Babes']['cost']));
$pdf->print_inducements(MARGINX, ($currenty+=$h), $h, COLOR_ROSTER_NORMAL, DEFLINECOLOR, 8, 'Bribes (0-3):', $ind_bribes, $pdf->Mf($bribe_cost));
$pdf->print_inducements(MARGINX, ($currenty+=$h), $h, COLOR_ROSTER_NORMAL, DEFLINECOLOR, 8, 'Extra Training (0-4):', $ind_rr, $pdf->Mf($inducements['Extra Training']['cost']));
$pdf->print_inducements(MARGINX, ($currenty+=$h), $h, COLOR_ROSTER_NORMAL, DEFLINECOLOR, 8, 'Halfling Master Chef (0-1):', $ind_chef, $pdf->Mf($chef_cost));
$pdf->print_inducements(MARGINX, ($currenty+=$h), $h, COLOR_ROSTER_NORMAL, DEFLINECOLOR, 8, $apo_igor, $ind_apo_igor, $pdf->Mf($ind_apo_igor_cost));
//$pdf->print_inducements(MARGINX, ($currenty+=$h), $h, COLOR_ROSTER_NORMAL, DEFLINECOLOR, 8, 'Wizard (0-1):', $ind_wiz, $pdf->Mf($inducements['Wizard']['cost']));
$pdf->print_inducements(MARGINX, ($currenty+=$h), $h, COLOR_ROSTER_NORMAL, DEFLINECOLOR, 8, 'Card budget:', ' ', $pdf->Mf($ind_card));
$pdf->print_inducements(MARGINX, ($currenty+=$h), $h, COLOR_ROSTER_NORMAL, DEFLINECOLOR, 8, 'Gate:', null, '');
$pdf->print_inducements(MARGINX, ($currenty+=$h), $h, COLOR_ROSTER_NORMAL, DEFLINECOLOR, 8, 'FAME:', null, '');

I remove comment on line 487 again...

thefloppy1 commented 4 years ago

I have looked at all the files, there is a possible connection in one we are looking into. It is hard for us to test as we can't replicate the error. but we will be back with soemthing soon.

byrnesvictim commented 4 years ago

@algomu I logged in to your server and got the same errors, you can delete those credentials now.

Can I you have time to try a totally new install with a fresh SQL database and also confirm that the problem still exists then?

You do not have any html minify or similar going on by chance?

algomu commented 4 years ago

I have looked at all the files, there is a possible connection in one we are looking into. It is hard for us to test as we can't replicate the error. but we will be back with soemthing soon.

Thanks, may be can be useful that seems to works if I comment this line:

//$pdf->print_inducements(MARGINX, ($currenty+=$h), $h, COLOR_ROSTER_NORMAL, DEFLINECOLOR, 8, 'Wizard (0-1):', $ind_wiz, $pdf->Mf($inducements['Wizard']['cost']));
algomu commented 4 years ago

@algomu I logged in to your server and got the same errors, you can delete those credentials now.

Can I you have time to try a totally new install with a fresh SQL database and also confirm that the problem still exists then?

You do not have any html minify or similar going on by chance?

No problem, but probably will be next monday, any recommendation? any different php version?

byrnesvictim commented 4 years ago

I'm running and testing on 5.6, but there is work on a PHP7.x version of the software going on right now. Lets keep it at 5.6 so we can try and narrow down why it happens on your install.

So it looks like a couple workarounds but would be nice to know why on some installs specifically this happens.

williamleonard commented 4 years ago

Could display errors cause this problem by outputting data in the middle of the PDF causing this error message?

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Davidmailto:notifications@github.com Sent: Friday, July 17, 2020 7:40 AM To: TheNAF/naflmmailto:naflm@noreply.github.com Cc: williamleonardmailto:william.leonard@hotmail.com; Commentmailto:comment@noreply.github.com Subject: Re: [TheNAF/naflm] Unable to create pdf roster (#267)

I'm running and testing on 5.6, but there is work on a PHP7.x version of the software going on right now. Lets keep it at 5.6 so we can try and narrow down why it happens on your install.

So it looks like a couple workarounds but would be nice to know why on some installs specifically this happens.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/TheNAF/naflm/issues/267#issuecomment-660060787, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGATDALSKFAMUOVDGNU7HTR4A2D5ANCNFSM4IUA3A4Q.

algomu commented 4 years ago

I tried with fresh installation. I cloned master with:

git clone https://github.com/TheNAF/naflm.git

I modified settings.php with username, password database.

I access to install.php:

Creating core tables...
OK — coaches
OK — teams
OK — players
OK — memberships
OK — players_skills
OK — races
OK — leagues
OK — divisions
OK — tours
OK — matches
OK — match_data
OK — texts
OK — game_data_players
OK — game_data_stars
OK — game_data_skills
OK — mv_players
OK — mv_teams
OK — mv_coaches
OK — mv_races
OK — mv_es_players
OK — mv_es_teams
OK — mv_es_coaches
OK — mv_es_races
OK — match_data_es
Creating module tables...
OK — wanted
OK — hof
OK — prizes
OK — log
OK — conferences
OK — conference_teams
OK — league_prefs
OK — cemetery
OK — famousteams
Other tasks...
OK — Synchronize game data with database
OK — applied table indexes
OK — created MySQL functions/procedures
OK — root user created.

Finished

Then, log in with root:

Your database version cannot be determined. Your system will run all automatic upgrades.
Your database will now be upgraded to version 101.
Upgrading to version 075-080.
Running SQLs for modules upgrade...
OK — SQLs of Wanted
OK — SQLs of HOF
OK — SQLs of LogSubSys
Running tasks for core system upgrade...
OK — created MySQL functions/procedures
OK — Core SQLs (70 total)

Notice: Constant T_RACE_AMAZON already defined in /var/www/html/lib/game_data_bb2016.php on line 14

Notice: Constant T_RACE_CHAOS already defined in /var/www/html/lib/game_data_bb2016.php on line 15

Notice: Constant T_RACE_CHAOS_DWARF already defined in /var/www/html/lib/game_data_bb2016.php on line 16

Notice: Constant T_RACE_DARK_ELF already defined in /var/www/html/lib/game_data_bb2016.php on line 17

Notice: Constant T_RACE_DWARF already defined in /var/www/html/lib/game_data_bb2016.php on line 18

Notice: Constant T_RACE_ELF already defined in /var/www/html/lib/game_data_bb2016.php on line 19

Notice: Constant T_RACE_GOBLIN already defined in /var/www/html/lib/game_data_bb2016.php on line 20

Notice: Constant T_RACE_HALFLING already defined in /var/www/html/lib/game_data_bb2016.php on line 21

Notice: Constant T_RACE_HIGH_ELF already defined in /var/www/html/lib/game_data_bb2016.php on line 22

Notice: Constant T_RACE_HUMAN already defined in /var/www/html/lib/game_data_bb2016.php on line 23

Notice: Constant T_RACE_KHEMRI already defined in /var/www/html/lib/game_data_bb2016.php on line 24

Notice: Constant T_RACE_LIZARDMAN already defined in /var/www/html/lib/game_data_bb2016.php on line 25

Notice: Constant T_RACE_ORC already defined in /var/www/html/lib/game_data_bb2016.php on line 26

Notice: Constant T_RACE_NECROMANTIC already defined in /var/www/html/lib/game_data_bb2016.php on line 27

Notice: Constant T_RACE_NORSE already defined in /var/www/html/lib/game_data_bb2016.php on line 28

Notice: Constant T_RACE_NURGLE already defined in /var/www/html/lib/game_data_bb2016.php on line 29

Notice: Constant T_RACE_OGRE already defined in /var/www/html/lib/game_data_bb2016.php on line 30

Notice: Constant T_RACE_UNDEAD already defined in /var/www/html/lib/game_data_bb2016.php on line 31

Notice: Constant T_RACE_VAMPIRE already defined in /var/www/html/lib/game_data_bb2016.php on line 32

Notice: Constant T_RACE_SKAVEN already defined in /var/www/html/lib/game_data_bb2016.php on line 33

Notice: Constant T_RACE_WOOD_ELF already defined in /var/www/html/lib/game_data_bb2016.php on line 34

Notice: Constant T_RACE_CHAOS_PACT already defined in /var/www/html/lib/game_data_bb2016.php on line 35

Notice: Constant T_RACE_SLANN already defined in /var/www/html/lib/game_data_bb2016.php on line 36

Notice: Constant T_RACE_UNDERWORLD already defined in /var/www/html/lib/game_data_bb2016.php on line 37

Notice: Constant T_RACE_OLDWORLD already defined in /var/www/html/lib/game_data_bb2016.php on line 38
Upgrading to version 080-090.
Running SQLs for modules upgrade...
Running tasks for core system upgrade...
OK — created MySQL functions/procedures
OK — Core SQLs (7 total)
Upgrading to version 090-091.
Running SQLs for modules upgrade...
Running tasks for core system upgrade...
OK — created MySQL functions/procedures
OK — Core SQLs (0 total)
Upgrading to version 091-095.
Running SQLs for modules upgrade...
OK — SQLs of Cemetery
OK — SQLs of FamousTeams
Running tasks for core system upgrade...
OK — created MySQL functions/procedures
OK — Core SQLs (0 total)
Upgrading to version 095-096.
Running SQLs for modules upgrade...
Running tasks for core system upgrade...
OK — created MySQL functions/procedures
OK — Core SQLs (0 total)
Upgrading to version 096-097.
Running SQLs for modules upgrade...
OK — SQLs of Conference
OK — SQLs of LeaguePref
Running tasks for core system upgrade...
OK — created MySQL functions/procedures
OK — Core SQLs (1 total)
Upgrading to version 101.
Running SQLs for modules upgrade...
Running tasks for core system upgrade...
OK — created MySQL functions/procedures
OK — Core SQLs (1 total)

After, I created a new user, with that user a team, and finally create roster:

Notice: Undefined index: Wizard in /var/www/html/modules/pdf/pdf_roster.php on line 487

Notice: Undefined property: BB_PDF::$CurPageFormat in /var/www/html/modules/pdf/bb_pdf_class.php on line 370

Fatal error: Uncaught exception 'Exception' with message 'FPDF error: Some data has already been output, can't send PDF file (output started at /var/www/html/modules/pdf/pdf_roster.php:487)' in /var/www/html/modules/pdf/fpdf.php:271 Stack trace: #0 /var/www/html/modules/pdf/fpdf.php(1049): FPDF->Error('Some data has a...') #1 /var/www/html/modules/pdf/fpdf.php(999): FPDF->_checkoutput() #2 /var/www/html/modules/pdf/pdf_roster.php(570): FPDF->Output('Test 2020-07-20...', 'I') #3 [internal function]: PDFroster::main(Array) #4 /var/www/html/lib/class_module.php(66): call_user_func(Array, Array) #5 /var/www/html/handler.php(12): Module::run('PDFroster', Array) #6 {main} thrown in /var/www/html/modules/pdf/fpdf.php on line 271

If I put a comment (//) on line 487, first Notice disappears, but second one persists.

The mysql version is:

MySQL [(none)]> select version();
+-----------+
| version() |
+-----------+
| 5.5.62    |
+-----------+
1 row in set (0.00 sec)
thefloppy1 commented 4 years ago

can you post your php extensions (screenshot) The problem I have is that I can't replicate the error, on any of the 3 test environments I have. And you just did a clean install. which leads me to suggest that it is something possibly server side. but i can't put my finger on it. might be best to post the host your paying.
Do you know what system resources you have?

williamleonard commented 4 years ago

If it is a cpanel hosting and you want to send me a backup, I can restore it to cpanel and see if I can reproduce it as well and resolve it if I can. You can email the backup to support@mercuryvps.commailto:support@mercuryvps.com .

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: thefloppy1mailto:notifications@github.com Sent: Monday, July 20, 2020 7:21 PM To: TheNAF/naflmmailto:naflm@noreply.github.com Cc: williamleonardmailto:william.leonard@hotmail.com; Commentmailto:comment@noreply.github.com Subject: Re: [TheNAF/naflm] Unable to create pdf roster (#267)

can you post your php extensions (screenshot) The problem I have is that I can't replicate the error, on any of the 3 test environments I have. And you just did a clean install. which leads me to suggest that it is something possibly server side. but i can't put my finger on it. might be best to post the host your paying. Do you know what system resources you have?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/TheNAF/naflm/issues/267#issuecomment-661430528, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGATDEQYRWWLF44N6JDTUDR4TGNXANCNFSM4IUA3A4Q.

thefloppy1 commented 4 years ago

Do this. that might be the best way to sort it out.

If it is a cpanel hosting and you want to send me a backup, I can restore it to cpanel and see if I can reproduce it as well and resolve it if I can. You can email the backup to support@mercuryvps.commailto:support@mercuryvps.com . Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10 From: thefloppy1mailto:notifications@github.com Sent: Monday, July 20, 2020 7:21 PM To: TheNAF/naflmmailto:naflm@noreply.github.com Cc: williamleonardmailto:william.leonard@hotmail.com; Commentmailto:comment@noreply.github.com Subject: Re: [TheNAF/naflm] Unable to create pdf roster (#267) can you post your php extensions (screenshot) The problem I have is that I can't replicate the error, on any of the 3 test environments I have. And you just did a clean install. which leads me to suggest that it is something possibly server side. but i can't put my finger on it. might be best to post the host your paying. Do you know what system resources you have? — You are receiving this because you commented. Reply to this email directly, view it on GitHub<#267 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGATDEQYRWWLF44N6JDTUDR4TGNXANCNFSM4IUA3A4Q.

algomu commented 4 years ago

can you post your php extensions (screenshot) The problem I have is that I can't replicate the error, on any of the 3 test environments I have. And you just did a clean install. which leads me to suggest that it is something possibly server side. but i can't put my finger on it. might be best to post the host your paying. Do you know what system resources you have?

May http://bloodbowl.com.es:8000/phpinfo.php be enough?

About my environment I send and email to @williamleonard explaining how to replicate, but I can draw a few notes here:

I'm using docker and docker-compose, I creted two images, one for web and other for database:

My images:

REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
bloodbowl_web         latest              fea4493cafbc        15 months ago       374 MB
docker.io/mysql       5.5                 4ee01d11a48b        16 months ago       205 MB

About the images, mysql is the default for that version but web, tagged as bloodbowl_web, was create with this Dockerfile:

FROM php:5.6-apache
RUN docker-php-ext-install mysql
RUN apt-get update -y && apt-get install -y libpng-dev
RUN docker-php-ext-install gd

And containers were created with this docker-compose.yml:

version: '3'

services:

  naflmdb:
    container_name: naflm-mysql
    image: mysql:5.5
    volumes:
      - "/docker/NAFLM-Test/mysql:/var/lib/mysql"
    environment:
      MYSQL_DATABASE: naflmdb
      MYSQL_USER: bbuser
      MYSQL_PASSWORD: *********
      MYSQL_ROOT_PASSWORD: ********
    networks:
      - naflm-net
    restart: always

  naflmweb:
    container_name: naflm-web
    image: bloodbowl_web:latest
    volumes:
      - "/docker/NAFLM-Test/naflm:/var/www/html"
    ports:
      - "8000:80"
    depends_on:
      - naflmdb
    networks:
    - naflm-net
    restart: always

networks:
  naflm-net:

Thanks!!

snotlingorc commented 4 years ago

I was just able to duplicate this on my WAMP stack. php 5.6.40 MySQL 8.0.18 pdf-error

snotlingorc commented 4 years ago

If you use the bb2016 rules, the 'Wizard' was renamed to 'Hireling Sports-Wizard'. In pdf_roster.php replace the 'Wizard' phrase on lines 373, 478, 491 with 'Hireling Sports-Wizard' and that error goes away.

Not sure how to deal with this if you are not using the bb2016 ruleset.

byrnesvictim commented 4 years ago

@algomu Can you try this fix for us please? https://github.com/TheNAF/naflm/tree/PDF-Roster-Wizard-Fix Only file that should be needed to change is naflm/modules/pdf/pdf_roster.php

algomu commented 4 years ago

@algomu Can you try this fix for us please? https://github.com/TheNAF/naflm/tree/PDF-Roster-Wizard-Fix Only file that should be needed to change is naflm/modules/pdf/pdf_roster.php

Same errors after replace pdf_roster.php:

Notice: Undefined index: Wizard in /var/www/html/modules/pdf/pdf_roster.php on line 487 Notice: Undefined property: BB_PDF::$CurPageFormat in /var/www/html/modules/pdf/bb_pdf_class.php on line 370

Need I to run database synchronization?

algomu commented 4 years ago

If you use the bb2016 rules, the 'Wizard' was renamed to 'Hireling Sports-Wizard'. In pdf_roster.php replace the 'Wizard' phrase on lines 373, 478, 491 with 'Hireling Sports-Wizard' and that error goes away.

Not sure how to deal with this if you are not using the bb2016 ruleset.

Seems that one error less with these changes:

Notice: Undefined property: BB_PDF::$CurPageFormat in /var/www/html/modules/pdf/bb_pdf_class.php on line 370

About bb2016 rules, where can I choose activate or deactivate this rules?

byrnesvictim commented 4 years ago

@algomu Can you try this fix for us please? https://github.com/TheNAF/naflm/tree/PDF-Roster-Wizard-Fix Only file that should be needed to change is naflm/modules/pdf/pdf_roster.php

Same errors after replace pdf_roster.php:

Notice: Undefined index: Wizard in /var/www/html/modules/pdf/pdf_roster.php on line 487 Notice: Undefined property: BB_PDF::$CurPageFormat in /var/www/html/modules/pdf/bb_pdf_class.php on line 370

Need I to run database synchronization?

@algomu

I missed the changed needed on line 487, the one it keeps prompting us to do...

I've changed that one now also.

I think with this build BB2016 is mandatory because there was some back end calculation stuff done

algomu commented 4 years ago

@algomu Can you try this fix for us please? https://github.com/TheNAF/naflm/tree/PDF-Roster-Wizard-Fix Only file that should be needed to change is naflm/modules/pdf/pdf_roster.php

Same errors after replace pdf_roster.php: Notice: Undefined index: Wizard in /var/www/html/modules/pdf/pdf_roster.php on line 487 Notice: Undefined property: BB_PDF::$CurPageFormat in /var/www/html/modules/pdf/bb_pdf_class.php on line 370 Need I to run database synchronization?

@algomu

I missed the changed needed on line 487, the one it keeps prompting us to do...

I've changed that one now also.

I think with this build BB2016 is mandatory because there was some back end calculation stuff done

After this last version wizard error disappears: Notice: Undefined property: BB_PDF::$CurPageFormat in /var/www/html/modules/pdf/bb_pdf_class.php on line 370

    if ($isMask) $x = $this->CurPageFormat[1] + 10; // embed hidden, ouside the canvas, was: fwPt //Line 370
    $this->_out(sprintf('q %.2f 0 0 %.2f %.2f %.2f cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']));
    if($link)
        $this->Link($x,$y,$w,$h,$link);

May be that I need to create a new issue for this error?

I can't find how to apply BB2016 or not, I don't understand If I need to modify some parameter in any setting file or is always activated...

snotlingorc commented 4 years ago

I'll see if I can figure out this one:
Notice: Undefined property: BB_PDF::$CurPageFormat in D:\IdeaProjects\naflm\modules\pdf\bb_pdf_class.php on line 370

snotlingorc commented 4 years ago

the fpdf library was updated from 1.6 to 1.82 The new version from the source removed the "CurentPageFormat" attribute. (I do not see the reason for that in the change log - http://www.fpdf.org/) . I am not finding a replacement for that attribute..I think, line 370 of bb_pdf_class.php is not needed and could be commented out.

algomu commented 4 years ago

the fpdf library was updated from 1.6 to 1.82 The new version from the source removed the "CurentPageFormat" attribute. (I do not see the reason for that in the change log - http://www.fpdf.org/) . I am not finding a replacement for that attribute..I think, line 370 of bb_pdf_class.php is not needed and could be commented out.

If I comment line 370 of bb_pdf_class.php works! Thanks to all!!! I will try a new clean installation with all changes...

Thanks again