Search results

  1. T

    PHP array of objects. How to find a specific object?

    I'm starting to moving into a more object oriented approach when creating my PHP scripts. However, there is a scenario that probably is quite common, but I don't know the best way to solve: Finding a specific element in an array. (Before OOP I didn't need to worry since I could find it with SQL...
  2. T

    Session variables not passed

    Hi! It seems like session variables ($_SESSION['variable']) stopped working the other day. Even I've called session_start, the variables aren't populated. I don't believe that I changed anything that should affect this. Is there some problem or change of configuration that I've missed? Or...
  3. T

    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

    Hi! Since 3 days back, my cron job can't connect to the database. Returns error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' I've tried to recreate the user in CPanel with no luck. I saw someone else on Starka with this problem. I think it began after some...
  4. T

    Preloading images with Js - body onload or buttom of page?

    Hi! I'm pretty new to the whole concept of preloading things with javascript, but it's really neat so I've started using it as much as I can. On the front page of my web strategy game I have thumbnails of game screenshots. To keep the user from waiting for the fullsize images when viewing the...
  5. T

    Clicking links on google-like map (IE7 problem)

    Hi! I'm having a kind of strange problem. It only shows up in old IE (<=7) so if you hate browser backward compatibility, stop reading here. :) In a game I'm working on, I've created a map that is draggable, very much like google maps. On this map there are cities in A tag links. All with...
  6. T

    Cron jobs dead

    Hi! Had some problems with cron jobs, but after a kick from Anna it started working again. I've noticed that Starka have had some problems the last couple of days - and my cron jobs doesn't seem to work. Could it it be that it needs another push? Thanks for the good service by the way!
  7. T

    Cron job problem?

    Hi! I have a cron job that hasn't been running for two days. I thought it might have been something that I did, but now I saw another thread on the same topic. Any known problems? (I'm on starka if that matters) key=$RANDOM; echo $key > /home/username/public_html/.cron_key.txt; wget -O -...
  8. T

    Javscript: Creating a self-closing img tag with createElement?

    Hi! I'm trying to create a img tag dynamically with javascript. So far I've used the createElement function. The problem is however that the created tag seems to be open: <img src="target"> Is there a way to create a self-closing img tag? <img src="target" /> I would prefer not to use...
  9. T

    Using Javascript to check if image has loaded?

    Hi! I guess there's an easy fix for this but I really can't find it. I'm not really into javascript so bear with me :) On the title page of my online game I use javascript to display screenshots. I use an invisible fixed ("absolute") positioned div (display: none) as a target for the...
  10. T

    MySQL database error on Starka - information missing in file

    Since the error doesn't seem to be acknowledged as a general Starka error, I thought I might as well also post that I'm having problem with MySQL statements. All statements returns something similar to: Incorrect information in file: './[database]/[table].frm' Havn't changed anything in the...
  11. T

    Missing libraries for cron job php?

    A while back I had problems with mysqli, gd library and the mbstring functions. A post in the news and announcement forum made clear that some parts went missing when the new platform was installed. So, after a few weeks my cron jobs started working again. For a few days. Now it's back again...
  12. T

    Tips on making game site more attractive

    I've currently redesigned my game site for my browser-based game Metropolis. www.metropolisonline.org I want ideas on how to make the game more attractive. Too little, or too much information on the start page? Should there be a javascript slide show, or is it nice to have a page without...
  13. T

    Parsing error in php.ini when running cron jobs.

    Hi! When I run a cron job /usr/bin/php -q /home/tarzan/etc/cronscript.php >>/home/tarzan/etc/logfile.txt 2>&1 I get an error on the first line: PHP: Error parsing /usr/local/lib/php.ini on line 786 Even though the script runs normally I think it might have some side effects: - I'm not able...
  14. T

    Class 'mysqli' not found?

    I've experienced a strange error the last weeks. When I try to use the mysqli class in a cron job (located outside of the public_html folder) I get an error message. First, the log file says "PHP: Error parsing /usr/local/lib/php.ini on line 786" then, later where I try to instantiate a mysqli...
  15. T

    Error parsing php.ini and mysqli not found in cron tab

    Hi! My site is working perfectly except my cron tab script keeps saying PHP: Error parsing /usr/local/lib/php.ini on line 786 I suspect that mysqli not working in the cron tab script might have something to do with this? Class 'mysqli' not found in ... on line 13 Is this something I can...
  16. T

    Using transactions with PHP/MySQL?

    Hi! Has anyone managed to use transactions with MySQL and Php? Since the x10 server Starka seems to be having massive problems with MySQL connections there's a high probability that connections are lost between queries that need to be executed together. (It has happened that new players have...
  17. T

    Starka issues - why no info?

    Hi! I don't want to be a pain in the butt or anything 'cause I think x10hosting is really great for being a free host, but I wonder why there's no updates on how the work on Starka is progressing. I've understood from threads here, and my own experience, that Starka is having some problems with...
  18. T

    Looking for artist/graphics designer for web-based strategy game

    I'm currently developing a free web-based game called Metropolis (www.metropolisonline.org) and I'm in need of an artist to do the graphics (since I suck at it). In has to do with presentational graphics and in-game icons such as houses, apartment buildings, hospitals etc. Is anyone interested...
  19. T

    Is it possible to see if cron jobs are working?

    Hi! I'm wondering if it's possible to see if the cron job deamon is working as it should? I suspect that cron jobs stopped working for me on Starka three days ago, but I haven't seen any one else with this problem. If I knew that the cron deamon was working I would surely put more effort into...
  20. T

    Using gmail smtp to send mails - server disconnects

    Hi! I've looked all over for an answer to this one but can't seem to find any: I'm trying to use gmails smtp server to send mails, but once I've sent "STARTTLS" it seems like the smtp.gmail.com disconnects. I'm trying to use port 587 with both telnet and fsockopen (php function). Does anyone...
Top