I recently went to some hosting provider website, registered and so on.
At one moment, I tried to run some functions, with no result at the end.
Then I decided to see phpinfo() page, and I have noticed, that, in certain fields,
there is declared as:
no value
In this case, I was interesed in value of:
**
disable_functions : no value
**
Does that mean, that there is really not declared what functions are disabled, or that field is not showing any value as it is managed to not show value in server configuration?
In example:
Functions like shell_exec, fopen and so on are disabled, but server is configured that way to not show me that? Or it really does not have any value?
no value means php.ini contains no value for that directive. The user who is running the server or php process are disabled to run those functions (shell_exec, fopen) or system calls that those functions invoke.
Related
I am trying to connect my Soffid 3 server with our custom web application named Schrift. I am using а JSON REST Web Services Connector for this purpose. I added REST Web service plugin and then configured an agent with JSON/XML/SOAP Rest webservice type.
Loading of objects is working fine. My REST connector connects to the web service successfully and gets data of the accounts.
The problem is when I am trying to update some data (for example, I am trying to lock an account), nothing happens. And unfortunately I don't know what should be happening. When should REST connector send updated data to the managed system and in which way? I didn't find any log entries saying that REST connector was trying to update an object on managed system. Maybe I did smth wrong or missed something.
I would appreciate for any help. I can post any conf or log details if you need.
Update#1
(I did some investigation after the first answer)
I checked the agent settings: Read only and Manual account creation are set to no
The account was set to unmanaged type, but I succeeded in changing its type to shared and then to single without getting an error. Now it is set to single
The task queue is empty.
Also I've checked that update method is present and update properties are set correctly. updateParams is not set (it means that all attributes should be sent to the managed system).
But when I change status of the account (from Enable to Disable), nothing happens.
In the console log I can see only these lines
14-Sep-2021 13:26:29.708 INFO [BPM-Scheduler:192.168.7.121:1] com.soffid.iam.bpm.job.JobExecutorThread.run No job to execute
When I manually run the task Analize impact for changes on Schrift, Execution log shows
Changes detected for accounts
=============================
NO CHANGE DETECTED
Changes detected for roles
=============================
NO CHANGE DETECTED
Update#2
After many attempts I made some progress. Now when I make some changes in the account, the task named UpdateAccount baklykov#irf.com.ua#Schrift appears, but runs with an error.
At first it was 415 Unsupported Media Type error as I wrote in comments, but now it looks a little different
Throws exception updating object : Extensible object [type = account]
EmployeeEmail: baklykov#irf.com.ua
IsLockedOut: true (log truncated) ...
caused by Unexpected response, Content-Type: null
Update#3
I found out that soffid's request for updating the object was in improper format (all the parameters were passed in the html request instead of putting them in json body)
After researching I found a method's property called Encoding and set it to application/json value.
Now the parameters are passed in json body (that's what I need), but now the problem is that soffid puts all the parameters in json body, including the key parameter by which the object for updating should be determined. My guess this is the reason why the object in the target system is still not updated.
In other words my application expects a request like this:
https://myapp.mysite.com/api/v1/Soffid/Employees?EmployeeEmail=baklykov%40irf.com.ua :
{"EmployeeLastName":"Baklykov","EmployeeFirstName":"Ivan"}
but Soffid sends this:
https://myapp.mysite.com/api/v1/Soffid/Employees:
{"EmployeeLastName":"Baklykov","EmployeeFirstName":"Ivan","EmployeeEmail":"baklykov#irf.com.ua"}
The system should have created a UpdateAccount task in the task queue. Please, verify:
The task engine is in automatic mode. In read-only or manual mode, no task will be created.
If you are updating an account, check the account is not set as unmanaged. In that case, no tasks is created.
Finally, verify the task queue has not held the task up.
Have you checked the engine mode? Look at Main Menu > Administration > Configure Soffid > Integration engine > Smart engine settings
It should be set to automatic.
To figure out the problems in web scenario I need to check values of variables (macros) in some steps. I expect view in Web interface...
Currently log is accessible only from system, but there is an ugly workaround to view variables:
Add step to not existing URL with variable in path, for example:
https://{HOST.DNS}/{some_variable}/{some_other_variable}
server probably return error page, but you can set is as expected in Required status codes
set Required string to an not existing on error page, for example "not existing string"
then in details of web scenario you can see status:
Error: required pattern "not existing string" was not found on https://some.dns/some_variable_value/some_other_variable_value
How can I add a role to a user at the time of log in based on his username. I think it can be accomplished using yii\rbac\PhpManager . I tried something like
$r=new PhpManager;
$r->init();
$r->createRole("1","admin");
$r->save();
$r->assign('1','admin');
where 1 is user id and admin is the intended role.
But I am getting an error
Unknown Method – yii\base\UnknownMethodException
Calling unknown method: yii\rbac\PhpManager::save()
What is the error here? or which is the right method?
Do not call ->save, there is no save function for PHP manager, if you remove $r->save(); it should all work ok I believe.
http://www.yiiframework.com/doc-2.0/yii-rbac-phpmanager.html
In the official docs they never call save() on anything
http://www.yiiframework.com/doc-2.0/guide-security-authorization.html
First time using SQL Server 2008 this morning.
I am trying to find a user defined function that I created. I cannot locate it in the "Programmability>Functions" branch of the object explorer. Here is what that branch looks like:
There do not seem to be any "user defined functions" and I don't know if any of the particular branches should house that. I have been granted database owner rights to the database, so I don't believe it is a permissions issue...
I was able to retrieve the full text of the function using the 'EXEC sp_HelpText 'someUserDefinedFunction'' that was listed in this thread about finding user defined functions. That thread did not provide enough information for me to locate my function in object explorer or edit my function again using SMSS. Please see the full screenshot of my SQL Server 2008 Management Studio instance with the return from the sp_HelpText query for additional context.
The function works just fine when it is called. I retrieved this function from this thread about splitting delimited text.
I am hoping to find a location in the interface that displays all the user defined functions!
There is no "user defined functions" menu in SSMS. All functions except system are user defined. Based on return type you will find your function in "Table-valued", "Scalar-valued", or "Aggregate" (the latest is not really different from "Scalar-valued" in terms of return type though, but it can be used for aggregation). In your case check "Table-valued"
I have installed the sfErrorNotifierPlugin. When both options reportErrors/reportPHPErrors reportPHPWarnings/reportWarnings are set to false, everything is ok. But I want to catch PHP exceptions and warnings to receive E-mails, but then all my tasks fail, including clear-cache. After few hours of tests I'm 100% sure that the problem is with set_exception_handler/set_error_handler.
There's a similar question:
sfErrorNotifierPlugin on symfony task but the author there is having problems with a custom task. In my case, even built-in tasks fail.
I haven't used sfErrorNotifierPlugin, but I have run into 'The “default” context does not exist.' messages before. It happens when a call is made to sfContext::getInstance() and the context simply doesn't exist. I've had this happen a lot from within custom tasks. One solution is to add sfContext::createInstance() before the call to sfContext::getInstance(). This will ensure that a context exists.
There's an interesting blog post on 'Why sfContext::getInstance() is bad' that goes into more detail - http://webmozarts.com/2009/07/01/why-sfcontextgetinstance-is-bad/
Well, the problem could not be solved this way, unfortunately. Using sfErrorNotifierPlugin, I have enabled reporting PHP warning/errors (apart from symfony exceptions) and this resulted in huge problems, e.g. built-in tasks such as clear-cache failed.
The solution I chose was to load the plugin only in non-task mode (project configuration class):
public function setup()
{
$this->enableAllPluginsExcept('sfPropelPlugin');
if ('cli' == php_sapi_name()) $this->disablePlugins('sfErrorNotifierPlugin');
}
WHen a task is executed, everything works normally. When an app is fired from the browser, emails are sent when exception/warning occurs (maybe someone will find it useful).
Arms has explained the problem correctly. But usually context does not exist when executing backend/maintenance tasks on the console. And it is easier if you handle the condition yourself.
Check, if you really need the context?
If you do, what exactly do you need it for?
Sometimes you only want a user to populate a created_by field. You can work around by hard-coding a user ID.
If you want to do something more integrated, create a page (which will have a context) and trigger the task from there.
you can test the existance of the instance before doing something inside a class. Like:
if(sfContext::hasInstance())
$this->microsite_id = sfContext::getInstance()->getUser()->getAttribute('active_microsite');
I've been experiencing the same problem using the plugin sfErrorNotifier.
In my specific case, I noticed a warning was raised:
Warning: ob_start(): function '' not found or invalid function name in /var/www/ncsoft_qa/lib/vendor/symfony/lib/config/sfApplicationConfiguration.class.php on line 155
Notice: ob_start(): failed to create buffer in /var/www/ncsoft_qa/lib/vendor/symfony/lib/config/sfApplicationConfiguration.class.php on line 155
So, checking the file: sfApplicationConfiguration.class.php class, line 155,
I've replaced the ' ' for a null, then the warnings disappears, and also the error!
ob_start(sfConfig::get('sf_compressed') ? 'ob_gzhandler' : ''); bad
ob_start(sfConfig::get('sf_compressed') ? 'ob_gzhandler' : null); good