Solved

mysql table with missing image field names

Posted on 2013-06-06
12
682 Views
Last Modified: 2013-06-10
I have a domain on the 1and1 server.

Two days ago I replaced some image field names because the original names were missing from the mysql database table.
After reinserting the image field names in the table I checked and found these were showing normally via the internet.

I checked today and those images are not showing on the internet and in fact the field names are missing again in the dbase table.

I checked the images are still in the /Images folder and they are there.

There are several hundred images listed in the table.

Two new records have been added recently and they both have missing (empty) imagefield entries.

The fields that are missing have a default image I wonder if this is doing something. The field missing image names are empty.

Has anyone any ideas what may be happening and how this problem can be solved?

Thank you

John Hardy
0
Comment
Question by:johnhardy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 58

Expert Comment

by:Julian Hansen
ID: 39225131
Difficult without knowing more information.

I have several domains hosted at 1and1 where we have multiple tables storing image names - no problems.

The only issue we have had with images is the 1and1 server has the apache module for finding the closest name if the name requested does not match a file - so we were getting the wrong image showing because the real image had a spelling mistake and apache was finding another image as the closest match.

If data is dissappearing from your DB you need to check

a) Who has access to the db
b) Check all scripts that access the db and make sure none of them are causing the problem.
0
 

Author Comment

by:johnhardy
ID: 39225155
Thanks Julian
As far as I know I am the only person having access to the db

Previously in my own investigations some images were appearing incorrectly.
On checking I found these new images had no permission and all sorts of images were  appearing I corrected the permisssion and the correct images appeared.

Whilst updating the permissions a warning script kept appearing  Images folder as follows.
Script
https://my.1and1.co.uk/xml/config/htdocs-controlpanel-app-webresource/script/engineng.js:57
1and1 said they wouls get the engineers to correct this?
Any thoughts?
0
 
LVL 58

Accepted Solution

by:
Julian Hansen earned 300 total points
ID: 39225214
Sounds like a 1and1 problem you should take it up with them.

Bottom line data dissappears out of a database when something takes it out.

Possible culprits (in order of most likely to least likely)

1. Your code
2. Someone with access to 1and1 control panel
3. Malicious code
4. A 1and1 error

I would raise with 1and1 support
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

Author Comment

by:johnhardy
ID: 39225228
Thanks julian
I have raised with 1and1 and will let you know what if anything happens.
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39225340
Please post a link to the URL that shows a "missing" image.  We need to see the generated HTML and the symptom as it exists in situ.

Please post the CREATE TABLE statement(s) that are in play.

Do you have access to phpMyAdmin so you can inspect the tables of the data base?
0
 

Author Comment

by:johnhardy
ID: 39225397
Hello Ray
url with missing images
https://my.1and1.co.uk/xml/config/htdocs-controlpanel-app-webresource/script/engineng.js:57

Not sure how to get CREATE TABLE statements

I used phpmyadmin on the 1and1.co.uk server  to re apply the image field names before they vanished again
0
 
LVL 58

Expert Comment

by:Julian Hansen
ID: 39225406
That URL won't help us it is behind a login ....
0
 

Author Comment

by:johnhardy
ID: 39225481
Thanks Ray

but I cannot get you behind the login can I?
0
 
LVL 58

Expert Comment

by:Julian Hansen
ID: 39225781
Not without giving us the login credentials ... (don't)
0
 
LVL 110

Assisted Solution

by:Ray Paseur
Ray Paseur earned 150 total points
ID: 39226587
You can learn about SHOW CREATE TABLE here:
http://dev.mysql.com/doc/refman/5.0/en/show-create-table.html

You can learn more about how to use PHP and MySQL here (it's a good investment of both money and time):
http://www.amazon.com/PHP-MySQL-Web-Development-Edition/dp/0321833899

If there is no public-facing URL that will illustrate the problem, please consider setting one up.  We are experts but not mind readers and when we are made to guess at the symptoms, it reduces the likelihood that we will diagnose the problem.

Thanks and regards, ~Ray
0
 
LVL 15

Assisted Solution

by:Jagadishwor Dulal
Jagadishwor Dulal earned 50 total points
ID: 39227815
Two days ago I replaced some image field names because the original names were missing from the mysql database table.
After reinserting the image field names in the table I checked and found these were showing normally via the internet.

I checked today and those images are not showing on the internet and in fact the field names are missing again in the dbase table.

If your fields is right and image file is also there then check your image extension be sure that is .jpg or .JPG small letter or capital.
0
 

Author Closing Comment

by:johnhardy
ID: 39233995
Thanks everyone for being so helpful.

Eventually I found my error.
My code, Julians suggestion to rectify.

I was trying to update images where no images existed on that page.

All seems stable now so hopefully that solves the problem
Regards

John
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question