Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easy populate thought...


Romey-Rome

Recommended Posts

A tech support person from my webhost told me that I should run easypopulate in PHP binary mode via SSH to do away with timeouts and what not...

 

Can someone shyne some light on this? Is it possible? How would you specify the files? I'm very curious about this.

 

Thanks

Roman

Link to comment
Share on other sites

It makes a certain kind of sense. You need the CGI PHP as opposed to the one you normally use. You'll run it like a Perl program.

 

There must be stuff on the net about running PHP from command-line.

 

Thinking about it tho - you prolly don't need to. Easypopulate can split your big file into little chunks. Avoid the timeout that way.

Link to comment
Share on other sites

Wll what I do now is take my 16,000 line file and asplit it into 6 parts, upload them to the temp dir, and insert them into the db one at a time, which still takes me a good hour. I was just looking for a one shot deal. It'd be nice if EasyPopulate would let you specify more than 1 filename and then just run them in sequence.

 

Thanks

Roman

Link to comment
Share on other sites

Looked at this since I can't export the files. Log in from your shell account and type in php -v this will tell you if php has cgi support. I couldn't run EP from the command line since it tells me the register globals is turned off. That's an issue I need to address with my host. To test it php -a /path/easypopulate.php runs the script. Don't forget the -a as it tells it to run in interactive mode. And since I know nothing about php itself check at www.php.net for the full command line syntax.

 

Regards,

Ron

If we knew it all we wouldn't be here would we?

Link to comment
Share on other sites

Here's what my host said:

 

Having to use register globals nowadays usually represents dangerous scripting habits since it presents a potential security risk, since PHP 4.2 it has been turned off by default. However I understand some well-known scripts do require register globals so we can usually accomodate this.

 

To enable it to work from the shell, add the following to your script.

ini_set("register_globals", 1)

 

To enable register globals to work when called via the webserver then we will need to add a special flag to your virtualhost config, if you would like us to do this just let us know

 

Where do I add ini_set("register_globals", 1) ?

 

Thanks

Roman

Link to comment
Share on other sites

Well I added it to the first line of the script right after the <?php and it got rid of the register global errors. But it started a whole list of parse errors. I commented out the first one which was the version number line and then it made it to the temp dir path line. So I figure it's back to the php book to figure it out unless someone else picks up on this and can help with either the command line options or the script itself.

 

Regards

Ron

If we knew it all we wouldn't be here would we?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...