FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » GLOBALS.php not created on installation (Installation problems with FUDForum 2.8)
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
GLOBALS.php not created on installation [message #159909] Thu, 09 July 2009 03:04 Go to next message
LADave is currently offline  LADave   United States
Messages: 19
Registered: July 2009
Location: Los Angeles
Karma: 0
Junior Member
I'm having trouble installing FUDForum 2.8 and was hoping someone could lend me a hand. The installation runs through without any errors, the tables in MySQL are created and I get to the final step telling me to delete the 'install.php' file before continuing. When I click the 'Finished' button from there I get a page with these PHP errors:

Warning: main(./GLOBALS.php) [function.main]: failed to open stream: No such file or directory in /home/davidhun/public_html/collegeultimate_net/fud/index.php on line 12

Warning: main(./GLOBALS.php) [function.main]: failed to open stream: No such file or directory in /home/davidhun/public_html/collegeultimate_net/fud/index.php on line 12

Warning: main(./GLOBALS.php) [function.main]: failed to open stream: No such file or directory in /home/davidhun/public_html/collegeultimate_net/fud/index.php on line 12

Fatal error: main() [function.require]: Failed opening required './GLOBALS.php' (include_path='/usr/lib/php:.:/usr/php4/lib/php:/usr/local/php4/lib/php') in /home/davidhun/public_html/collegeultimate_net/fud/index.php on line 12


From what I've read there is supposed to be a GLOBALS.php file in the 'include' folder but I don't see one there. Also, if there was a GLOBALS.php file there then I should have a symlink in the same folder as index.php as well as the 'adm' directory.

So, where do I start tracking the problem down? The error logs on the webserver aren't much help because they just show file not found errors. I searched the forums and couldn't find much information regarding the GLOBALS.php file simply never being created. I made sure to chmod everyting to 777 so I don't think that is the problem.

Any help would be appreciated.

Thanks,
Dave
icon6.gif  Re: GLOBALS.php not created on installation [message #159910 is a reply to message #159909] Thu, 09 July 2009 03:12 Go to previous messageGo to next message
The Witcher is currently offline  The Witcher   United States
Messages: 675
Registered: May 2009
Location: USA
Karma: 3
Senior Member
Just guessing here but did you start in the right place?

that looks remarkably like an error I have received after uploading the install file and installing the program within the wrong directory using Blu host.




"I'm a Witcher, I solve human problems; not always using a sword!"
Re: GLOBALS.php not created on installation [message #159911 is a reply to message #159910] Thu, 09 July 2009 03:17 Go to previous messageGo to next message
LADave is currently offline  LADave   United States
Messages: 19
Registered: July 2009
Location: Los Angeles
Karma: 0
Junior Member
Not sure what you mean by starting in the right place but I tried installing in the same directory as the install.php file and in a different directory. Both give me the same result that I have above.
Re: GLOBALS.php not created on installation [message #159912 is a reply to message #159911] Thu, 09 July 2009 05:22 Go to previous messageGo to next message
The Witcher is currently offline  The Witcher   United States
Messages: 675
Registered: May 2009
Location: USA
Karma: 3
Senior Member


My knowledge is limited, so I am speaking from what little I know.
But It must installed to a publicly available directory.

Hosts manage that in a variety of ways and it is sometimes confusing (at least to me) which is why I seldom use certain hosts.

The way I do it in such situations is check to see if the installation file displays when I enter the domain name in my browser.

So if I upload the install file to the wrong or subdirectory it won't be available. So that is what I am asking.

I'm Guessing that the domain is collegeultimate.net and when When I ping that I get this.

ww.collegeultimate.net CNAME collegeultimate.net
collegeultimate.net A 207.210.105.96

PING collegeultimate.net (207.210.105.96) 56(84) bytes of data.

--- collegeultimate.net ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2000ms

So it appears to me that you have no files publicly availabe


"I'm a Witcher, I solve human problems; not always using a sword!"

[Updated on: Thu, 09 July 2009 05:22]

Report message to a moderator

Re: GLOBALS.php not created on installation [message #159948 is a reply to message #159909] Sun, 12 July 2009 07:46 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
When installing FUDforum 2.8.1 on a Linux Web server I had no errors (but I had a few warnings) during installation, but like you, after I deleted the install.php file and clicked on finish to log in as the admin user, I received the same error messages as you did. Sure enough, the symbolic links to GLOBALS.php were missing.

Cause: the Web host had disabled the PHP symlink() function.

[Updated on: Sun, 12 July 2009 09:34]

Report message to a moderator

Re: GLOBALS.php not created on installation [message #159949 is a reply to message #159948] Sun, 12 July 2009 08:55 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Can you please run this PHP script and post the output here?

<?php
if (DIRECTORY_SEPARATOR != '/') echo "Win"; else echo "Not Win";
if (function_exists('symlink')) echo " - with symlink"; else echo " - no symlink";
?>
Re: GLOBALS.php not created on installation [message #159956 is a reply to message #159949] Sun, 12 July 2009 19:51 Go to previous messageGo to next message
LADave is currently offline  LADave   United States
Messages: 19
Registered: July 2009
Location: Los Angeles
Karma: 0
Junior Member
This is the output:

Not Win - with symlink


Let me know if you need anymore info, thanks for taking a look and trying to help me out.

-Dave
Re: GLOBALS.php not created on installation [message #159965 is a reply to message #159956] Mon, 13 July 2009 10:59 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I was hoping to see "no symlink". If we can somehow detect that symlinks are disabled, the installer can deal with it (as it does on Windows systems).
Re: GLOBALS.php not created on installation [message #159967 is a reply to message #159965] Mon, 13 July 2009 11:50 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj wrote on Mon, 13 July 2009 03:59
If we can somehow detect that symlinks are disabled, the installer can deal with it (as it does on Windows systems).

I would be delighted if you could provide a patch for that! My first Web host couldn't enable the PHP symlink() function for me so I had to find another Web host for my forum. I'd much rather have my forum at the first Web host, but I can't unless I can install it without symbolic links.
Re: GLOBALS.php not created on installation [message #159977 is a reply to message #159967] Mon, 13 July 2009 13:03 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Was the output from the host that doesn't support symlinks? If not, can you please ask them to run it and let us have the output?
Re: GLOBALS.php not created on installation [message #159978 is a reply to message #159977] Mon, 13 July 2009 13:34 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj wrote on Mon, 13 July 2009 06:03
Was the output from the host that doesn't support symlinks? If not, can you please ask them to run it and let us have the output?

I still have the account at my preferred Web host, and I ran the PHP code you posted. Here's the output:

Not Win - no symlink

Thanks for any help on this.
Re: GLOBALS.php not created on installation [message #159980 is a reply to message #159978] Mon, 13 July 2009 17:25 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Please apply this patch and let us know if it solves the problem: http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=11964
Re: GLOBALS.php not created on installation [message #159981 is a reply to message #159980] Mon, 13 July 2009 18:51 Go to previous messageGo to next message
LADave is currently offline  LADave   United States
Messages: 19
Registered: July 2009
Location: Los Angeles
Karma: 0
Junior Member
naudefj wrote on Mon, 13 July 2009 13:25
Please apply this patch and let us know if it solves the problem:



I'll hopefully have a chance to give this a try this evening and report back. Thanks for the help.
Re: GLOBALS.php not created on installation [message #159989 is a reply to message #159980] Tue, 14 July 2009 01:02 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj wrote on Mon, 13 July 2009 10:25
Please apply this patch and let us know if it solves the problem: http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=11964


Thanks. Install.php is a binary file. Any suggestions on what program I can use to edit it and still save it as binary?
Re: GLOBALS.php not created on installation [message #159990 is a reply to message #159980] Tue, 14 July 2009 02:57 Go to previous messageGo to next message
LADave is currently offline  LADave   United States
Messages: 19
Registered: July 2009
Location: Los Angeles
Karma: 0
Junior Member
I applied the patch but I'm still getting the same errors after the install.

Is the problem simply that symlinks are disabled on the host I'm using? Just trying to put together an email to them to see if they can help me out with getting this installed. Anything else I should tell them to enable/disable?

Thanks for your help,
Dave
Re: GLOBALS.php not created on installation [message #159991 is a reply to message #159990] Tue, 14 July 2009 06:15 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
The patch should fix the symlink problem. Any chance of giving me temporary SSH access to see what's going on?
Re: GLOBALS.php not created on installation [message #159996 is a reply to message #159991] Tue, 14 July 2009 10:37 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj wrote
The patch should fix the symlink problem. Any chance of giving me temporary SSH access to see what's going on?


When I tried the patch with the patch command (I'd copy/pasted my previous patch), I got "unknown command" on my first Web host account. No problem. I'll go to the other Web host account and patch it.

I tried it on the 2nd Web host account and got "patch: **** Only garbage was found in the patch input." I looked inside the patch file and this is all there is:

Index: /install.php
RCS File: /home/cvs/forum21//install.php,v
rcsdiff -q -kk '-r1.176' '-r1.177' -u '/home/cvs/forum21//install.php,v' 2>/dev/null
Binary files install.php 2009/07/11 11:15:56 1.176 and install.php 2009/07/13 17:20:17 1.177 differ

I tried downloading it several times, even with a download manager. It's only 248 bytes and it should be a larger file. Any way to get the full file? Thanks.
Re: GLOBALS.php not created on installation [message #159997 is a reply to message #159996] Tue, 14 July 2009 11:14 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
You cannot use the installer from CVS as-is. See documentation @ http://cvs.prohost.org/index.php/Installation
Re: GLOBALS.php not created on installation [message #159999 is a reply to message #159997] Tue, 14 July 2009 12:02 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj wrote
You cannot use the installer from CVS as-is. See documentation @ http://cvs.prohost.org/index.php/Installation

I'm not at that step when I'm attempting to apply the patch. I'm at the "GUI installation" step where I've already extracted install.php, COPYING, CREDITS, etc.

Take another look at the contents of the patch file I posted in my previous post. Don't you think it should include a chunk of PHP code? You know, like:

if ($WINDOWS || !function_exists('symlink')) {
fud_symlink($INCLUDE . 'GLOBALS.php', $SERVER_ROOT . 'GLOBALS.php');
fud_symlink($INCLUDE . 'GLOBALS.php', $SERVER_ROOT . 'adm/GLOBALS.php');
...

Doesn't it look to you like the patch file you uploaded got truncated?
Re: GLOBALS.php not created on installation [message #160000 is a reply to message #159999] Tue, 14 July 2009 12:11 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
BTW, I'm subscribed to this topic for e-mail alerts when someone replies. Why are the last two alerts in Dutch instead of English?
Re: GLOBALS.php not created on installation [message #160001 is a reply to message #159999] Tue, 14 July 2009 12:14 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Well, install.php is a PHP file and it does have normal PHP code within it. However, it's also a binary file, as the content of all other files are gziped and appended to it to create a self-extracting PHP script.

I normally use the -a flag to diff or patch it (-a == treat as a normal text file). However, if it doesn't want to patch, you may need to go through the build process described in the installation document.
Re: GLOBALS.php not created on installation [message #160002 is a reply to message #160001] Tue, 14 July 2009 12:29 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj wrote

I normally use the -a flag to diff or patch it (-a == treat as a normal text file). However, if it doesn't want to patch, you may need to go through the build process described in the installation document.

I believe your patch file, FUDforum_patchset_11964.diff, that we download from cvs.prohost.org is corrupted. Please look at the file. It's missing 7 lines of PHP code and comments, isn't it?

Thanks for your time.
Re: GLOBALS.php not created on installation [message #160006 is a reply to message #160002] Tue, 14 July 2009 14:22 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Here is it (note the -a flag):

bash-3.2$ cvs diff -ua -r1.176 -r1.177 install.php
Index: install.php
===================================================================
RCS file: /forum21/install.php,v
retrieving revision 1.176
retrieving revision 1.177
diff -u -a -r1.176 -r1.177
--- install.php 11 Jul 2009 11:15:56 -0000      1.176
+++ install.php 13 Jul 2009 17:20:17 -0000      1.177
@@ -621,8 +621,8 @@
        } while (($pos = strpos($data, "\n//", $pos)) !== false);
 }

-/* win32 does not have symlinks, so we use this crude emulation */
-if ($WINDOWS) {
+/* Older windows systems doesn't have symlinks and some hosts disable them - use crude emulation */
+if ($WINDOWS || !function_exists('symlink')) {
        function fud_symlink($src, $dest)
        {
                if (!($fp = fopen($dest, 'wb'))) {
@@ -783,14 +783,14 @@
                                @unlink($SERVER_DATA_ROOT . 'scripts/GLOBALS.php');

                                /* make symlinks to GLOBALS.php */
-                               if (!$WINDOWS) {
+                               if ($WINDOWS || !function_exists('symlink')) {
+                                       fud_symlink($INCLUDE . 'GLOBALS.php', $SERVER_ROOT . 'GLOBALS.php');
+                                       fud_symlink($INCLUDE . 'GLOBALS.php', $SERVER_ROOT . 'adm/GLOBALS.php');
+                                       fud_symlink($INCLUDE . 'GLOBALS.php', $SERVER_DATA_ROOT . 'scripts/GLOBALS.php');
+                               } else {
                                        symlink($INCLUDE . 'GLOBALS.php', $SERVER_ROOT . 'GLOBALS.php');
                                        symlink($INCLUDE . 'GLOBALS.php', $SERVER_ROOT . 'adm/GLOBALS.php');
                                        symlink($INCLUDE . 'GLOBALS.php', $SERVER_DATA_ROOT . 'scripts/GLOBALS.php');
-                               } else {
-                                       fud_symlink($INCLUDE . 'GLOBALS.php', $SERVER_ROOT . 'GLOBALS.php');
-                                       fud_symlink($INCLUDE . 'GLOBALS.php', $SERVER_ROOT . 'adm/GLOBALS.php');
-                                       fud_symlink($INCLUDE . 'GLOBALS.php', $SERVER_DATA_ROOT . 'scripts/GLOBALS.php');
                                }

                                $url_parts = parse_url($WWW_ROOT);
Re: GLOBALS.php not created on installation [message #160007 is a reply to message #160006] Tue, 14 July 2009 15:09 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
Thanks for your help. Here's the output:

> patch -p2 <frank_patchset_11964.diff
missing header for unified diff at line 9 of patch
can't find file to patch at input line 9
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: install.php
|===================================================================
|RCS file: /forum21/install.php,v
|retrieving revision 1.176
|retrieving revision 1.177
|diff -u -a -r1.176 -r1.177
|--- install.php 11 Jul 2009 11:15:56 -0000      1.176
|+++ install.php 13 Jul 2009 17:20:17 -0000      1.177
--------------------------
File to patch: install.php
patching file install.php
Hunk #1 FAILED at 621.
patch unexpectedly ends in middle of line
Hunk #2 FAILED at 783.
2 out of 2 hunks FAILED -- saving rejects to file install.php.rej
Re: GLOBALS.php not created on installation [message #160008 is a reply to message #160007] Tue, 14 July 2009 15:22 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Works for me:

bash-3.2$ cvs diff -ua -r1.176 -r1.177 install.php >x.patch
bash-3.2$
bash-3.2$ patch -R -p0 --binary <x.patch
patching file install.php
bash-3.2$
bash-3.2$ patch -p0 --binary <x.patch
patching file install.php
Re: GLOBALS.php not created on installation [message #160009 is a reply to message #160008] Tue, 14 July 2009 15:26 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Try to use the patch -l flag (ignore white space changes between patch and input).
Re: GLOBALS.php not created on installation [message #160010 is a reply to message #160009] Tue, 14 July 2009 18:06 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj wrote
Try to use the patch -l flag (ignore white space changes between patch and input).

Thanks. It's partially successful. Here's the output:

> patch -l <frank_patchset_11964.diff
patching file install.php
patch unexpectedly ends in middle of line
Hunk #2 succeeded at 783 with fuzz 1.
Re: GLOBALS.php not created on installation [message #160016 is a reply to message #160010] Wed, 15 July 2009 17:25 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
You can apply it manually with a binary editor. Alternatively, build it from CVS or wait for the next release.
Re: GLOBALS.php not created on installation [message #160017 is a reply to message #160016] Wed, 15 July 2009 19:40 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj wrote
You can apply it manually with a binary editor.

Thanks. Can you recommend a free one? I'm running Windows XP SP-3.

naudefj wrote
Alternatively, build it from CVS or wait for the next release.

What software tools do I need to build it from CVS on a Windows platform? Or if that's not a good idea, on my Web host's Linux platform? Thanks.
Re: GLOBALS.php not created on installation [message #160018 is a reply to message #160017] Wed, 15 July 2009 20:38 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Quote:
Can you recommend a free one? I'm running Windows XP SP-3.


Notepad++ may work (if you're lucky).

Quote:
What software tools do I need to build it from CVS on a Windows platform? Or if that's not a good idea, on my Web host's Linux platform? Thanks.


You probably need a CVS client for Windows. However, I haven't ever tried it myself.
Re: GLOBALS.php not created on installation [message #160019 is a reply to message #160018] Wed, 15 July 2009 21:13 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj wrote
Quote:
Can you recommend a free one? I'm running Windows XP SP-3.


Notepad++ may work (if you're lucky).

Quote:
What software tools do I need to build it from CVS on a Windows platform? Or if that's not a good idea, on my Web host's Linux platform? Thanks.


You probably need a CVS client for Windows. However, I haven't ever tried it myself.

Thanks for the advice. I'll try these this evening and let you know.
Re: GLOBALS.php not created on installation [message #160022 is a reply to message #160018] Thu, 16 July 2009 13:42 Go to previous messageGo to next message
ANiko is currently offline  ANiko   United States
Messages: 30
Registered: May 2009
Karma: 0
Member
naudefj wrote

Notepad++ may work (if you're lucky).


It worked! I manually applied your edits to the extracted install.php file and Notepad++ saved the file in binary format. I FTP'd the file in binary mode to the Web host and installed without any errors. What a relief!

Thank you so much for your help! Have a great day!
Re: GLOBALS.php not created on installation [message #160521 is a reply to message #160006] Mon, 21 September 2009 17:58 Go to previous messageGo to next message
LADave is currently offline  LADave   United States
Messages: 19
Registered: July 2009
Location: Los Angeles
Karma: 0
Junior Member
Hi all, I got around to looking at FUDForum again today and still can't get it to install correctly on my shared hosting. I tried manually applying the patch listed above but I'm still getting the same errors I had listed in the original message that started this thread.

I now have SSH access to my shared hosting if there is anyone willing to take a closer look and try and help out, I would really appreciate it. I'm eager to tinker with the FUDForum<->NNTP integration/syncing but I haven't been able to make much progress because of installation troubles.

If anyone else has any ideas on what to try please reply here and let me know.

Thanks,
Dave
Re: GLOBALS.php not created on installation [message #160542 is a reply to message #160521] Mon, 28 September 2009 14:41 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Hi Dave,

LADave wrote on Mon, 21 September 2009 19:58
I tried manually applying the patch listed above but I'm still getting the same errors I had listed in the original message that started this thread.


The patch is part of FUDforum 3.0.0RC1. Please download it and let us know if it's working. If not, please PM or mail me the SSH access details.

Best regards.

Frank

Re: GLOBALS.php not created on installation [message #160620 is a reply to message #160542] Tue, 06 October 2009 16:54 Go to previous message
LADave is currently offline  LADave   United States
Messages: 19
Registered: July 2009
Location: Los Angeles
Karma: 0
Junior Member
naudefj wrote on Mon, 28 September 2009 10:41
Hi Dave,

The patch is part of FUDforum 3.0.0RC1. Please download it and let us know if it's working. If not, please PM or mail me the SSH access details.

Best regards.

Frank




FUDforum 3.0.0 RC1 installed perfectly. Having some trouble staying logged in as an admin but I'll hopefully be able to figure that one out. Thanks for all your help.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Drupal + FUDforum
Next Topic: FUDForum 3.0 SQL errors with SQLite
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 05:13:20 GMT 2024

Total time taken to generate the page: 0.03087 seconds