Typo3 Extbase plugin Schelduler - scheduled-tasks

Is there any tutorial or example how to call extbase action from Schelduler?
I found something about CommandControler, but it did not work.

Hope this helps (although in German)
http://www.derhansen.de/2012/06/seit-extbase-4.html

.Make sure that in your LocalConfiguration.php are right credentials to DB.
It is important if you want to run script with CLI. Like: sudo php ./typo3/cli_dispatch.phpsh scheduler
Otherways even if you put "echo" or "var_dump" in YourCommandController it will be not ouputed. The script stops by trying to get user info from DB.

Related

Datahandler (TCEmain) in cli_dispatch.phpsh (Extbase Command)

is it possible to to use Datahander Scripts (TCEmain) in a Extbase Command Controller via cli_dispatch.phpsh? I tried but i got no result - no error message and no entry in the tables.
Perhaps there is no backend available in cli scripts ...
Thanks!
You find the documentation for using DataHandler in CLI scripts here.
CLI scripts use the backend user _cli_ (should be created automatically). You can take a look at the source of \TYPO3\CMS\Backend\Console\CliRequestHandler::boot if you're interested in how it works.
You can check the public instance variable $dataHandler->errorLog for any errors, DataHandler won't output anything else.
Mind that cli_dispatch.phpsh & Co. are deprecated, you can already use Symfony Commands in TYPO3 CMS 8.

Update HTTP Handler - Request Restrictions - Mapping Tab via Powershell or APPCMD

In IIS 7.5, I am trying to update the request restrictions for the handler mappings. I know you can use appcmd or ps and edit the verbs or access, but I want to be able to run a command that will "Invoke handler only if request is mapped to: FILE".
I found this article in technet, which basically will allow me to edit everything except the tab that I need to change.
https://technet.microsoft.com/en-us/library/cc730969(v=ws.10).aspx
For example
appcmd set config /section:handlers /[name=' ImageCopyrightHandler '].verb:GET,HEAD
I've tried pretty much every command I can come up with but none of them seem to work.
This is what I am trying to edit for each handler mapping.
I'd hate to have to do each one manually, since it has to be done on 3 servers are there are 35 isapi module handers in each one. Any ideas?
The attribute you're looking for is resourceType with a value of File
You sir are awesome.
For anyone interested here is the full string that I'm using for each module.
appcmd set config /section:handlers /[name='PageHandlerFactory-ISAPI-4.0_32bit'].resourceType:File

Magento: Add New Product Form not displaying in Admin

I've just installed the magento and when I tried to add new product from admin,But now product form is not being displaying. I can see the page like this
what should I do? Please, I searched through Google, but, couldn't find any appropriate answer.
Have you already tried to clear cache and cookies? also some times you have to do it on the shell on /path/to/my/magento/folder/var/cache just run "rm -fr *".
If that doesn't work you can check you files ownership and permissions (the http service has to have the write write permissions an ownership on the files and folder - http://www.magentocommerce.com/wiki/groups/227/resetting_file_permissions).
Hope that works for you.
You could try enabling display_errors in index.php i.e.
ini_set('display_errors', 1);
Also you could enable logs in your backend, and check for errors in system.log and exception.log
As Magneto's back end makes heavy use of prototype.js, check your console for errors .

Syslog with Phalcon on CentOS

Anyone out there working with Phalcon on CentOS?
I'm trying to use Syslog from Phalcon\Logger\Adapter\Syslog but can't find where can I see the output. AFAIK, CentOS send syslog messages to '/var/log/messages', but I've looked at almost all files in '/var/log' and found nothing.
Currently I'm constructring the Syslog this way:
$logger = new SyslogAdapter(null);
Is there any setting that I'm missing on Phalcon or my OS?
Looking at https://github.com/phalcon/cphalcon/blob/master/ext/logger/adapter/syslog.c#L125 and https://github.com/phalcon/cphalcon/blob/master/ext/logger/adapter/syslog.c#L185 it seems that Phalcon proxies all calls to the default syslog.
I'd sugget to goggle "centos php syslog" and make it work in pure php without Phalcon. It feels this is the keystone to the problem.
Update
Just looking over your piece of code, the actual class is called Syslog, not SyslogAdapter, unless you do use Phalcon\Logger\Adapter\Syslog as SyslogAdapter;, which I can't tell from the code above :) If syslog via php works, then most likely the issue is with your code. I just tried the below, it works as expected:
$logger = new Syslog(null);
$logger->log('test', 'hello world');
// 27/04/2014 19:15:24.922 php[24030]: hello world

Setting moodle online

Good day everyone, I have been trying to put my moodle online so pcs from internet can access it, but until now, no luck at all. (Im using moodle 2.3.2 on Windows Server 2008 and IIS 7).
I tried to configure the moodle file config.php, setting the directive $CFG -> wwwroot = "my-public-ip/moodle". Then, when I access to moodel from the server, I can access it by "http://my-public-ip/moodle", when I try to access via localhost, it sends an error which it is OK.
But the funny part comes when I try to access the server from an outside pc. When I type "http://my-public-ip/moodle" it simply cant "see" the configuration I made to the config.php file (it says: This server cna only be accessed via localhost/moodle) it looks like the outside pcs are either ignoring it, or searching for another configuration file. I dont know what the hell is happening, this is very odd.
Any ideas?? tnx!!!
Change the following file:
lib-->setuplib.php
Redirect ($CFG->wwwroot, get_string('wwwrootmismatch', 'error', $CFG->wwwroot), 3);
for
Redirect ($CFG->wwwroot, get_string('wwwrootmismatch', 'error', $CFG->wwwroot), 0);
I realise this is an old question, but it's also worth pointing out you may need to also run the database search and replace script, at:
http://my-public-ip/moodle/admin/tool/replace/index.php
as referenced in Method 2 here.
This is required if you change the name of the site once you have installed it. If you were already using Moodle under "localhost", then there will be a number of references to the old localhost address stored in the database that need to be updated to the new IP-based address.
It might be because the http:// part is missing?
$CFG->wwwroot = "my-public-ip/moodle"
should be
$CFG->wwwroot = "http://my-public-ip/moodle"