PDA

View Full Version : osticket does not fetch eMails


Dirk27
12-16-2007, 04:32 AM
Hello,
i checked the settings from the other posting "Can't get POP3 fetch to work".
I checked everything, but i can not receive an eMails in the Ticket Area of the Staff Panel.???
Account datas are also correct, but it seems, that osticket will not fetch them from the server. When i try to manual make /api/cron.php via browser, i get that i have not enough rights to see the page. CHMOD is 777.
Has anybody an idea?

Do i need to make an cronjob on my server or is it not required when i use pop3 fetch in osticket? It is not very clear written in the installation instructions.???

Also, i can put all datas, also incorrect ones in the pop3 Account Details Form, they will be saved, no check with pop3 Account if the datas are correct???

Regards
Dirk

isaBERLIN
12-16-2007, 08:22 AM
You culd enable cron to only run on staff aktivity, but i would regard to setup
a cronjob using crontab ...
how else could that work ?
PHP can't just call scripts cause it should ;)

*/2 * * * * root php5-cgi /home/www/web1/html/ticketsupport/api/cron.php
works fine with me ;)

Dirk27
12-16-2007, 09:05 AM
können wir deutsch reden? (ISABERLIN)???
I can not open cron.php in my browser. Not enough rights, so i think, Cronjob will also not work???
I create cronjob with plesk and the command gives me failure:
/bin/sh: php5-cgi: command not found

And what does the API and Pass Phrase mean? Do i have to put something in here?

When i browse manual the cron.php with a firefox browser, i get a white page with "77" on it ???

Dirk

isaBERLIN
12-16-2007, 08:27 PM
http://www.isaberlin.de/replyenglish.png
[Same as above]

http://www.isaberlin.de/replygerman.png
du kannst die optiion aktivieren, dass cron läuft wennjemand vom "Staff" eine aktion macht (refresh, pagewechsel etc).
Aber am sinnvollsten ist es einen Cronjob in !crontab! einzurichten
(also direkt im Server indem du "crontab -e" als befehl in SSH verwendest.)
PHP kann ja net einfach ne Datei aufrufen regelmäßig nur weil es sinn ergibt.
PHP kann viel, aber net denken ;)

Wenn du es manuell im browser öffnest kommt ein fehler, da der apache server kein zugriff auf das emailprogramm hat !
*/2 * * * * root php5-cgi /home/www/web1/html/ticketsupport/api/cron.php
damit läuft es bei mir super. nur den Pfad musst du natürlich anpassen (sowohl für deine PHP version als auch deine cron.php location)

Dirk27
12-16-2007, 09:07 PM
Danke Schön!
Now i get this message:
Could not open input file: /srv/www/vhosts/xxx/subdomains/support/httpdocs/api/cron.php

Naturally "xxx" replaced the domain name.
???
So i can deactivate all fetch functions and pop3 User Datas in the admin Panel and use only the cronjob, when it work?

Dirk

isaBERLIN
12-16-2007, 09:47 PM
http://www.isaberlin.de/replyenglish.png
[not given]

http://www.isaberlin.de/replygerman.png
Nein.
Im user CP muss alles drin stehen denn das ist ja blos der an aus schalter
der funktionen die von cron.php aufgerufen werden.
was im ACP nicht aktiviert ist wird von cron auch nicht gemacht !

Und bei der fehlermeldung ist der pfad einfach falsch ;)

Dirk27
12-16-2007, 09:56 PM
was meinst Du mit der Pfad ist falsch?
Ich habe Suse 10.1-64bit drauf. Der Pfad kann ich genauso mit WinSCP verfolgen. Wie soll der Pfad denn lauten? Oder hab ich jetzt nen Knoten drin?

Danke Dirk

Mark Harris
12-16-2007, 09:59 PM
Dirk, do you have IMAP require encrypted passwords/authentication? This was my problem!

Dirk27
12-16-2007, 10:16 PM
i can not find that in Plesk. There is only "SMTP Authorization required" active.
Dirk

Mark Harris
12-16-2007, 10:50 PM
Hmm, it would depend on your hosting provider then. You may need to ask them if they require encryption on their IMAP server.

Dirk27
12-16-2007, 11:02 PM
but why IMAP? i think it is POP3? Or do i have to create an IMAP eMail Adress?

Mark Harris
12-17-2007, 12:01 AM
it uses IMAP to connect, not pop3.

