Post by robgtheengineer » Thu Oct 16, 2008 9:15 pm

I moved the htaccess and got the following result clicking your link:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@123picturethis.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.


Posts

Joined
Thu Oct 02, 2008 9:20 am

Post by robgtheengineer » Thu Oct 16, 2008 9:17 pm

Error log is not changed, but i did see this in it:

DBD::mysql::st execute failed: No database selected at /home/capemb/public_html/cgi-bin/opencart_file_upload.cgi line 53., referer: http://123picturethis.com/index.php?con ... ile_upload?


Posts

Joined
Thu Oct 02, 2008 9:20 am

Post by randomfactor » Thu Oct 16, 2008 10:41 pm

robgtheengineer wrote: Error log is not changed, but i did see this in it:

DBD::mysql::st execute failed: No database selected at /home/capemb/public_html/cgi-bin/opencart_file_upload.cgi line 53., referer: http://123picturethis.com/index.php?con ... ile_upload?
OK, that's progress.

Check the values of the settings starting at line 29 in /home/capemb/public_html/cgi-bin/opencart_file_upload.cgi:

Code: Select all

my $dbdsn = "DBI:mysql:database=Your_Database:host=localhost";
my $dblogin = "Your_Db_User";
my $dbpassword = "Your_Db_Password";
You have to modify "Your_Database", "localhost", "Your_Db_User", and "Your_Db_Password".

Are the values correct?

New member

Posts

Joined
Mon Jul 07, 2008 1:43 am


Post by robgtheengineer » Fri Oct 17, 2008 3:08 am

DBI was not enabled on my server. I enabeled it and am still getting the error.


Posts

Joined
Thu Oct 02, 2008 9:20 am

Post by robgtheengineer » Fri Oct 17, 2008 3:36 am

Check out my site again, I made progess, still not working though.


Posts

Joined
Thu Oct 02, 2008 9:20 am

Post by randomfactor » Fri Oct 17, 2008 4:32 am

robgtheengineer wrote: Check out my site again, I made progess, still not working though.
It would make it easier if you would include a short explanation of what is not working.  I went thru the order process on your site and got all the way through checkout until the "Place Order" confirmation.  When I tried to place the order, I received this error:

Code: Select all

Warning: rename(/home/capemb/public_html/cust_upload/ade73d349531b13418a0e3a78dc92406/Water_lilies_300d
pi.jpg,/home/capemb/public_html/cust_upload/order-48F79-F0D5F-FFA89/Water_lilies_300dpi.jpg) [function.rename
]: Permission denied in /home/capemb/public_html/catalog/extension/product_option/upload.php on line 133

Warning: Cannot modify header information - headers already sent by (output started at /home/capemb/public_htm
l/catalog/extension/product_option/upload.php:133) in /home/capemb/public_html/library/environment/response.php
 on line 23
Does this directory exist on your server now: /home/capemb/public_html/cust_upload/order-48F79-F0D5F-FFA89

It's odd that it can create the session directory under cust_upload, but not the order directory.
Last edited by randomfactor on Fri Oct 17, 2008 4:34 am, edited 1 time in total.

New member

Posts

Joined
Mon Jul 07, 2008 1:43 am


Post by Qphoria » Fri Oct 17, 2008 5:05 am

Googled that rename permission thing and found this..

http://www.codingforums.com/showthread.php?t=149133

not sure if it helps

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by randomfactor » Fri Oct 17, 2008 1:55 pm

robgtheengineer wrote: Check out my site again, I made progess, still not working though.
I've been working on this for a while and I think I've discovered the problem.  The version of jQuery packaged with v0.7.9 is not the latest.  A newer version seems to correct the problem.  The most amazing part of this whole thing is that firefox ran just fine with the older version of jQuery.

Anyway, the solution is to replace .../catalog/javascript/ajax/jquery.js with the file in the zip attached to this message.
Last edited by randomfactor on Fri Oct 17, 2008 10:28 pm, edited 1 time in total.

