Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 11:27:22 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155537 Posts in 21714 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: ###solved### global blocks problem with anynews - php include doesn't work  (Read 735 times)
Chaploo

Offline Offline

Posts: 265


WWW
« on: September 22, 2010, 10:24:18 AM »

Hi,

I set up a multilanguage WB site (2.8.1 Rev 1287) with a news page for every language. In the right coloumn I want Anynews (1.16) to display the news headlines of the news of the currently displayed language. This is how I tried it:

- create a news page in every language, create a group for the news, create some news in every language
- create a newsbox.php page for every language with blank template and the code of anynews in it, aiming at the newsgroup of the current language
- in the index.php of the template I placed
Code:
<?php include (WB_URL."/erlebnisreisen/".strtolower(LANGUAGE)."/newsbox.php"); ?>
which should display the newsbox.php af the current language.

But it doesn't work. The newsbox.php isn't shown, no matter what the content is.
(If I call the newsbox.php directly by entering the URL in the browser, everything is ok)


Thanks for help & ideas
Jochen
« Last Edit: October 11, 2010, 10:57:03 AM by Chaploo » Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #1 on: September 22, 2010, 10:35:23 AM »

Is the option "allow_url_include" allowed on this server?

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #2 on: September 22, 2010, 10:53:53 AM »

Hi,

try to remove WB_URL from the line
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Chaploo

Offline Offline

Posts: 265


WWW
« Reply #3 on: September 22, 2010, 10:59:28 AM »

Thanks for your replies!

@klaus
I contacted the provider (in this case it is not all-inkl.com who I usually chose, but faltbooster.com which the client insisted on), waiting for reply.

@crnogorac081
Unfortunately this didn't change anything. sad

Regards
Jochen
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #4 on: September 22, 2010, 11:11:57 AM »

Is the option "allow_url_include" allowed on this server?

You can check this yourself with the command phpinfo(); in a codepage.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

Chaploo

Offline Offline

Posts: 265


WWW
« Reply #5 on: September 22, 2010, 11:15:50 AM »

Thanks, Klaus, and yes, you are right: allow_url_include is turned Off.
I mailed the provider If they can change it.

Regards
Jochen
Logged
DarkViper
Development Team
*****
Offline Offline

Posts: 1252


« Reply #6 on: September 22, 2010, 12:39:17 PM »

it's not necessary to allow URL_INCLUDE. To do this can open a big security hole.

The only thing you must do is: follow the WB-defaults and use this include:

Code:
<?php include (WB_PATH.'/'.strtolower(LANGUAGE).'/newsbox.php'); ?>

Remember: if you've installed WB i.e. under http://mydoma.in/erlebnisreisen/
so the global Constant WB_URL contains http://mydoma.in/erlebnisreisen and
WB_PATH contains i.e. /srv/www/htdocs/erlebnisreisen.

Sometimes it's much easier to think not too complicated..  wink
« Last Edit: September 22, 2010, 12:41:22 PM by DarkViper » Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
Chaploo

Offline Offline

Posts: 265


WWW
« Reply #7 on: September 22, 2010, 09:13:30 PM »

 /erlebnisreisen/ is just the new name for the former /pages/ folder.
So I tried
Code:
<?php include (WB_PATH.'/erlebnisreisen/'.strtolower(LANGUAGE).'/newsbox.php'); ?>

But unfortunately it didn't work at all, the page content wasn't even displayed from the line on where the include starts. sad


###EDIT###

I tried another webhoster, and with this one (all-inkl.com) it works! So after all it seems to be the allow_url_include problem Klaus mentioned.

Thanks for all your replies!
Regards
Jochen
« Last Edit: October 11, 2010, 10:56:44 AM by Chaploo » Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!