Maian Script World on Facebook Maian Script World on Twitter Maian Script World - Latest News Maian Script World on YouTube Maian Script World on LinkedIn


Please Read

You are required to register before you can post. This is via a custom verification system. Please post any problems you are encountering here and I`ll do my best to respond as soon as I can. Please note that a reply WILL be posted to all queries, so do not double post. There are no guarantees when a reply will appear but I do my best to answer all within 3/4 days max. Bumping topics won`t make the slightest difference.

IMPORTANT: Posts in English ONLY please, thank you! Any other languages will be ignored and your message deleted.
SEARCH: Use the search option to see if your question has been answered on the forum before. Or check the relevant script docs.
CUSTOMER: If you have purchased a commercial version of any of my software, using the contact option at the licence centre ensures a faster response.
AUTO DELETION: Accounts older than 5 days, with no posts or topics, are automatically deleted. Only register if you are thinking of posting.
PRIVATE MESSAGES: Private messages are currently disabled.
LINKS: Any links posted are 'NOFOLLOW' and will not be picked up by search engines.

You are not logged in.

#1 21-10-2011 18:28:51

magiccardpops
Members
Registered: 28-09-2011
Posts: 37

Crontab for running currency-updater.php

David  -

The currency-updater works great from the admin, and if run via a web browser, but when I set it up to run as a crontab I get the following:

/home/theturk/public_html/magiccardpops/store/currency-updater.php: line 1: ?php: No such file or directory
/home/theturk/public_html/magiccardpops/store/currency-updater.php: line 2: //: is a directory
/home/theturk/public_html/magiccardpops/store/currency-updater.php: line 3: //: is a directory
/home/theturk/public_html/magiccardpops/store/currency-updater.php: line 4: syntax error near unexpected token `('
/home/theturk/public_html/magiccardpops/store/currency-updater.php: line 4: `//   Written & Developed by David Ian Bennett (Maian Script World)'

Does it run successfully as a crontab for you ?  If so, I may be doing something wrong in my crontab setup.  If this is the case I will not waste your time and will figure it out with my hosting service.

- Thanks

Offline

#2 22-10-2011 02:33:09

magiccardpops
Members
Registered: 28-09-2011
Posts: 37

Re: Crontab for running currency-updater.php

David -

Please disregard.  I have it working now.  Sorry for the post.  This is such a great application.  Thanks

Offline

#3 22-10-2011 06:36:24

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,065

Re: Crontab for running currency-updater.php

magiccardpops wrote:

David -

Please disregard.  I have it working now.  Sorry for the post.  This is such a great application.  Thanks

Thank you and I`m glad you got it working. Have a nice weekend.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#4 28-11-2011 12:46:01

duceduc
Members
From: Japan
Registered: 25-05-2010
Posts: 359

Re: Crontab for running currency-updater.php

Can some confirm the currency update works in 2.0.3? It used to work for me running cron but I don't see a change now. I also tried to update it manually in the admin area to no available.

Offline

#5 29-11-2011 00:56:45

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,065

Re: Crontab for running currency-updater.php

Seems ok for me Duc. Are you sure nothing is updating?


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#6 29-11-2011 02:46:37

duceduc
Members
From: Japan
Registered: 25-05-2010
Posts: 359

Re: Crontab for running currency-updater.php

I have noted one of the price now like I should have done in the first place. I will wait another day and see.

Offline

#7 29-11-2011 03:33:47

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,065

Re: Crontab for running currency-updater.php

Ok, no probs.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#8 30-11-2011 03:55:30

magiccardpops
Members
Registered: 28-09-2011
Posts: 37

Re: Crontab for running currency-updater.php

duceduc  -

I have not been able to get the crontab to run ever since I loaded the license.  However, the license is much more of value to me than the currency updater running as a crontab.  Also, I can run the currency updater from admin and it works just fine.  I am running v2.03 .

- magiccardpops

Offline

#9 30-11-2011 09:40:31

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,065

Re: Crontab for running currency-updater.php

There is a workaround in 2.04 for the cron issue.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#10 30-11-2011 10:08:13

duceduc
Members
From: Japan
Registered: 25-05-2010
Posts: 359

Re: Crontab for running currency-updater.php

I've checked again. It is still not updating for me manually or with the cron. Strange.

Offline

#11 30-11-2011 23:39:53

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,065

Re: Crontab for running currency-updater.php

Yep, strange. Anything in your error logs?


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#12 01-12-2011 11:07:23

duceduc
Members
From: Japan
Registered: 25-05-2010
Posts: 359

Re: Crontab for running currency-updater.php

I don't see anything in the error logs.

To manually update the currency rates, I would just need to type this url in the broswer?

This is also how the admin area currency rate is updated as well?


http://mycart.com/currency-updater.php

Ah. I think I have found the issue. When I manually typed that link in, I get a permission denied prompt. How can I fix this?

Last edited by duceduc (01-12-2011 11:13:37)

Offline

#13 01-12-2011 13:58:55

magiccardpops
Members
Registered: 28-09-2011
Posts: 37

Re: Crontab for running currency-updater.php

Just for clarification - when you mean you manually ran it from the admin area did you click on the "Update Currency Conversions" button and it still did not update?

Offline

#14 01-12-2011 15:03:23

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,065

Re: Crontab for running currency-updater.php

Correct. Maybe I should have a separate button on the admin page to avoid confusion.

Thanks magiccardpops. duceduc, not sure about the permissions. What is the exact error?


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#15 01-12-2011 18:02:39

duceduc
Members
From: Japan
Registered: 25-05-2010
Posts: 359

Re: Crontab for running currency-updater.php

Yes, I click on the currency button in the admin area. . It doesn't update.

The error I get says "permission denied". That is all it says.

Offline

#16 01-12-2011 20:58:14

gwp
Members
Registered: 26-05-2009
Posts: 119

Re: Crontab for running currency-updater.php

just to add to this, my site which uses v2.03 seems to work fine. euro was 1.17, i hit "upadte currency conversion" and the rate changed to 1.16. Like i said before, this is a straight full zip upload done about 4 days ago.

Offline

#17 01-12-2011 23:50:54

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,065

Re: Crontab for running currency-updater.php

Thanks gwp. smile


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#18 16-01-2012 00:16:15

pabs11
Members
Registered: 03-08-2009
Posts: 111

Re: Crontab for running currency-updater.php

duceduc wrote:

http://mycart.com/currency-updater.php

And is this supposed to be working in 2.0.4, or is it on the list for 2.0.5 ?

I'm also getting the 'permission denied' page when I use that url.

Is there documentation on using this, btw ?

thanks, paul

Offline

#19 16-01-2012 11:22:59

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,065

Re: Crontab for running currency-updater.php

Looks like I broke the converter. Sorry about that, I`ll get that fixed sometime today.