New member

Posts

Joined
Mon Jul 07, 2008 1:43 am


Post by bruce » Fri Oct 17, 2008 2:02 pm

jquery lives at admin\javascript\ajax\jquery.js as well in OpenCart

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by randomfactor » Fri Oct 17, 2008 2:45 pm

randomfactor wrote:

Code: Select all

Warning: rename(/home/capemb/public_html/cust_upload/ade73d349531b13418a0e3a78dc92406/Water_lilies_300d
pi.jpg,/home/capemb/public_html/cust_upload/order-48F79-F0D5F-FFA89/Water_lilies_300dpi.jpg) [function.rename
]: Permission denied in /home/capemb/public_html/catalog/extension/product_option/upload.php on line 133

Warning: Cannot modify header information - headers already sent by (output started at /home/capemb/public_htm
l/catalog/extension/product_option/upload.php:133) in /home/capemb/public_html/library/environment/response.php
 on line 23
I think that the reason your site gets this error and mine does not has to do with sticky bits on directories.  Of course, I can't see what the values of the access permissions are on your site, but it would explain the error if the owner of the server process isn't also the owner of the file being moved (renamed).

So, I think the solution would be to set umask down when creating directories under the cust_upload directory.  I'll give that a try.

New member

Posts

Joined
Mon Jul 07, 2008 1:43 am


Post by Qphoria » Fri Oct 17, 2008 7:20 pm

OH
MY
GAWD  ;D

updated jquery is planned as part of the next build when 0.7.9 gets finalized. :)

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by robgtheengineer » Fri Oct 17, 2008 7:53 pm

My site is working great now, thank you for all the support!  I will post a list of the problems I had and the solutions later, thanks again!


Posts

Joined
Thu Oct 02, 2008 9:20 am

Post by randomfactor » Fri Oct 17, 2008 10:30 pm

Qphoria wrote: OH
MY
GAWD  ;D
There is a pretty good chance that I over-expressed myself there.  Sorry.

New member

Posts

Joined
Mon Jul 07, 2008 1:43 am


Post by bruce » Sat Oct 18, 2008 6:38 pm

nah, I think you have expressed the "aha" moment of revelation perfectly  ;)

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by randomfactor » Mon Oct 20, 2008 12:49 am

A patch release is available for the File Upload contribution.

It is too large (288K) to attach to this message, so I have made it available at http://home.comcast.net/~randomfactor/f ... 081019.zip.

This patch corrects the following problems:
  • Error when adding item with no options to cart
  • Error when copying image file from session directory to order directory and directory sticky bit is set
  • Stall when Url alias setting is used
  • Stall when uploading with Internet Explorer (jquery.js version)
  • Updated installation instructions
If you install this patch over a prior release, follow the instructions to customize the opencart_file_upload.cgi script and copy it to the cgi-bin directory with correct access permissions.

New member

Posts

Joined
Mon Jul 07, 2008 1:43 am


Post by lildaveycross » Tue Nov 11, 2008 1:06 pm

Okay, so after messing with this for too long, I've decided to ask for help.

I seem to be having problems with the cust_upload folder. No matter where I put it (open cart main directory, root folder, etc), with or without the .htaccess file, and even if I CHMOD it to 777, I get an internal server 500 error when uploading a photo.

I know that it's the cust_upload folder that's causing the problem, because if I change my directory settings in opencart_file_upload.cgi to

my $opencart_upload_dir = "cust_upload";

...then the upload works by creating a cust_upload folder directly in the cgi-bin folder, and putting the file there. The problem with this is that I don't really want the cust_upload folder to be in my cgi-bin, AND when I do it this way the "Image Preview" doesn't work.

here's my test site
http://elementalshop.com/printing/index ... oduct_id=4

Any ideas?

Thanks

Newbie

Posts

