Troubleshooting Guide

General Troubleshooting

Generally, if you have some errors with script, you should first look into the path /ftt2/system/logs/ for error log. All mysql and php errors written there. If you see mysql errors, you can try to repair ftt2 tables using phpMyAdmin ( choose your database, select all tables and choose “Repair” ). Tables could be damaged if your server had power failure. Another possible reason of mysql problems is hard drive partitions overflow. You can check free space on partitions using df -h command in ssh.

Upgrade issues

Fast Traffic Trader 2 has auto-upgrading feature, you can upgrade all FTT2 copies in your Network of sites in one click. Go to Maintaince->Sites Management and click Upgrade all Sites if you see new version is available. After several minutes all sites will be upgraded. If some sites not upgrading for long time that may be becouse they don’t have any traffic on them and cron script not invokes. In this case, you can just invoke cron script manually by calling http://example.com/ftt2/cron.php to accomplish upgrade procedure (you don’t need to wait until cron script will finish).

If for some reason you see you have any problems with script after upgrading, first look into /ftt2/system/logs/ for error log – that may help you examine the problem. Second – you can try to update files manually by downloading archive from http://www.ftt2.com/updates/ and extracting it over your ftt2 path, excluding paths ftt2/install, ftt2/config.inc.php, ftt2/toplists, ftt2/system/templates/toplists. Same way you can downgrade by downloading one of previous versions and changing FTT2 version in Settings->Other. And of course you can contact FTT2 support to solve this issue. This guide only for the case support is unavailable at the moment.

Moving script to another server

To move script to another server, please, follow these easy steps:

  1. Check that time on new server set properly ( server may have different time zone, but UTC time should be correct ).
  2. On old server backup ftt2 folder using tar command from ssh: tar zcf ftt2.tar.gz /path/to/your/site/ftt2 ( or you can move ftt2 files to new server somehow else )
  3. On old server backup mysql databases using mysqldump: mysqldump -u mysql_user --password=mysql_password --databases ftt2_local ftt2_shared ftt2_global | gzip > ftt2.sql.gz. Important! If you already have other sites on new server which belongs to same network of sites, you should backup only local database. ( see installation guide about local, shared and global databases ). If no other sites on new server located, but global database remains on old server or on some other servers, you should backup only local and shared database. Otherwise, backup local, shared and global databases.
  4. Move ftt2.tar.gz and ftt2.sql.gz to new server using scp command from ssh: scp ftt2.tar.gz ssh_user@new_server_ip:/path/to/your/site ; scp ftt2.sql.gz ssh_user@new_server_ip:/path/to/your/site ( or move it somehow else ).
  5. On new server, extract ftt2.tar.gz in your site directory: tar zxf ftt2.tar.gz .
  6. Change ownership of ftt2 path and all its’ contents to user, under which apache runs – chown -R apache_user /path/to/your/site/ftt2 or chmod to 0777 full ftt2 path: chmod -R 0777 /path/to/your/site/ftt2. Alternatively, you can setup 0777 permissions only for some paths, as described in installation guide and after moving script to new server change FTP/SFTP settings for this installation in Maintaince->Sites Management.
  7. On new server restore mysql databases using this command in ssh: zcat ftt2.sql.gz | mysql -u mysql_user --password=mysql_password.
  8. Edit ftt2/config.inc.php and change mysql access values if they are different on new server.
  9. If you moved also global database, you should edit config.inc.php for all other FTT2 installations which use same global database.
  10. Go to Maintaince->Sites Management and edit moved site so that mysql host, user and password will point to new server.

Alternative way to move script to another server:

  1. Install fresh script on new server as described in installation guide. You can also install it as additional site in network.
  2. Import all traders, stats and settings from old server using Maintaince->Import Stats and Traders. Import process may take some time ,  be patient. Please, note, not all settings may be imported.
  3. Delete old site from your list in Maintaince->Sites Management if you installed new script as additional site in network.

7 comments

  1. sexypos says:

    Сегодня ставил ftt2 в связке с cj-скриптом и столкнулся с проблемой — cj-скрипт выдавал ошибку “Access denied for user ‘apache’@’localhost’ (using password: NO)” на страницах, где было соединение с базой.

    Пошаманив, понял, что дело во вставке in.php в header-файл (тоже на php).

    По всей видимости, in.php закрывает соединение с базой по завершению работы и header ничего не знает об этом.
    Сделал хак ниже в виде переподключения к базе после вставки in.php
    Криво, но работает.

    Думаю, в настройках ftt2 стоит добавить пункт “Close DB-connection after the in.php work finishing” (Yes/No) с ‘Yes’ по умолчанию, или что-то вроде того.

  2. Admin says:

    Странно… Вообще-то in.php открывает свое соединение к базе дополнительно к существующим соединениям, если они уже открыты в файле откуда in.php инклюдится. И только это соединение потом закрывает. Открытые до него остаются открытыми.

  3. sexypos says:

    Сегодня, после обновления системы все мои сайты легли и трейды лежали с полчаса, пока искал ошибку в коде.
    Проблема была в in.php. На время отладки файл пришлось убрать со всех сайтов, что в итоге, конечно, немного исказило статистику часа.

    Запуск ‘php in.php’ из консоли выдавал ошибку синтаксиса.
    Оказалось, что в 3-й строке вместо
    <? while(1):
    нужно было указать
    <?php while(1):

    В моем апаче по умолчанию стоит, что php — это <?php
    Его конфиг я, конечно, поправлю, но это жесть, однозначно.
    Рекомендую проверить весь оставшийся код на подобные вещи — ни у одного меня <? может не обрабатываться.

  4. Admin says:

    Прошу прощения за досадную ошибку! Я сначала проверяю все апдейты на своих сайтах, но в данном случае из-за разных конфигов апача эта ошибка была пропущена. Дистрибутив поправлен.
    В этом разделе помощи описаны возможные пути решения, если возникают подобные проблемы при апдейте. Всегда можно перезалить более старую версию поверх. Взять отсюда – http://www.ftt2.com/updates/ ( не забыть удалить из архива каталоги и файлы, указанные в этом руководстве ) . Даже если в новой версии были изменения в базе, старая версия будет работать с новой базой. А когда я буду онлайн, я смогу решить эту возникшую проблему.

  5. geiermedia says:

    hi, is there another as calling include_once(‘/path/to/your/site/index/directory/ftt2/in.php’); ?
    somehow it’s causing a problem with my mechbunny tube script, that some functions won’t work.
    thanks

  6. geiermedia says:

    ok solved, needed to add into my tube script db.php and not into the template header and everything working fine. thanks

  7. 2themix says:

    как восстановить пассворд в админку на ftt2 ?

Leave a Reply

Click to Insert Smiley

SmileBig SmileGrinLaughFrownBig FrownCryNeutralWinkKissRazzChicCoolAngryReally AngryConfusedQuestionThinkingPainShockYesNoLOLSillyBeautyLashesCuteShyBlushKissedIn LoveDroolGiggleSnickerHeh!SmirkWiltWeepIDKStruggleSide FrownDazedHypnotizedSweatEek!Roll EyesSarcasmDisdainSmugMoney MouthFoot in MouthShut MouthQuietShameBeat UpMeanEvil GrinGrit TeethShoutPissed OffReally PissedMad RazzDrunken RazzSickYawnSleepyDanceClapJumpHandshakeHigh FiveHug LeftHug RightKiss BlowKissingByeGo AwayCall MeOn the PhoneSecretMeetingWavingStopTime OutTalk to the HandLoserLyingDOH!Fingers CrossedWaitingSuspenseTremblePrayWorshipStarvingEatVictoryCurseAlienAngelClownCowboyCyclopsDevilDoctorFemale FighterMale FighterMohawkMusicNerdPartyPirateSkywalkerSnowmanSoldierVampireZombie KillerGhostSkeletonBunnyCatCat 2ChickChickenChicken 2CowCow 2DogDog 2DuckGoatHippoKoalaLionMonkeyMonkey 2MousePandaPigPig 2SheepSheep 2ReindeerSnailTigerTurtleBeerDrinkLiquorCoffeeCakePizzaWatermelonBowlPlateCanFemaleMaleHeartBroken HeartRoseDead RosePeaceYin YangUS FlagMoonStarSunCloudyRainThunderUmbrellaRainbowMusic NoteAirplaneCarIslandAnnouncebrbMailCellPhoneCameraFilmTVClockLampSearchCoinsComputerConsolePresentSoccerCloverPumpkinBombHammerKnifeHandcuffsPillPoopCigarette