angular-filemanager icon indicating copy to clipboard operation
angular-filemanager copied to clipboard

Need help to run code locally

Open VIPINSAINI17 opened this issue 8 years ago • 14 comments

Hello ,

This is best fit for my requirements , However I am not able to run this code locally. I need your help to setup locally.

Thanks in Advance . Vipin

VIPINSAINI17 avatar Jan 10 '17 03:01 VIPINSAINI17

Hi @VIPINSAINI17,

I created a bundle which should work out-of-the-box, also with short instructions and some common questions and answers for you: bundle-php-local

Can you try it and let me know how it works?

durasj avatar Feb 19 '17 21:02 durasj

Hi @durasj,

I still cannot make it work, error: 'Function not Implemented'.

kindly help if possible thanks

varungpt avatar Mar 04 '17 14:03 varungpt

Hi @varungpt,

can you please tell me what is your setup? I.e. what web server are you running and anything else that can help me. Because otherwise, I'm afraid I can't help you from what you wrote.

durasj avatar Mar 04 '17 14:03 durasj

@durasj , I am using Ubuntu 16.04 (installed PHP and Apache), I can see index.html page on visiting localhost but it is showing error mentioned above.

varungpt avatar Mar 04 '17 14:03 varungpt

@varungpt can you please try whether creating index.php with

<?php phpinfo();

as content and visiting it in the browser will give you usual PHP info page?

durasj avatar Mar 04 '17 14:03 durasj

@durasj PFA the output. phpinfo.pdf

varungpt avatar Mar 04 '17 15:03 varungpt

@varungpt thanks, looks good. I will try it on Ubuntu. I'm not running the Apache server there, but that shouldn't be a problem. Will let you know.

durasj avatar Mar 04 '17 17:03 durasj

@varungpt looks like the Apache was the issue there. I made some changes and created a new bundle.

Please take a look at it and let me know whether it works.

durasj avatar Mar 04 '17 18:03 durasj

@durasj still not working, it is showing error: "Error 500 - Bridge response error, please check the API docs or this ajax response", and response is empty 500 error.

varungpt avatar Mar 05 '17 02:03 varungpt

@varungpt check your apache error log. If there will be error about utf encode function not being defined, make sure you have the php-xml extension.

durasj avatar Mar 05 '17 07:03 durasj

@durasj installing php-xml helped and now it is working fine. Thank you very much for the help.

varungpt avatar Mar 05 '17 09:03 varungpt

Hi I have the same issue. I am using a Docker image of php7 with apache and even if I install php-xml I still have the issue. 'Function not Implemented' It happens with the first POST (action list) I will try with php-fpm but I don't understand what is the real problem. How can I check that my php-xml is active and working properly ?

AshDevFr avatar Apr 10 '17 03:04 AshDevFr

@durasj I may have found the issue. https://github.com/joni2back/angular-filemanager/blob/master/bridges/php-local/LocalBridge/Rest.php#L153

Shouldn't it be a AND (&&) instead of a OR (||) ?

AshDevFr avatar Apr 10 '17 04:04 AshDevFr

Hi @AshDevFr , yeah, that's how it was before. Also on two more lines below. Would you be so kind and try it and then create a PR? Otherwise, I will do so by the end of the week.

Regarding the debugging, the best thing you can always do is to check your PHP error logs. In the case of php-xml there would be error about utf encode function not being defined. But that shouldn't be a problem now, since it's no longer used if you are on the latest version of the bundle.

The issue @varungpt experienced on the Apache was the path, if I remember correctly, which I changed in the config on the client side (index.html).

durasj avatar Apr 10 '17 06:04 durasj