[Resolved] Some PHP functions not working in Litespeed PHP

Status
Not open for further replies.
#1
I am using the REST API for my magento store.API post/get responses are working if it's under normal php packages but if we go with Litespeed php, API post/get methods are not working.

here is the REST API code snippet not working when we go with Litespeed server and it's PHP but its working fine in Normal apache and PHP.
PHP:
$controller = new $controller_name;
$action_name = strtolower($request->method);
$response_str = call_user_func_array(array($controller, $action_name),
Please refer the screenshot for more info.

Please let me the solution ASAP
 

Attachments

Last edited by a moderator:

mistwang

LiteSpeed Staff
#2
It could because _SERVER["PATH_INFO"] has been populated to different values.
please create phpinfo page under /rest/ directory, then compare the result of
Code:
http://...../rest/phpinfo.php/orderstatus/100001621/shipped/......
under lsphp and Apache php. see if any differences in the _SERVER[] value.
 
Last edited by a moderator:
#3
i can't use the phpinfo.php like you have suggested because all the function calling done through index.php file. so i have attached the lsphp info and apache php info along this ticket so please review and let me know what could be the problem for that.

Thanks
 

Attachments

mistwang

LiteSpeed Staff
#4
You Apache and LiteSpeed PHP setup does not match, PHP version is different, the compile options are different.

When you check the phpinfo.php page just add those REST parameters. compare the SERVER[] variables.
like
Code:
http://...../phpinfo.php/orderstatus/100001621/shipped/...
 
Last edited by a moderator:
#5
Actually i have compiled the lsphp version to next level means that (5.4.15) but still i couldn't get this work and this doesn't seems to server PATH issues because when print some parameter in that link it works but in LSPHP the following code snippet doesn't work
PHP:
$controller = new $controller_name;
  $action_name = strtolower($request->method);
  $response_str = call_user_func_array(array($controller, $action_name), array($request));
but the same code snippet working fine in apache php. so what could be the reason for above mentioned code was not working in lsphp?
 
Last edited by a moderator:

mistwang

LiteSpeed Staff
#6
I think you should print out the parameters passed to call_user_func_array(), if the value of member is not as expected, need to find out why.

Can you create a simple test script for us to test?
 

mistwang

LiteSpeed Staff
#8
The key is that lsphp need to exactly match Apache's PHP, module configuration wise. Need to comparing phpinfo output, add missing modules, match runtime configurations.
 
Status
Not open for further replies.
Top