domo9122 Posted August 22, 2007 Share Posted August 22, 2007 I am setting up a forums and i get this error. Parse error: syntax error, unexpected '.', expecting T_STRING in /hosted/subs/ulmb.com/v/b/vbulletintest/public_html/global.php on line 20 Line 20 looks like this: function.require_once(CWD . '/includes/init.php'); What do i do lol. Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/ Share on other sites More sharing options...
xyn Posted August 22, 2007 Share Posted August 22, 2007 function.require_once(CWD . '/includes/init.php'); should be require_once(CWD . '/includes/init.php'); Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/#findComment-330800 Share on other sites More sharing options...
domo9122 Posted August 22, 2007 Author Share Posted August 22, 2007 But then i get this: Warning: require_once() [function.require-once]: Unable to access /hosted/subs/ulmb.com/v/b/vbulletintest/public_html/includes/init.php in /hosted/subs/ulmb.com/v/b/vbulletintest/public_html/global.php on line 20 Warning: require_once(/hosted/subs/ulmb.com/v/b/vbulletintest/public_html/includes/init.php) [function.require-once]: failed to open stream: Invalid argument in /hosted/subs/ulmb.com/v/b/vbulletintest/public_html/global.php on line 20 Fatal error: require_once() [function.require]: Failed opening required '/hosted/subs/ulmb.com/v/b/vbulletintest/public_html/includes/init.php' (include_path='.:/usr/local/share/pear') in /hosted/subs/ulmb.com/v/b/vbulletintest/public_html/global.php on line 20 Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/#findComment-330804 Share on other sites More sharing options...
xyn Posted August 22, 2007 Share Posted August 22, 2007 hm, ok. is the in the stated directory? and what is CWD ? Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/#findComment-330806 Share on other sites More sharing options...
pranav_kavi Posted August 22, 2007 Share Posted August 22, 2007 require_once(CWD . '../includes/init.php'); what does CWD contain? Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/#findComment-330808 Share on other sites More sharing options...
domo9122 Posted August 22, 2007 Author Share Posted August 22, 2007 I still get this: Warning: require_once() [function.require-once]: Unable to access /hosted/subs/ulmb.com/v/b/vbulletintest/public_html/includes/init.php in /hosted/subs/ulmb.com/v/b/vbulletintest/public_html/global.php on line 20 Warning: require_once(/hosted/subs/ulmb.com/v/b/vbulletintest/public_html/includes/init.php) [function.require-once]: failed to open stream: Invalid argument in /hosted/subs/ulmb.com/v/b/vbulletintest/public_html/global.php on line 20 Fatal error: require_once() [function.require]: Failed opening required '/hosted/subs/ulmb.com/v/b/vbulletintest/public_html/includes/init.php' (include_path='.:/usr/local/share/pear') in /hosted/subs/ulmb.com/v/b/vbulletintest/public_html/global.php on line 20 Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/#findComment-330809 Share on other sites More sharing options...
xyn Posted August 22, 2007 Share Posted August 22, 2007 Yer. search for define("CWD" , $something); and tell me what that is. Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/#findComment-330810 Share on other sites More sharing options...
domo9122 Posted August 22, 2007 Author Share Posted August 22, 2007 There is no file called CWF. :S:S It is a vBulletin forums I am trying to set up. Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/#findComment-330814 Share on other sites More sharing options...
xyn Posted August 22, 2007 Share Posted August 22, 2007 1. does this file exist "includes/init.php" 2. try find what CWD is (should look like define("CWD", $variable or boolean"); Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/#findComment-330816 Share on other sites More sharing options...
domo9122 Posted August 22, 2007 Author Share Posted August 22, 2007 1. Yes it exists 2. define('CWD', (($getcwd = getcwd()) ? $getcwd : '.')); Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/#findComment-330819 Share on other sites More sharing options...
domo9122 Posted August 22, 2007 Author Share Posted August 22, 2007 Anyways it doesn't metter now I am starting again and if I get more problems I will post again. Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/#findComment-330820 Share on other sites More sharing options...
plutomed Posted August 22, 2007 Share Posted August 22, 2007 You are getting that because on your hosting php is installed further back than your main directory if ya get what i mean so you have to use ../ for one dir up and ../../ for 2 and so on Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/#findComment-330836 Share on other sites More sharing options...
domo9122 Posted August 22, 2007 Author Share Posted August 22, 2007 Still having the same problem it isn't letting me on grr! Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/#findComment-330855 Share on other sites More sharing options...
MadTechie Posted August 22, 2007 Share Posted August 22, 2007 at a guess try require_once(CWD . 'includes/init.php'); can you tell us where the init.php file is compared to the file your editing ie home/test.php <--this file home/includes/init.php <--their Link to comment https://forums.phpfreaks.com/topic/66135-i-have-a-problem/#findComment-330861 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.