TinyPortal

Development => Support => Installation => Topic started by: urbanscrawl on July 17, 2006, 09:17:38 PM

Title: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 09:17:38 PM
My board was fine - I downloaded and uploaded tiny portal fine...

then I hit install - and now I can't even access the admin pages of my site!

I just get a blank page with:

Parse error: syntax error, unexpected $end, expecting ')' in /home/urbansc/public_html/chat/Sources/Load.php on line 2089

- written at the top.

Please, please does anyone know how to fix this?  I just wanted an RSS news feed and now I don't have a forum...

:'(
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 09:22:43 PM
I am running RC2 and it said:

Upshrink table created
Settings table created
Blocks table created.
some sample values were added to the blocks table
Variables table created.
Articles table created.
DL manager table created
TinyPortalÂÃ,´s table structure is now installed/updated.
Please restart your forum to see the changes.

Then when I restarted the forum I got that horrible error message...
Title: Re: SCARY problem on installation
Post by: G6Cad on July 17, 2006, 09:35:09 PM
Can you attach your load.php file here for us please ?
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 09:40:08 PM
Hello, thank you for your quick response - please forgive my ignorance, but where am I going to find that?
Title: Re: SCARY problem on installation
Post by: G6Cad on July 17, 2006, 09:40:59 PM
forum/sources/load.php through your cpanel or FTP :)
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 10:20:31 PM
I havn't gone away I am just looking for the load.php - I have had a flick through the cpanel and can't find it (though I can see that the members and messages are all still stored there so that's reassuring), on dreamweaver I am looking at the remote view for myforum section and cannot see it there either - is that where I am supposed to be looking?  It's not index.php you want?
Title: Re: SCARY problem on installation
Post by: G6Cad on July 17, 2006, 10:22:40 PM
In your forum sources folder

Can you post a link to your site to please
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 10:38:02 PM
Of course, many thanks:

www.urbanscrawl.com/chat (http://www.urbanscrawl.com/chat)

www.urbanscrawl.com/chat
Title: Re: SCARY problem on installation
Post by: G6Cad on July 17, 2006, 10:42:58 PM
still need your load.php file from your sourse folder ;)
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 10:45:34 PM
okay I've found it  :D, phew, but it's bigger than the 20,000 characters allowed - which bit shall I post...?
Title: Re: SCARY problem on installation
Post by: G6Cad on July 17, 2006, 10:47:06 PM
can you zip it up and make a link the the whole file so i can download it?
eg www.yourdomain.com/temp/load.zip
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 10:48:16 PM
   Here's the last bit:



// The simple yet efficient memcached.
   if (isset($modSettings['cache_memcached']) && trim($modSettings['cache_memcached']) != '')
   {
      // Grab the memcached server.
      if (!is_resource($memcached))
         get_memcached_server();
      if (!$memcached)
         return;

      // !!! It almost might be best to write null to as many as possible....
      if (!fwrite($memcached, 'set ' . $key . ' 0 ' . $ttl . ' ' . strlen($value) . "\r\n" . $value . "\r\n"))
      {
         $memcached = fclose($memcached);
         return;
      }

      fread($memcached, 128);
   }
   // eAccelerator...
   elseif (function_exists('eaccelerator_put'))
   {
      if (rand(0, 10) == 1)
         eaccelerator_gc();

      if ($value === null)
         @eaccelerator_rm($key);
      else
         eaccelerator_put($key, $value, $ttl);
   }
   // Turck MMCache?
   elseif (function_exists('mmcache_put'))
   {
      if (rand(0, 10) == 1)
         mmcache_gc();

      if ($value === null)
         @mmcache_rm($key);
      else
         mmcache_put($key, $value, $ttl);
   }
   // Alternative PHP Cache, ahoy!
   elseif (function_exists('apc_store'))
   {
      if ($value === null)
         apc_delete($key);
      else
         apc_store($key, $value, $ttl);
   }
   // Zend Platform/ZPS/etc.
   elseif (function_exists('output_cache_put'))
      output_cache_put($key, $value);

   if (isset($GLOBALS['db_show_debug']) && $GLOBALS['db_show_debug'] === true)
      $cache_hits[$cache_count]['t'] = array_sum(explode(' ', microtime())) - array_sum(explode(' ', $st));
}

function cache_get_data($key, $ttl = 120)
{
   global $boardurl, $sourcedir, $modSettings, $memcached;
   global $cache_hits, $cache_count;

   if (empty($modSettings['cache_enable']) && !empty($modSettings))
      return;

   $cache_count = isset($cache_count) ? $cache_count + 1 : 1;
   if (isset($GLOBALS['db_show_debug']) && $GLOBALS['db_show_debug'] === true)
   {
      $cache_hits[$cache_count] = array('k' => $key, 'd' => 'get');
      $st = microtime();
   }

   $key = md5($boardurl . filemtime($sourcedir . '/Load.php')) . '-SMF-' . $key;

   // Okay, let's go for it memcached!
   if (isset($modSettings['cache_memcached']) && trim($modSettings['cache_memcached']) != '')
   {
      // Grab the memcached server.
      if (!is_resource($memcached) && $memcached !== '0')
         get_memcached_server();
      if (!$memcached)
      {
         // '0' means ignore me for the rest of this page view.
         $memcached = '0';
         return null;
      }

      if (!fwrite($memcached, 'get ' . $key . "\r\n"))
      {
         $memcached = fclose($memcached);
         return null;
      }

      $response = fgets($memcached);
      if (substr($response, 0, 3) != 'END' && substr($response, 0, 5) != 'VALUE')
      {
         // Bad response, junk time.
         $memcached = fclose($memcached);
         return null;
      }

      if (substr($response, 0, 5) == 'VALUE' && preg_match('~(\d+)$~', trim($response), $match) != 0)
         $value = substr(fread($memcached, $match[1] + 2), 0, -2);

      fread($memcached, 5);
   }
   // Again, eAccelerator.
   elseif (function_exists('eaccelerator_get'))
      $value = eaccelerator_get($key);
   // The older, but ever-stable, Turck MMCache...
   elseif (function_exists('mmcache_get'))
      $value = mmcache_get($key);
   // This is the free APC from PECL.
   elseif (function_exists('apc_fetch'))
      $value = apc_fetch($key);
   // Zend's pricey stuff.
   elseif (function_exists('output_cache_get'))
      $value = output_cache_get($key, $ttl);

   if (isset($GLOBALS['db_show_debug']) && $GLOBALS['db_show_debug'] === true)
   {
      $cache_hits[$cache_count]['t'] = array_sum(explode(' ', microtime())) - array_sum(explode(' ', $st));
      $cache_hits[$cache_count]['s'] = isset($value) ? strlen($value) : 0;
   }

   if (empty($value))
      return null;
   // If it's broke, it's broke... so give up on it.
   else
      return @unserialize($value);
}

