r/PHPhelp • u/DarkmedMB • Apr 15 '25
Computer VS Computer
I finished project PHP All data is transferred seamlessly between the site and the database. By the way, use XAMPP Everything is smooth and works efficiently, when I transferred the same project to another computer of the same brand, same model and same specifications, the project worked but the only thing that did not work is the images do not go to the database,For example, all product information goes to the database except for the images.
Thank you.
1
Upvotes
10
u/bkdotcom Apr 15 '25 edited Apr 16 '25
You're going to have to debug the shiit out of it.
also: are you storing images in a database? That's generally a bad idea. store meta data in the db. filepath, dimensions, filesize, image-type, last-modified, etc
4
u/Big-Dragonfly-3700 Apr 16 '25
Define -
Is this part of form and form processing code? If so and if you cannot determine the cause of the problem yourself, you will need to post all the form and form processing code needed to reproduce the problem, less any database connection credentials, for anyone here to be able to help. You also need to tell us the file size of an attempted image/file upload that doesn't work, and what a phpinfo() statement shows for the upload_max_filesize setting.
3
u/MateusAzevedo Apr 16 '25
Vague description and no code provided, no one here will be able to work with that, but guess random things.
First thing first: enable full error reporting to see the errors PHP found. If you're lucky, PHP will tell what's wrong.
If not, then you need to learn the basic idea of debugging, as linked by colshrapnel. Problem with image upload can happen anywhere from the actual submit/upload to database interaction or file persistence.
Note: computer brand/model has no relation to the problem at all. What matters is you have the same programming environment installed on both.
2
u/Angelsoho Apr 16 '25
File/directory permissions? What protocol are you using to transfer the images?
1
u/acid2lake Apr 16 '25
Kind of vague: the images are not going to the database, but could be lot of issues, folder not writable, images path are different on the other machine etc, brand hardware etc has nothing to do with your project, and like other said, without code or more context we are just shooting the air