Dirk27
12-17-2007, 12:12 AM
It is a root Server, so i have full access.
Where can i find this to check if it is activated or not?

Thank you and Regards
Dirk

Mark Harris
12-17-2007, 12:26 AM
/etc/c-client.cf

I accept the risk
set disable-plaintext nil


You need "I accept the risk" on the first line.

Dirk27
12-17-2007, 01:00 AM
I put the 2 lines on the top of the file.
Still does not work! Do i have to put something in the API Section of the Admin Panel?

Mark Harris
12-17-2007, 01:22 AM
try calling the file from commandline now?


php cron.php

Dirk27
12-17-2007, 01:52 AM
when i do: /opt/php52/bin/php5 /srv/www/vhosts/xxx/subdomains/support/httpdocs/api/cron.php
in shell, there is no error, but also no emails in ticket system...

when i make: php5 /srv/www/vhosts/xxx/subdomains/support/httpdocs/api/cron.php
i get:
PHP Warning: Cannot load module 'SQLite' because required module 'pdo' is not loaded in Unknown on line 0

It is crazy...

I have no idea what the problem is:-(
Dirk

Dirk27
12-17-2007, 06:00 AM
and when i try to use pipe with .qmail i get failure notice email back with:
/bin/sh: true
: command not found

Dirk27
12-17-2007, 08:50 AM
ISABerlin: Ich glaub mit dem Cronjob in Plesk anlegen funktioniert deshalb nicht, weil nicht die ausreichenden Rechte vorhanden sind. root kann den Cronjob nicht anlegen. Kannst DU mir sagen wie ich den Cronjob über die Shell anlegen kann?
Danke Dirk

isaBERLIN
12-17-2007, 08:56 AM
http://www.isaberlin.de/replyenglish.png
[not given]

http://www.isaberlin.de/replygerman.png
Darum sagte ich ja schon die ganze zeit :
anlegen über den befehl "crontab -e"
dann öffnet sich ein editor in dem du die zeile einträgst.
dann den cronjob speichern und fertig.

Dirk27
12-17-2007, 09:40 AM
und mit welcher Taste speicher ich?
Wenn ich crontab -e eingebe kann ich noch nichts eingeben...
Sorry, bin da nicht so fit.
Danke Vielmals
Dirk

tohelp
12-20-2007, 04:07 PM
Hi,

wenn ich mal meinen Senf dazu geben darf. Speichern mit Taste ESC drücken, dann :w! oder ZZ (zweimal in Großbuchstaben). Denke es ist dann der VI Editor auf dem Server. Wäre jetzt meine Idee.

Cu
Jörg Peter

ehv
12-23-2007, 03:54 PM
Hello all,

My "cron-hell" is this...

/home/xx/public_html/api/cron.php: line 1: ?php: No such file or directory
/home/xx/public_html/api/cron.php: line 2: /_rvdynamicaddon: Permission denied
/home/xx/public_html/api/cron.php: line 3: cron.php: command not found
/home/xx/public_html/api/cron.php: line 5: syntax error near unexpected token `('
/home/xx/public_html/api/cron.php: line 5: ` File to handle cron job calls (local and remote).'

I have no own webserver so I have a rented one where I can run my own cron-jobs.

As I see it my cron-jobs can only run .cgi scripts. .php is just not workin...

any suggestions?


regards
Ed

spaycegirl
01-02-2008, 07:26 AM
Ed,

As you've speculated, looks like your cron is not reading php. My guess is that you need to enter the appropriate php shell path. You may want to post your cronjob entry so we can see what you have.

Below is one way I can get an error like yours on my server:
*/5 * * * * /pathtoinstallation/support/api/cron.php

When I use this entry I get the same error as you've posted above. The cron.php file is not being parsed as php but just as a text file. So your cron is just reading each line looking for an appropriate command.

Below if I give the cron.php the appropriate directive, it will execute as expected:

*/5 * * * * /usr/local/bin/php /pathtoinstallation/support/api/cron.php

In the example above, I've included the absolute path to php (highlighted in green). There are a few other ways to do this but this is pretty easy and you don't have to modify any osticket files.

Now it's important to note that your server may have a different path for php. In that case, you can contact your host administrator for additional details.

I hope that helps.

Best Regards,
sg

peter
01-02-2008, 01:42 PM
For users having trouble with cron setup via api, I would recommend upgrading to RC2. Auto cron is now fixed. When enabled cron is called once every 3 minutes for each staff session. i.e staff activity spawns osTicket cron call.