Joined
Tue Nov 11, 2008 5:36 am

Post by randomfactor » Tue Nov 11, 2008 10:58 pm

There is a bit of complexity to do with the location of the cust_upload directory because two systems (PHP and Perl cgi-bin) must agree on its location.

On the PHP side, the location is determined by making cust_upload a sibling directory to your DIR_DOWNLOAD directory as determined by your top-level config.php file.  The path is computed by replacing the string "download" with "cust_upload".  You wouldn't have the string "download" more than once in your path string, would you?

On the Perl side, the location is set in the opencard_file_upload.cgi script that you edit.  Please provide an absolute file path in the $opencart_upload_dir setting at line 27:

Code: Select all

# set these values for your site
my $opencart_upload_dir = "/srv/www/htdocs/Your_Store/cust_upload";
my $max_upload = 12582912; # set this to max file size in bytes
my $dbdsn = "DBI:mysql:database=Your_Database:host=localhost";
my $dblogin = "Your_Db_User";
my $dbpassword = "Your_Db_Password";
What environment are you running on?  I haven't attempted to run the file upload extension on windows yet.  That's an experiment for another day.

New member

Posts

Joined
Mon Jul 07, 2008 1:43 am


Post by lildaveycross » Wed Nov 12, 2008 4:32 am

Thanks for the quick reply, let's see...
randomfactor wrote: You wouldn't have the string "download" more than once in your path string, would you?
Nope.
randomfactor wrote: Please provide an absolute file path in the $opencart_upload_dir setting at line 27:
Absolute paths do not work. Neither do relative paths for that matter. I get the Internal Server 500 error regardless if it's something like "http://elementalshop.com/printing/cust_upload/" or something like this "/public_html/elementalshop/printing/cust_upload"...The only way I can get it to upload is if I just put "cust_upload" which puts a folder inside the cgi-bin.

randomfactor wrote: What environment are you running on?  I haven't attempted to run the file upload extension on windows yet.  That's an experiment for another day.
Operating system Linux
Apache version 2.2.9 (Unix)
PHP version         5.2.6
MySQL version 5.0.45
Perl                    5.8.8


...let me know if you come up with anything. I'll keep messing with it.

Thanks!

Newbie

Posts

Joined
Tue Nov 11, 2008 5:36 am

Post by randomfactor » Wed Nov 12, 2008 8:54 am

lildaveycross wrote:
Absolute paths do not work. Neither do relative paths for that matter. I get the Internal Server 500 error regardless if it's something like "http://elementalshop.com/printing/cust_upload/" or something like this "/public_html/elementalshop/printing/cust_upload"...The only way I can get it to upload is if I just put "cust_upload" which puts a folder inside the cgi-bin.
It seems that you and I share a difference of definition for "absolute path".  I am not referring to an HTTP Url.  Rather, I am referring to the linux file path to your opencart directory on the host server.  Each environment may be different, but one way that might help to identify the absolute path is to sift through the values returned from http://elementalshop.com/printing/admin ... erver_info (Same as the Admin > Configuration > Server Info menu item of your opencart administrator view.)

In my environment, the value for absolute path is given in the _ENV["DOCUMENT_ROOT"] variable (well towards the bottom of the page).  On my testing server, the value is /srv/www/htdocs/store, so the absolute path I put in opencart_file_upload.cgi is /srv/www/htdocs/store/cust_upload.

Does this make sense?
Last edited by randomfactor on Wed Nov 12, 2008 9:49 am, edited 1 time in total.

New member

Posts

Joined
Mon Jul 07, 2008 1:43 am


Post by lildaveycross » Wed Nov 12, 2008 10:04 am

THAT WORKED PERFECTLY!

You were right. I was thinking Absolute URL, not Absolute Path

Thank you so much.

Newbie

Posts

Joined
Tue Nov 11, 2008 5:36 am
Who is online

Users browsing this forum: No registered users and 2 guests