giandonatoinverso / PHP-Dynamic-Qr-code

PHP Dynamic Qr code is a script that allows the generation and saving of dynamic and static QR codes
MIT License
243 stars 73 forks source link

dynamic QR code gives address http://0.0.0.0:80 #71

Closed R0yk3 closed 8 months ago

R0yk3 commented 8 months ago

Hello, url with 0.0.0.0 is not going to work. I'm using the docker version setup with portainer using the compose.yml

I have a cloudflare tunnel to the docker container and i can reach it via the URL. If i change the http://0.0.0.0:80 etc.. with myURL https it does work, so the unique identifier is created but the correct URL is not created in the QR code.

What did i miss? or how can i correct this.

1

giandonatoinverso commented 8 months ago

Can you attach here your qrcode please

R0yk3 commented 8 months ago

Can you attach here your qrcode please

See above. my URL is qr.sieliakus.nl Also i deleted superuser after creating a new superuser, but now i have this message at the sample data:

`

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dynamic_qrcodes.php:24) in /var/www/html/lib/Users/Users.php on line 130 --

`

I you want i can create you as user so you can see it for yourself?

giandonatoinverso commented 8 months ago

Yes please create an user for me thanks

R0yk3 commented 8 months ago

Yes please create an user for me thanks

giandonatoinverso login and passwd

I don't see the posibility for a direct message, please change you pw after logging in. :)

giandonatoinverso commented 8 months ago

I solved it by inserting a new environment variable into the docker compose file which you will need to modify with your full hostname.

This allows you to have the same code for the self-hosted version and docker version.

Let me know if there are any problems. The files involved are also config.php and environment.php so you will have to delete and recreate the config volume (which among other things I removed from docker compose leaving only saved_qrcode)

R0yk3 commented 8 months ago

Hi, I completely deleted the stack and volumes and redeployed it with the new compose file. But it stil points to http://0.0.0.0 --> only in preview. This is the QR code generated 1 This one is downoaded image This one is copied from the preview screen.

You can login with standard login and passwd. I will delete and redeploy all.

giandonatoinverso commented 8 months ago

Hi, I tried to log in and download the qrcode. The same redirect link comes out. I think everything is ok!

P.S. Thank you so much for the donation!

R0yk3 commented 8 months ago

The download is ok, but the preview on the site is not the same. That is with http://0.0.0.0

kr Roy

Op wo 18 okt 2023 om 11:50 schreef Giandonato Inverso < @.***>:

Hi, I tried to log in and download the qrcode. The same redirect link comes out. I think everything is ok!

P.S. Thank you so much for the donation!

— Reply to this email directly, view it on GitHub https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code/issues/71#issuecomment-1768087571, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYNNM6DUVNLHW6YD43MYNDX76Q4TAVCNFSM6AAAAAA6DQC32KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRYGA4DONJXGE . You are receiving this because you authored the thread.Message ID: @.***>

giandonatoinverso commented 8 months ago

What you mean for “preview on the site” ?

R0yk3 commented 8 months ago

image

If you scan these they goto http://0.0.0.0

giandonatoinverso commented 8 months ago

It's strange because i logged in your account and scanned those qrcodes.

My iphone gave me the correct url and then I went redirected to your linkedin account

R0yk3 commented 8 months ago

That is really Strange, above screenshot also gives you the correct link?

Sorry, pictures in cache. refreshed and it is correct. Everything perfect now. Hope you have time to work on the enhancements those look really promising!

KR Roy

giandonatoinverso commented 8 months ago

The first screenshot give me the correct link and the second one give me 0.0.0.0:80 but when i downloaded the qrcode from you site the scanned link was correct.

i tried also with a new stack in my pc with custom BASE_URL variable and both qrcode preview and qrcode image were correct