Solved

Not adding images to database not creating pages

Posted on 2014-12-04
9
95 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Suggested Solutions

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

756 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