Elxis CMS Forum

Extensions => Components => Topic started by: eliasan on November 22, 2006, 10:45:22

Title: eWeather (Elxis Verison)
Post by: eliasan on November 22, 2006, 10:45:22
The popular component and module for weather forcasts are now available for download from Elxis Directory (https://www.elxis.org/index.php?option=com_mtree&task=listcats&cat_id=81&Itemid=138).
eWeather uses data from www.weather.com.
Title: Re: eWeather (Elxis Verison)
Post by: yiannos on November 23, 2006, 11:30:23
Is there not a config file for Greece? I cannot find it.

Moreover, I get an error on the module:

Quote
PHP: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration
uri: index.php
path: /components/com_frontpage/frontpage.php
version: Elxis 2006.3
Title: Re: eWeather (Elxis Verison)
Post by: eliasan on November 23, 2006, 11:44:06
Normally, you can get the config file for Greece from http://www.mambobaer.de/, downloads section. I just check it, but right now the site looks down. You have to try later.

About the error it is caused from two reasons:

1) You tried to use eWeather from a local installation
2) Your server configuration is not allowing access to outside scripts or pages. eWeather "talks" to www.weather.com to get the data in an XML form.
Title: Re: eWeather (Elxis Verison)
Post by: yiannos on November 23, 2006, 11:50:45
Normally, you can get the config file for Greece from http://www.mambobaer.de/, downloads section. I just check it, but right now the site looks down. You have to try later.

About the error it is caused from two reasons:

1) You tried to use eWeather from a local installation
2) Your server configuration is not allowing access to outside scripts or pages. eWeather "talks" to www.weather.com to get the data in an XML form.

Thank you for your answer,

The installation is not local, how can I change this config? (Running on Linux, Apache, PHP, Mysql)

TIA
Title: Re: eWeather (Elxis Verison)
Post by: yiannos on November 23, 2006, 12:02:38
Replying to myself.

Found the config parameter as

Code: [Select]
allow_url_fopen
in php.ini and it works now.

The module size seems to be a bit too much now but I am looking into it and will report here any findings.

Thanks again.
Title: Re: eWeather (Elxis Verison)
Post by: eliasan on November 23, 2006, 12:05:25
Solution 1. Server Wide Change
Locate the php.ini and set allow_url_fopen to On.
If you are on a hosted account, pleask ask your webmster to do it. It is his final decision if it will enabled or not as it affects the whole server and not only your account.

Solution 2. Local Change
Add to your .htaccess file the following directive, that overrides server wide setting:
php_flag allow_url_fopen on
Title: Re: eWeather (Elxis Verison)
Post by: datahell on November 23, 2006, 12:35:48
Sorry, Ilias. We must make clear that turning allow_url_fopen to on IS NOT RECOMMENDED in any case. Elxis can work fine with allow_url_fopen off as it uses special classes and functions. Component is insecure in this part. I personally would n't change this security setting to on. To make you understand the importance of this setting, if you enable allow_url_fopen then your site/server will be vunerable to cross site scripting attacks (XSS) as it will able to open remote files from any internet location!
Title: Re: eWeather (Elxis Verison)
Post by: yiannos on November 23, 2006, 12:37:40
OK thanks again for your reply.

I tested the module on different templates and founf that it shows correctly only on a non-resizeable (am I saying this correctly?) template, namely Athina.

Is this logical? I tested with the 3 templates that come with Elxis and the madeyourweb template that comes with Joomla (the full version - not the Joomla bundled one)