Romey-Rome Posted January 11, 2004 Share Posted January 11, 2004 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 Quote Link to comment Share on other sites More sharing options...
Pharkie Posted January 14, 2004 Share Posted January 14, 2004 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. Quote Link to comment Share on other sites More sharing options...
Romey-Rome Posted January 14, 2004 Author Share Posted January 14, 2004 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 Quote Link to comment Share on other sites More sharing options...
reasonable Posted January 14, 2004 Share Posted January 14, 2004 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, Quote Ron If we knew it all we wouldn't be here would we? Link to comment Share on other sites More sharing options...
Romey-Rome Posted January 14, 2004 Author Share Posted January 14, 2004 Yeh, I just tryed and it said my register_globals are off, so I contacted my host about it... Thanks for the info Roman Quote Link to comment Share on other sites More sharing options...
Romey-Rome Posted January 14, 2004 Author Share Posted January 14, 2004 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 Quote Link to comment Share on other sites More sharing options...
reasonable Posted January 15, 2004 Share Posted January 15, 2004 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 Quote Ron If we knew it all we wouldn't be here would we? Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.