Solved

Not adding images to database not creating pages

Posted on 2014-12-04
9
96 Views
Last Modified: 2014-12-09
Im having a problem with my small control panel where you add images to mysql then it creates a page for the images and data. It creates a entry in the database but it will not add the images. Below are some log files maybe someone could tell me why. I thought it was a permission sort of thing but I cant figure where. I change from one server where it was working to another where its causing this problem. I just cant figure out what the problem is.

/var/www/vhosts/my.com/httpdocs/admin/admin_model_photo_detail.php on
line 42, referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Notice: Undefined
index: fileIcon in
/var/www/vhosts/my.com/httpdocs/admin/admin_model_photo_detail.php on
line 58, referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Notice: Undefined
index: fileIcon in
/var/www/vhosts/my.com/httpdocs/admin/admin_model_photo_detail.php on
line 59, referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Notice: Undefined
variable: HTTP_POST_VARS in
/var/www/vhosts/my.com/httpdocs/admin/admin_model_photo_detail.php on
line 106, referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagecreatefrompng(../model_images/watermark.png)
[function.imagecreatefrompng]: failed to open stream: No such file or directory
in /var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 125,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagealphablending(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 126,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagesavealpha(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 127,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagesx(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 131,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagesy(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 132,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagecopy(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 135,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagedestroy(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 138,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagesx(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 42,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagesy(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 43,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning: Division
by zero in /var/www/vhosts/my.com/httpdocs/include/resizeimage.php on
line 53, referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image
dimensions in /var/www/vhosts/my.com/httpdocs/include/resizeimage.php on
line 83, referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagecopyresampled(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 84,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagejpeg(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 85,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagedestroy(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 46,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagesx(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 42,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagesy(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 43,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning: Division
by zero in /var/www/vhosts/my.com/httpdocs/include/resizeimage.php on
line 53, referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image
dimensions in /var/www/vhosts/my.com/httpdocs/include/resizeimage.php on
line 83, referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagecopyresampled(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 84,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagejpeg(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 85,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagedestroy(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 46,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagesx(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 42,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagesy(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 43,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning: Division
by zero in /var/www/vhosts/my.com/httpdocs/include/resizeimage.php on
line 53, referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image
dimensions in /var/www/vhosts/my.com/httpdocs/include/resizeimage.php on
line 83, referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagecopyresampled(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 84,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagejpeg(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 85,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Warning:
imagedestroy(): supplied argument is not a valid Image resource in
/var/www/vhosts/my.com/httpdocs/include/resizeimage.php on line 46,
referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
[Tue Dec 02 20:23:17 2014] [client 61.12.45.30] PHP Notice: Undefined
variable: HTTP_POST_VARS in
/var/www/vhosts/my.com/httpdocs/admin/admin_model_photo_detail.php on
line 536, referer:
http://my.com/admin/admin_model_photo_detail.php?model_id=C5073898114
0
Comment
Question by:smphil
[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
  • 4
  • 3
  • 2
9 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40481774
Looks like you were using an old version of PHP and you have now moved to a modern version where things like $HTTP_POST_VARS have been deprecated.
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 40482040
You never want to add images to a database.  The reasons are many and complicated, but they will eventually hinder performance and backup.  Instead, store your images in the server file system and put the image URLs in the database.  If you want to tell us in a little more detail how this process is expected to work (at a high level - nothing technical, just what you have for input and what you want for output) we can probably suggest a reliable design pattern.
0
 
LVL 1

Author Comment

by:smphil
ID: 40484634
GARY
I think your correct the person who made the program is very behind the times what version of php do you think they are using to run this program. I guess I could could just run that version to get this thing working for the time being.
0
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)

 
LVL 110

Expert Comment

by:Ray Paseur
ID: 40484637
Don't downgrade PHP.  You really, really, really want to refactor this code. To learn why, follow this link to the search results.  Old versions of PHP have as many holes as Swiss cheese.
https://www.google.com/search?q=php+security+vulnerabilities
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40484663
Do you have access to the php.ini file - if you do and you are on PHP v5.3 or lower then you can reenable things like HTTP_POST_VARS with

    register_long_arrays = On

Which will probably fix the other errors in the process.
0
 
LVL 1

Author Comment

by:smphil
ID: 40485667
Gary I am using V5.2.17  SHOULD I BE ABLE to change the things using the php.ini with that version.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40485674
Yes
0
 
LVL 1

Author Comment

by:smphil
ID: 40485677
Gary so I should try turning on the register_long_arrays ?
0
 
LVL 58

Expert Comment

by:Gary
ID: 40485679
Yes
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Creating and Managing Databases with phpMyAdmin in cPanel.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

734 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