Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Upload Images and send email in Tor


FunnyPocketBook

Recommended Posts

Posted

Hello

 

I've just setup osCommerce on my server and now I've tried to create a new product and make a test purchase.

Now I have two problems: Since my server is running on the Tor network, I cannot upload any pictures that are located on my home computer and I can't choose an image that is not on my computer. That means that I cannot upload any pictures (for the store logo I just replaced the file in the catalog folder), so my products will not have any pictures.
Is there any way to upload a file that is not located on the computer? 

 

The second problem is that I do not receive any mails that are sent from osCommerce. I've checked the email settings in the admin panel (server is linux based) but they were fine. So I do not receive an email if someone has ordered something amd if someone wants to create a new account, he will not receive a confirmation email either. Has anyone a solution for both problems?

 

 

Posted

Is this "server" a commercially operated hosting service, or are you trying to run it on your own PC? It's a very bad idea to try running a website, much less an ecommerce site, on your own server, as hackers will eat you alive. Security matters need a lot of expertise that most amateurs simply don't have the skills or time for. Hackers will be constantly probing your site looking for vulnerabilities, especially if they think they can make some money off it. Commercial hosting should avoid all the problems you're having with Tor restrictions.

Posted

It is a hosting service, I'm not running it on my own computer.

 

I don't think that it is a commercially operated hosting service because they blocked the function to send emails through php. This store/website won't sell anything though as it is for a school project...

 

Do you know where the product files are stored? maybe I can change the picture in the file itself

Posted

If you are blocked from uploading images from your PC to this "Tor" server, I wouldn't be surprised if you're going to have a lot of problems. Is this provided by your school for your project (and you're required to use it)? If not, you might want to look for other hosting. If it's just for a class project and not a real store where real money is changing hands and real products being shipped; almost anything will do.

 

Are you able to use FTP to upload image files to your server? Is it only through osC (a PHP program) that it can't upload? If so, check your PHP settings for maximum upload file size, etc. to see if you're being limited there. You might have to put some settings in a php.ini or .htaccess file to allow larger files. Free hosting services often have severe restrictions on resources you can use (such as uploading files and using mail). If you can upload small files but not large ones, make sure you have reduced your images to their final size (using GIMP or Photoshop, etc.) and aren't trying to upload huge megapixel images when all you're going to use is a few hundred pixels.

Posted

The server is not provided by my school, I paid for it (when I looked for a host I was too stupid to check if it has the functionalities I need)

I can upload whatever I want when I use a FTP client (WinSCP)

 

Yes, it's only through osC that it can't upload. Where do I usually find that php.ini? Or do I have to create it? I have tried uploading small files (if you consider 5KB small)

I'll ask my hoster if they blocked file uploading, too

 

Edit: just found the location of the php.ini, it's in /etc/php5/apache2/php.ini

Problem: Cannot access that file as it is only accessible from the hoster

Posted

Looks like I can't edit my post.

 

So I found in the phpinfo that the upload_max_filesize has a local value of 30M and a master value of 2M

The post_max_filesize has a local value of 30M and a master value of 8M

 

I don't know much about it, but to me it sounds like I am able to upload files that are less than 30MB?

 

Posted

There will usually be a "master" php.ini file (or perhaps another name) with settings for everyone, that you can't modify. Most hosts allow you to create your own php.ini file, with the settings that you want to override. On very old systems, you may even have to put these settings into the .htaccess file via phpflag and phpvalue commands. You'll have to ask your host for the details on how to change PHP settings via a php.ini or similar file. Sometimes you'll have to add an entry to .htaccess telling PHP where to find the php.ini file. They should also be able to tell you what values are allowed for upload file sizes, etc., or you can ask them if your proposed values are OK.

 

You could try uploading a very small image file (even a dummy file with a .gif extension) and see if it works. If it does, your permissions are OK and you have the ability to upload files, including images. The next step is to find out if your host imposes a size limit (most do) and what settings you will need to change (there has been much discussion on this forum, if you search). Be reasonable with the images you're uploading -- there's no sense in uploading a 15 megapixel image if it's only going to be displayed at about 0.5 megapixel. Reduce your images to their final size before uploading.

Posted

Thank you @@MrPhil

 

I checked those files and also asked the host. He told me that it is only possible to upload files via an SFTP client, so I cannot really use osCommerce... The host blocked many php functions for security reasons

Posted

That's an absurd restriction for a host to impose. How is any serious application such as ecommerce or a forum supposed to function without the ability to upload files? Any other ecommerce package is going to have the same problem as osC. Anyway, I'm sure it can be worked around to manually SFTP the image files up to the server (in their own directory), and then modify the osC code to look in that directory rather than trying to upload from a PC (using PHP's file upload calls). It may be as simple as disabling the file upload, and find where osC moves the uploaded file from its temporary directory and name to its permanent home, and adjusting that move to use the place you manually SFTP'd to. Maybe someone has already done such a thing and can offer advice on how to best do it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...