Skip to content

Conversation

@xepozz
Copy link
Contributor

@xepozz xepozz commented May 17, 2019

Using exec is a very very bad idea!

@schmunk42
Copy link
Member

Why is exec in general a bad idea?

The issue with file_get_contents and using Yii and PHP for this instead of the native CLI command is that you might run into problems with large files (several 100s of MBs) and multiple commands.

@xepozz
Copy link
Contributor Author

xepozz commented Jul 1, 2019

Because a mysql server may installed on remote server.
You may write drivers for it

@schmunk42
Copy link
Member

The only way I could think about adding this feature is via a global flag and an if/else statement.

CC: @handcode @eluhr WDYT?

@handcode
Copy link
Member

If mysql server is installed on remote i can see no problem. This is our default setup ;-)
But of course exec 'mysql' from PHP can be a problem if the mysql client is not installed locally.

Apart from that i also think file_get_contents with large dumps is not a good idea.

So I agree with @schmunk42 : it can only be implemented as a configurable alternative to execCommand.

Copy link
Member

@schmunk42 schmunk42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes should be moved to a separate file, so the developer can choose which one to use.

@xepozz
Copy link
Contributor Author

xepozz commented Jul 12, 2020

I'm ready to complete this PR 😄
#27

@xepozz xepozz closed this Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants