Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Question about import.php,


Guest

Recommended Posts

Posted

Hello,

I am having a situation with the import.php. I am hoping someone can through out an idea. I am importing like 35 meg files, but for some reason it will only cap at 2meg files. So I have to break these monsters down. Any suggestions are appreciated....

 

 

Sincerely,

:oops:

Posted

You could change the file limit and timeout in php.ini (or with php_values in .htaccess). The file limit from php.ini is where you are getting your 2 MB limit.

 

Good luck,

Matt

Posted

Matt,

Thank you for your help, I am very new to learning this OSCom personally. So I'm very green to PHP. Exactly hwo would I change that in this .htaccess file.

 

# $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $

#

# This is used with Apache WebServers

#

# For this to work, you must include the parameter 'Options' to

# the AllowOverride configuration

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

# AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf file)

 

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

 

<IfModule mod_setenvif.c>

<IfDefine SSL>

SetEnvIf User-Agent ".*MSIE.*"

nokeepalive ssl-unclean-shutdown

downgrade-1.0 force-response-1.0

</IfDefine>

</IfModule>

 

# Fix certain PHP values

# (commented out by default to prevent errors occuring on certain

# servers)

 

<IfModule mod_php4.c>

php_value session.auto_start 0

# php_value session.use_trans_sid 0

# php_value register_globals 1

</IfModule>

 

 

 

 

Signed,

Ijust dont want to screw it up, LOL

Posted

# Fix certain PHP values

# (commented out by default to prevent errors occuring on certain

# servers)

php_value upload_max_filesize 40M

php_value max_execution_time 600

<IfModule mod_php4.c> 

php_value session.auto_start 0 

# php_value session.use_trans_sid 0 

# php_value register_globals 1 

</IfModule>

I'm not sure if I found the right timeout configuration key or not. With timeout, I'm going off a comment that someone made on the forums. Essentially, they said that they had set their upload size high but were still having problems because something timed out.

 

This thread discusses this max_execution_time in connection with Easy Populate. This thread is relevant, if you want to set the max_execution_time in the script itself.

 

Don't forget to comment these out once you are done with your uploads. The defaults are probably better practice for normal use.

 

Hth,

Matt

Posted

Doodr,

Im green to PHP but I will forever owe you for your help, and I never forget.

 

 

Thank you,

Posted

Matt,

I thank you so much for everything I am the only one doing this and dont want to mess it up so I go to the pros until I feel comfortable with my knowledge. I am trying to redirect to an outsite http:// for all my iamges except the ones on my sites itself. I was wondering if you would look at this line of the config.php and give me advise on an if/then statement basically redirecting for the inmage if it does not find it in my images folder then to my vendors sites which are http://. I would appreciate any ideas, Im afraid to mess anything up so I dont really want to try this one either. But this is my last question I promise LOL. And thanks again...

 

 

 

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('DIR_WS_CATALOG', '/'); // absolute path required

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

Posted

You couldn't do it there, since it doesn't know what image you want yet. The place that you would need to put that check is where DIR_WS_IMAGES is being used, not where it is defined. I would think that the tep_image function would have enough info to do this:

  function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {

   if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {

     return false;

   }



   if (!file_exists($src)) {

     $src = /*something*/ . $src;

   }



// alt is added to the img tag even if it is null to prevent browsers from outputting

The only problem is that I'm not sure that it would have enough info to determine the something that you need. If not, you might have to replace it in each tep_image call:

tep_image(DIR_WS_IMAGES . $image_name....)

which you would replace with

tep_image((file_exists(DIR_WS_IMAGES . $image_name) ? (DIR_WS_IMAGES . $image_name) : ($vendor_image_dir . $image_name))....)

Both $image_name and the .... would be something else in the actual call. Also, you would have to assign a value to $vendor_image_dir somewhere along the way.

 

Hth,

Matt

Posted

Matt,

Awesome on that code, I do however have one question being very green at this. Where is the world would I find the tep_images anyway in the php files? Like I said I am just now learning this and really dont want to screw up all the work I have so far done.

 

 

Thanks,

Posted

They are scattered all over. The main files would be index.php and product_info.php, but you also have various of the boxes files and the product listing file.

 

Hth,

Matt

  • 2 weeks later...
Posted

Matt,

Hey in your config.php, take out the images/ and it redirects to http:. Then you put your main images in the root directory.. Sweet solution but BW hog to run it this way. Because of pulling from two sites.... Thanks for everything...

Archived

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

×
×
  • Create New...