how do i avoid exec()
Permalink
I uploaded my add-on package.
Screen said,
'exec("lha e ken_all.lzh")' on line 11 in xxxxx/controllers/dashboard/xxxxx/upload.php
"lha" is a Japanese popular file archive tool command, it likes zip/unzip
I want to execute on concrete5. How should I make code?
Screen said,
'exec("lha e ken_all.lzh")' on line 11 in xxxxx/controllers/dashboard/xxxxx/upload.php
"lha" is a Japanese popular file archive tool command, it likes zip/unzip
I want to execute on concrete5. How should I make code?
Is there any lha binding for PHP instead?
No, It is only linux command.
If a php binding is not available and lha is absolutely necessary, an exemption can be granted.
A more important question is: How can you be sure lha is available on the web host? whether through exec or through a php binding.
A more important question is: How can you be sure lha is available on the web host? whether through exec or through a php binding.
Lha command install by myself to my server.
I want to execute by exec() etc. as shell.
It can execute by shell and can get file, it is very good.
However, when I uploaded this package, i met that message.
I want to execute by exec() etc. as shell.
It can execute by shell and can get file, it is very good.
However, when I uploaded this package, i met that message.
For a marketplace addon, the requirement for lha to be installed on the server will need to be made very very clear on the marketplace and docs pages. We wouldn't want sites installing an addon that subsequently fails because lha is not installed on their server.
This is irrespective of whether exec or a php binding is used to interface to lha.
With such precautions in place, the PRB may grant an exemption to the automated test if there is no other solution other than using exec().
For the PRB you would need to justify:
- That there was no alternative to exec().
- Why lha rather than a more universally supported format such as zip.
- If lha, is it in addition to zip or instead of zip?
- What happens to sites that do not have lha available?
This is irrespective of whether exec or a php binding is used to interface to lha.
With such precautions in place, the PRB may grant an exemption to the automated test if there is no other solution other than using exec().
For the PRB you would need to justify:
- That there was no alternative to exec().
- Why lha rather than a more universally supported format such as zip.
- If lha, is it in addition to zip or instead of zip?
- What happens to sites that do not have lha available?
Well, the main point is that
1. that package would only work on Linux
2. and only if you install manually the command.
Two arguments to make that one bleeding edge to me.
Beside that, we can grant an exception if needed.
1. that package would only work on Linux
2. and only if you install manually the command.
Two arguments to make that one bleeding edge to me.
Beside that, we can grant an exception if needed.
ok! I will give up to use.
How do I use zip/unzip on concrete5?
How do I use zip/unzip on concrete5?
Thank you very much.
I want to know next.
After unziped file that is .csv, I want to insert to the database.
How do I read csv file on concrete5?
I want to know next.
After unziped file that is .csv, I want to insert to the database.
How do I read csv file on concrete5?
See
http://php.net/manual/en/function.fgetcsv.php...
To use that on a file, you may need an exception to the automated tests as the tests expect use of the c5 file helper.
http://php.net/manual/en/function.fgetcsv.php...
To use that on a file, you may need an exception to the automated tests as the tests expect use of the c5 file helper.
I want to use helper where url on specification can I see?