[Solved]: Browser attempts to directly open upload.php or db_input.php after upload [Solved]: Browser attempts to directly open upload.php or db_input.php after upload
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Solved]: Browser attempts to directly open upload.php or db_input.php after upload

Started by 3rnsT, June 13, 2009, 12:18:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

3rnsT

Today I hit a curious problem with uploading files. I'm hoping to get some feedback on it to help solve the issue.

Symptoms:
- After uploading, the browser gives the message that either upload.php or db_input.php cannot be opened. In the case of Firefox it even displays a download popup for either file.
- The choice for the php file seems to be at random
- The error occurs consistently for some pictures while others work fine
- The error does not seem to be related to file size or image dimensions

Things checked:
- Upped script memory size and execution time in .htaccess
- Upped file upload size in .htaccess
- Checked file permissions on /album and subfolders (all 777)
- Enabled logging, but no entries appear in the error log in the admin tools section
- Browsers: Opera 9.64 (linux and windows), Firefox 3.0.11 (linux and windows), Internet Explorer 7 (windows)
- Tested on different pc's / internet connections

Site details:
http://ninelives.darkstargamers.com
login: test
pass: test
Sample image that gives the error: http://ninelives.darkstargamers.com/albums/upload/screenshot.jpg
Debug log before image-submit: http://ninelives.darkstargamers.com/albums/upload/debug.log

Thanks in advance for your time!

Joachim Müller

Upgrade. You're running cpg1.4.14, while the most recent stable release currently is cpg1.4.24, so you're running ten versions behind. That might fix the issues you have as well.
Uploads work as expected btw. - see http://ninelives.darkstargamers.com/displayimage.php?pos=-15

Nibbler

There should be an error message in the server error log, whether you can get at that depends on your hosting arrangements. Verify the memory limit is what you think it is on Coppermine's phpinfo page.

3rnsT

Good suggestions.

I had forgot to mention that I had the same issue with 1.4.24. I've upgraded back to this release, but still getting the same error.
I have also checked the errorlogs, but i'm not getting any errors, except for two warnings during installation:

PHP Warning: fopen() expects at least 2 parameters, 1 given in /chroot/home/ninelive/ninelives.darkstargamers.com/html/install.php on line 570, referer: http://ninelives.darkstargamers.com/install.php
PHP Warning: fpassthru(): supplied argument is not a valid stream resource in /chroot/home/ninelive/ninelives.darkstargamers.com/html/install.php on line 570, referer: http://ninelives.darkstargamers.com/install.php
PHP Warning: fopen() expects at least 2 parameters, 1 given in /chroot/home/ninelive/ninelives.darkstargamers.com/html/install.php on line 565, referer: http://ninelives.darkstargamers.com/install.php
PHP Warning: fpassthru(): supplied argument is not a valid stream resource in /chroot/home/ninelive/ninelives.darkstargamers.com/html/install.php on line 565, referer: http://ninelives.darkstargamers.com/install.php


I've also tried the SILLY_SAFE_MODE option as described in the sticky, but with no result.

@joachim: Images can be uploaded, but seem to bug out in some cases (see for example the image I linked).

Nibbler

On my test gallery that image requires 14M of memory to process, so check that the memory_limit is at least 16M in phpinfo.

Joe Carver

As you can see I had no problems uploading from here with Chrome. Creating an album and uploading/deleting  .gif and .jpg files went just fine.

The last pic. uploaded into your test album could not be deleted by me as I "lost" ownership once it was uploaded, nor could I use crop/rotate on the other pics. Since I'm not sure if either might be related to how you have set the user/album permissions this might mean nothing.

So, other than a picture I have left for you to delete, the only suggestion from experience is to try switching between GD and ImageMagick. I also know from experience that intermittent problems can be very trying on the patience.....Good Luck!

3rnsT

Thanks everyone, that solved the issue. While I did set the memory limit bounds to 30M in .htaccess, I had forgotten to check if the settings really were accepted. Obviously, they weren't. I checked it out with my host, they fiddled a setting and it's working now.

Thanks for helping solve this riddle!