Re: Currency Update (Automatic)
Normally you should have some kind of access to server, such as cpanel, it should allow you to set up cron yourself.
Otherwise, there are websites out there offer free cronjobs, that can be a temporary solution before you find a better solution.
55usd is certainly a rip-off, maybe they just dodnt want to do it, so they just throw in a high price? :)
Re: Currency Update (Automatic)
You could add "pseudo-cron" to your site. Though my recommendation would also be to switch to a host who lets yor properly control your environment.
Re: Currency Update (Automatic)
Thanks Kuroi, and Drbyte.
I checked with my hosting company and they definitely don't allow me to set my own cron jobs. I checked my console and theres no provision for it.
My hosting company charges about $65 a year for hosting which is pretty good. I think I'd be worse of financially switching hosts. It would make more sense to pay the $55 and forget about it.
However I've had a look at the free cron jobs sites, and a quick look at psuedo-cron. The free cron jobs sites look pretty shifty, so I might give psuedo-cron ago. That looks very interesting, and would probably work best. I could set it up to run every time someone landed on my index page. I'll give it a try once I research it properly.
Re: Currency Update (Automatic)
I get the following error when i try and run the file manually. Anyone know why i might get this error.
Quote:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/delights/public_html/store/currency_update.php on line 63
preg_match('/(.+),(\w{3}),([0-9.]+),([0-9.]+)/i', implode('', $page), $match); if (sizeof($match) > 0) { return $match[3]; } else { return false; } } function quote_xe_currency($to, $from = DEFAULT_CURRENCY) { $page = file('http://www.xe.net/ucc/convert.cgi?Amount=1&From=' . $from . '&To=' . $to); $match = array(); preg_match('/[0-9.]+\s*' . $from . '\s*=\s*([0-9.]+)\s*' . $to . '/', implode('', $page), $match); if (sizeof($match) > 0) { return $match[1]; } else { return false; } } ?>h[3]; } else { return false; } } // // Function for currency lookup at XE // function quote_xe_currency($to, $from = DEFAULT_CURRENCY) { $page = file('http://www.xe.net/ucc/convert.cgi?Amount=1&From=' . $from . '&To=' . $to); $match = array(); preg_match('/[0-9.]+\s*' . $from . '\s*=\s*([0-9.]+)\s*' . $to . '/', implode('', $page), $match); if (sizeof($match) > 0) { return $match[1]; } else { return false; } } ?>
Re: Currency Update (Automatic)
Quote:
Originally Posted by
Delights
I get the following error when i try and run the file manually. Anyone know why i might get this error.
It seems it was a bad install, i re-loaded the file and it is working now.
Re: Currency Update (Automatic)
The file runs and all that, but it is still saying last update was a day ago, it should be saying today.
Re: Currency Update (Automatic)
Could someone look at this please?
I have asked my host to set up a Cron Job on the above software.
It did not work, so I asked them to test it.
This was there reply:
Hi,
The problem lays with some pretty poor coding in the script. Firstly it used:
require_once($location.'includes/configure.php');
require_once($location.'includes/database_tables.php');
which caused the following error:
PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required '../includes/configure.php' (include_path='.:/php/includes:/usr/share/php') in /var/www/html/currency_update_curled.php on line 26
and so I changed those lines to read:
require_once('includes/configure.php');
require_once('includes/database_tables.php');
and then it gave the following error:
PHP Notice: Use of undefined constant CURL_PROXY_REQUIRED - assumed 'CURL_PROXY_REQUIRED' in /var/www/html/currency_update_curled.php on line 124
We do not use a proxy for cURL.
I'm afraid we cannot help any more with this as it is clearly a problem with the script you are using.
Can anyone advise?
The server people are Terranetwork.
Re: Currency Update (Automatic)
The first problem raised by your host isn't a problem with the PHP, that's fine, it's a problem with your web host not reading the installation instructions.
The second is, I suspect, because you have asked your host to install the version of the updater intended for servers that use a proxy for CURL, so some of the environment constants are missing.
I would recommend that you aks her to install the original version (i.e. the one in the "free software add-ons" area, which is inteneded for normal setups.
Re: Currency Update (Automatic)
Quote:
Originally Posted by
kuroi
The first problem raised by your host isn't a problem with the PHP, that's fine, it's a problem with your web host not reading the installation instructions.
The second is, I suspect, because you have asked your host to install the version of the updater intended for servers that use a proxy for CURL, so some of the environment constants are missing.
I would recommend that you aks her to install the original version (i.e. the one in the "free software add-ons" area, which is inteneded for normal setups.
It was myself that installed the file :-)
I just asked them to set up the Cron Job, just to clarify.
I will have another go, I appreciate you taking the time to reply :-)
Mark
Re: Currency Update (Automatic)
Respect to you for admitting that. I was surprised by your host's comments, as I have great respect for her technical competence, but I can see how if she's seeing only the errors when she tries to run the script, she might jump to the conclusions she drew.
I'd recommend using the version of the script that you can download from this site and ensuring that the location variable is set as per the installation instructions. Hopefully that will go smoothly for you, otherwise let us know.
I'm rather assuming that sterling's current performance makes this a bit of a priority!