Paul, see 'Script Usage > System > Currency Converter'


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#20 16-01-2012 11:33:26

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,065

Re: Crontab for running currency-updater.php

Ok, sorry about that. Re-download zip and replace the 'currency-converter.php' file in the store root.

This will be official in 2.05.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#21 17-01-2012 16:54:14

magiccardpops
Members
Registered: 28-09-2011
Posts: 37

Re: Crontab for running currency-updater.php

I am confused as to the problem and the solution in this post.

According to the documentation under Currency Converter:

Maian Cart has a built in currency conversion system. This enables visitors to view prices in their own currencies as well as the default system currency. To access this option in the admin area select 'System>Currency Converter'. Currencies are obtained from the European Central Bank via its daily xml feed.

Only currencies shown in the admin area are supported by this option. Use the checkboxes provided to enable/disable currencies. If you don`t specify any currencies, the currency conversion drop down on your storefront will not appear.

Note that clicking the update button in the admin area also updates the currency rates. To manually update you would need to click this button from time to time or have the system auto update via a cron job/tab.

I can successfully run the "currency conversion system" from the admin area (System>Currency Converter) via the "UPDATE CURRENCIES & RATES" button on the bottom of the page.

However, according to the documentation under Auto Update via Cron Job/Tab:

The easiest way to make sure your currencies are up to date with the latest rates is to have the system automatically update them. This is done by using a Cron Tab or Cron Job. This is an automated task performed by your server via the time specified. For the currency conversion a daily update would be recommended.

And this example is given:

/usr/local/bin/php /home/admin/domains/yourdomain.co.uk/public_html/cart/currency-updater.php
php q /home/admin/domains/yourdomain.co.uk/public_html/cart/currency-updater.php
/usr/local/bin/php q /home/admin/domains/yourdomain.co.uk/public_html/cart/currency-updater.php
cmd /k C:\Windows\php\php.exe "C:\website\currency-updater.php" (Windows)

The file referred to in this example is "currency-updater.php".

This is what I am unsuccessful in running.

I have not been able to run the crontab successfully since the installation of my site license (graciously given by David).

I have tried the different suggestions, "cron.php", etc.

I am currently running v2.04 via the integral update process.  My confusion then is this:

I can run the conversion update successfully via the admin area.  But I cannot make the crontab run successfully.
Is the fix in V2.05 for the crontab or did the conversion via admin area get inadvertently broken after the v2.04 upgrade release.

And, could you explain the uses of "currency-converter.php" vice "currency-updater.php" vice "currencyConverter.php"?

Hope this makes sense.

Thanks David,

-  magiccardpops

Offline

#22 17-01-2012 20:28:22

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,065

Re: Crontab for running currency-updater.php

currency-updater.php is in the root and its the file you run as the crontab. The fix I did should make this run ok in the browser. Running it as a crontab is slightly different. What is the output from the cron when you run it as a cron? You say you are unsuccessful in running it, but what happens? Have the cron output sent to an email, this will give you any server errors.

The admin update is separate. Thats just a manual run of the same process, but with different files.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#23 18-01-2012 04:01:27

magiccardpops
Members
Registered: 28-09-2011
Posts: 37

Re: Crontab for running currency-updater.php

"currency-updater.php" runs fine from my browser.
When running as a crontab it produces the following:

ionCube ERROR (11)
The following encoding error has occured while running this software:
The "licence.lic" file within this installation cannot run on this server.
Licence file is encoded for a different domain.  For help and support you should first see if a solution is in the software documentation.
docs/
Alternatively, try the support forums at Maian Script World.
For ionCube & ionCube loader help, try the ionCube forums.

Offline

#24 18-01-2012 08:12:41

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,065

Re: Crontab for running currency-updater.php

And adding the full url to the 'currency-updater.php' file in the 'cron.php' file and running the 'cron.php' file as the cron doesn`t work?


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#25 18-01-2012 15:26:49

magiccardpops
Members
Registered: 28-09-2011
Posts: 37

Re: Crontab for running currency-updater.php

Voila! -  Made changes as you mentioned and it now works.
I had done that before to no avail but evidently I must have done something incorrectly.
Thank you very much David.

- magiccardpops

Offline

Board footer

2Checkout.com is an authorized reseller of goods and services provided by Maian Script World.© 2003-2013 David Ian Bennett. All Rights Reserved | Forum: FluxBB

Privacy Policy | Refund Policy