function get_memcached_server($level = 3)
{
   global $modSettings, $memcached, $db_persist;

   $servers = explode(',', $modSettings['cache_memcached']);
   $server = explode(':', trim($servers[array_rand($servers)]));

   // Don't try more times than we have servers!
   $level = min(count($servers), $level);

   // Don't wait too long: yes, we want the server, but we might be able to run the query faster!
   if (empty($db_persist))
      $memcached = @fsockopen($server[0], empty($server[1]) ? 11211 : $server[1], $err, $err, 0.15);
   else
      $memcached = @pfsockopen($server[0], empty($server[1]
Title: Re: SCARY problem on installation
Post by: G6Cad on July 17, 2006, 10:50:18 PM
Very hard for us to help with out the actual numbers of the lines the error are reported from.
Please try to attach the file of make a zip and link to it so we can download it.
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 10:52:49 PM
I have just noticed that there appear to be two load.php files, one that was created a few days ago and one load.php- that was created today possibly when I tried to install the program - in fact there appear to be quite a few doubled up...

so do you want the first or the second or both?
Title: Re: SCARY problem on installation
Post by: G6Cad on July 17, 2006, 10:56:02 PM
I want the one in use with out any renaming after the file like a - or ~ the file used is simply called load.php
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 11:04:02 PM
www.urbanscrawl.com/temp/load.php (http://www.urbanscrawl.com/temp/load.php)
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 11:05:16 PM
I'm not sure why that's not linking I can see it in the file I have created...  :-\

Hmmm, how else can I let you see it?
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 11:06:26 PM
think I've done it -

http://www.urbanscrawl.com/temp/ (http://www.urbanscrawl.com/temp/)
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 11:07:57 PM
damn - you get the same prob - ah - were you saying that I had to zip it?  ;)

I am not sure I have winzip - one second I'll check...
Title: Re: SCARY problem on installation
Post by: G6Cad on July 17, 2006, 11:08:45 PM
You have to download it to your local machine and ZIP it before you link to the file
or when you have downloaded it, attache it here to your post directly as is
Title: Re: SCARY problem on installation
Post by: akulion on July 17, 2006, 11:11:27 PM
Visit www.winzip.com and download the program from there

install it and after u have downloaded ur load.php file right click it and ZIP it up (there will be a menu option for that after u install winzip)

then upload to the server
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 11:23:48 PM
Thank you for your patience!

- and how do I attach it directly to the post 'as is'?
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 11:28:07 PM
My fear is that if I get the file remotely that I know is bad - will I not be overwriting the still good file locally?
Title: Re: SCARY problem on installation
Post by: akulion on July 17, 2006, 11:34:03 PM
the extensions are different so no worries

one is .php

the other will be .zip (after u zip it up)
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 11:39:19 PM
Right - this is a little frustrating - winzip doesn't want to download.  Very annoying.

I have 'got' load.php - so it should now have overwritten my local version and I have tried to attach it - I hope this works.
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 17, 2006, 11:53:12 PM
I'm afraid my brain is a little fried - I am going to have to go to sleep and come back to this a little fresher in the morning.  It's tough stuff to work through if you are a beginner, and I am very very grateful for all of your help.

Thank you.
:)
Title: Re: SCARY problem on installation
Post by: IchBin on July 18, 2006, 04:15:35 AM
Your Load.php file is not even complete. Its missing quite a bit of info I think at a quick glance. If I were you I would replace the forum files back to a fresh install. In other words, download the RC2 SMF package and replace all your files except your Settings.php file which stores all the forum info to connect to your DB and stuff. Then, make a backup of your files and database before you try to install TP again. I have a feeling your looking at more problems even if you get Load.php fixed which is why I'm suggesting a fresh install of SMF files.
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 18, 2006, 10:10:54 AM
I don't have any other packages installed I follwed all of the instructions properly downloaded and uploaded tinyportals fine - if I have to do fresh install of SMF, why would I try to install tinyportal again?  Surely it will just screw it all up again?  Nothing will have changed...
Title: Re: SCARY problem on installation
Post by: urbanscrawl on July 18, 2006, 10:14:23 AM
OK!

If I am going to do a fresh install of SMF, please please please can someone give me details on how to do that without losing the messages and members...
Title: Re: SCARY problem on installation
Post by: IchBin on July 18, 2006, 01:21:27 PM
I gave you instructions. All you need to do is replace all the files except the Settings.php. Just upload a new set and replace. :)

Its not that big of a deal at all. All your members and posts etc are stored in the database so they shouldn't be touched.