Невыгодный members php mod.


This Mod change the link of the Members so that the color of the Group is the link color.

Important Info :
o This Mod was created by SMFPacks.com - The #1 Website for the Customziation of your SMF.

SMFPacks.com Provides Other Great Packages:
- Member Color Link
- Reason for Editing Mod.
- Yet Another Global Announcements Mod.
- SMF Social Groups.
- SMF Links Directory.
- SMF Downloads Directory.
- SMF Dynamic Directory.
- Advanced Topic Prefix Mod.
- Advanced Invitations System.
- Move Topic Notification.
- PM to New Members.
- Permissions Info.
- Next Post Level.
- Karma Buttons.
- SMF Multi Quote.
- Attachments in Topics.
- and much more visit us on SMFPacks.com

Languages :
Follow Languages are included:
English (utf8), Italiano (utf8) (Italian), and Deutsch (utf8) (German)

Follow Outdated Languages are included:
EspaÒol (Spanish), T¸rkÁe (utf8) (Turkish), Nederlands (utf8) (Dutch), PortuguÍs (utf8) (Portuguese), Brazilian, Svenska (Swedish) (utf8)

I welcome translations for any language, please post it on the support topic.

Compatibility :
- 2.0
- 1.1.14
Changelog:

Version 1.8.7 :
- Mulitinstaller Package
Version 2.0.0-2.1.6 :
* Overworked my Mod System.
* The languages are now included in the package, and will be skiped if it not avaible. I split also the english version out of the mod, so it"s simpler for translater to made own translations.
+ The only changes are for 1.1+ i add now the color for guest nicks and replaced all html tag with tags.
+ Add Guest Colors also to the Recent Pages
+ Add to the MemberContext a colored_name and colorless_link variable, for some user how need some custom things without colors or without link.
- Fix a mistake in the Spain Translation...
+ Add a color for Banned User.
- Upgrades Included (Some Languages are Outdated, but i will add at least English translations to the language files.
+ Add the Option for Color the Moderators Links (and only the Links for Moderator Lists).
! Removed a eval bug, thats in it since Version 1.2.7...
- Upgrade included (For SMF 1.1.x Versions)
- Fixed a forgotten letter in the package.xml
! Bug Fix "id_cat" eval in Subs-BoardIndex.php (2.0 Beta 3 only)
+ Add a function to load colors in a faster way, this should help other Mod Autors integrate the colors into the mod
+ Add a "online_color" to the memberContext array
- First Step to a complete overwork of the Mod done.
! Eval Bugfix in the Subs-Recent.php (Only 2.0 Beta 3)
! Bug Fix "id_cat" eval in Subs-BoardIndex.php (2.0 Beta 3 only) (second one)

Version 3.0.0 (24.05.08):
Changes for SMF 1.1.5+ and 2.0. Beta 3+ :
* Complete overwork of the Mod (Should be faster now, i calculate a 20% speed up)
* Integrate a new Function for fast loading of colors, it take every possible way to use the chache of smf
* New Function for other Mod Creators for easy handling of colored links (Ask if you need help)
+ Replace all tags into the link of the poster (use style), but you can go back to old mode.
+ Add a Option to load all colors on serach result (Some work standard without extra load)
+ Add Guest Color to some more pages
+ Add Birthday Link Color (Yeah only for fun, but why not )
+ Extent Color Field in Database to 255 with that you can user more css style tags

Changes only for SMF 1.1.x
+ Fix colors on the Overview in Membergroups, to see the current Membergroupcolor

Changes only for SMF 2.0.x
+ Color the complete Moderation Center
+ Color the Warning Issue Page

At Least:
- Currently all Lanugages exept english and german are outdate, please help me to tanslate the missing things
- For Uprade to this Version you need to uninstall the old version!

Version 3.0.1/3.0.2 (21.06.08):
Bugfixes for Both SMF Versions:
! A Possible Eval Bug fixed in MessageIndex.php (Should normal not happen!)

Only Bux Fixes for SMF 1.1.x
! A Possible Eval Bug fixed in BoardIndex.php (Shoul normal not happen!)
! Language Eval Bug fixed in Search.php (Reported by Kalina)
! A Possible Eval Bug fixed in Recent.php (Should normal not happen!)
! A Possible Eval Bug fixed in Stats.php (Shoul normal not happen!)

Only Bug Fixed for SMF 2.0.x
! Double insert on the MemberContext Variable fixed (Mod is not deinstallabled!)

Upgrade from Version 3.0.0/3.0.1 included for both versions
Version 3.0.3 (26.08.08):
! Forgotten > in Calander.template.php and BoardIndex.template.php, this will not show the nickname if no color is set (SMF 1.1.x only)
! Removed the bug with the disappearing color if not a birthday color is set (SMF 2.0.x/ 1.1.x)
- Upgrades Included
Version 3.0.4 (02.09.08):
! Not correct selected chache data bug is removed (SMF 2.0.x/ 1.1.x)
- Upgrades Included
Version 3.0.5 (08.09.08):
! Prevent possible eval bug, by removing not needed items (SMF 2.0.x/ 1.1.x)
* Make the Package SMF 2.0 Beta 4 Compatible
- Upgrades Included
Version 3.0.5a (26.09.08):
! Fix a not reomved line on (SMF 2.0.x) (This Bugfix will only work on smf 2.0.x).
- Removed the SMF 2.0 Beta 3.1 Public Compatible
- Upgrade for SMF 2.0 Beta 4 included, SMF 1.1.x will need to be updated to this version!
Version 3.0.6 (10.02.08):
! Bug Fix on SMF 2.0, i replace a color with a link instead of the color. (Thanks to Bulakbol that you find this bug)
! Version confusing bug fix... with this the member color version detection will be everytime on the correct one! (Possible Upgraded Versions could not be updated because of this...) .
Version 3.0.7 (11.06.09):
! I don"t know which mod conflict with it but normal this should not happen, but now there should be no errors anymore .
- Like every time the upgrade is included.
Add Ons and Fixes for this Mod
All this Fixes or Add Ons are arttached to this post
Name: SSI Member Color Link
File: SSIMemberColorLinkXXX.zip
Description: The SSIMemberColor Files add color to the ssi includes who made with the SSI.php. Some people want this .
Version 0.9.9
!*+- First Release
Version 0.9.9 (30.07.07)
- Compatible to 1.1.3
Version 1.0.0 (04.08.07)
! Fix a error when only one user is loaded and the $color_profile array is empty.
- Upgrade Included
Version 1.0.1 (09.08.07)
! Correct a mistake i made in link built, you will see it sometimes in the internet explorer
* Easier Handling in the ssi_loadColor function
- Upgrade Included
Version 1.0.2 (28.08.08)
+ Integrate the new load_OnlineColors function (Special Colors will work now)
- Upgrade Included
Version 1.0.5 (04.09.08)
! Forgot to create the link for the loaded member color link data...
+ Fixed up a load bug, that could happen if only cached datas is load
! Used a nice reworked version of the load color datas for smf 2.0 (LHVBM, give me that idea ;P)
- Currently upgrade first to 1.0.2 after that you can upgrade to 1.0.5

This Mod Work for SMF1.0.x-1.1.x and for the SMF 2.0 Beta 3.1

Добрый день!

Возникла проблема на хостинге. Периодически сервер на запросы даёт ошибку 503. То картинку не отдаст, то скрипт не отдаст.. в общем в неожиданных местах. Суппорт говорит, что это из-за ошибок при выполнении PHP скриптов, сами ошибки (часть) из error log за сегодня привожу ниже.
В самом php я с горем пополам разбираюсь, но к сожалению в этих ошибках нет Тем более, что я вижу что проблема видимо в каких то процессах, но посмотреть что это за процессы я не могу - так как нет доступа. Итак - ошибки:

(22)Invalid argument: mod_fcgid: can"t lock process table in pid 16926
(22)Invalid argument: mod_fcgid: can"t lock process table in pid 17251
(22)Invalid argument: mod_fcgid: can"t lock process table in pid 17688
(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
Premature end of script headers: chatpushserver.php
(22)Invalid argument: mod_fcgid: can"t lock process table in pid 25982
(22)Invalid argument: mod_fcgid: can"t lock process table in pid 25999
(22)Invalid argument: mod_fcgid: can"t lock process table in pid 25591
(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
Premature end of script headers: pushserver.php

Судя по всему проблема с двумя аналогичными скриптами - pushserver.php и chatpushserver.php - оба предназначены для опроса mysql и при появлении новых данных - отдача их запросившему запросу.
maximum_execution_time в php.ini установлено 30 секунд.
Ниже привожу лист одного из них, второй такой же:

".$last_id." ORDER BY `msg_id` DESC LIMIT 50"; $query = mysql_query($sql); $rowsnm = mysql_num_rows($query); // кол-во найденых рядов if ($rowsnm) { // если есть новые строки в бд - то обрабатываем и отдаём клиенту $corr=0; while ($item=mysql_fetch_array($query)) { // пишем js-скрипт, который выполнится у клиента // и отдаем его клиенту } // выбрасываем все данные и выходим, чтобы клиент смог их обработать ob_flush(); flush(); exit; } // если данных нет - ждём 5 секунд sleep(5); } mysql_close(); ?>

Вот такой скрипт... Свою работу он на самом деле выполняет. Ещё смущает то, что ошибки лезут кратно 15-ти минутам, но в совершенно неожиданные моменты.. Кроме того, ошибка 503 чаще всего возникает совершенно не в то время когда ошибки fastcgi... Помогите разобраться пожалуйста, в какую сторону копать?

Решил навести в голове порядок о том, как работают вместе веб-сервер и PHP.

CGI

Common Gateway Interface, "общий интерфейс шлюза" - это стандарт, который описывает, как веб-сервер должен запускать прикладные программы (скрипты), как должен передавать им параметры HTTP-запроса, как программы должны передавать результаты своей работы веб-серверу. Прикладную программу взаимодействующую с веб-сервером по протоколу CGI принято называть шлюзом , хотя более распространено название CGI-скрипт или CGI-программа .

В качестве CGI-программ могут использоваться программы/скрипты написанные на любых языках программирования, как на компилируемых, так и на скриптовых, и даже на shell.

CGI-скрипты были популярны до того, как для веб-разработки стали преимущественно использовать PHP. Хотя сам PHP интерпретатор позволяет работать в режиме CGI (см. ниже).

Основной момент: "CGI" это не язык программирования и не отдельная программа! Это просто протокол (стандарт, спецификация, соглашение, набор правил).

FastCGI

Дальнейшее развитие технологии CGI, является более производительным и безопасным, снимает множество ограничений CGI-программ.

FastCGI программа работает следующим образом: программа единожды загружается в память в качестве демона (независимо от HTTP-сервера), а затем входит в цикл обработки запросов от HTTP-сервера. Один и тот же процесс обрабатывает несколько различных запросов один за другим, что отличается от работы в CGI-режиме, когда на каждый запрос создается отдельный процесс, "умирающий" после окончания обработки.

Написание FastCGI программ-демонов сложнее чем CGI, нужны дополнительные библиотеки, зависящие от языка.

Опять же, сама аббревиатура FastCGI это не язык программирования и не отдельная программа, это как и в случае CGI - просто спецификация.

PHP в режиме CGI

PHP в режиме CGI это самый старый способ выполнения php-скриптов веб-сервером. Режим доступен по умолчанию, однако может быть отключён при компиляции.

Для Apache нужен модуль mod_cgi (поставляется вместе с Apache). Nginx из коробки поддержки не имеет, хотя существуют дополнительные инструменты.

В данный момент режим используется редко в силу малой производительности.

PHP в режиме FastCGI

Помимо CGI режима, PHP из коробки умеет работать и в FastCGI режиме (с версии 5.3 даже в двух FastCGI режимах). Режим включается флагом при компиляции интерпретатора, флаг зависит от версии PHP.

Для работы с Apache нужен модуль mod_fcgid или mod_fastcgi , либо связка из mod_proxy_fcgi + PHP-FPM .

Nginx умеет работать с FastCGI приложениями из коробки, но именно для PHP дополнительно нужен PHP-FPM (см. ниже).

Следует помнить, что при работе PHP в режиме FastCGI в памяти висит сам php интерпретатор, а не какой-то конкретный php-скрипт.

PHP-FPM

FastCGI Process Manager, "Менеджер процессов FastCGI". Это альтернативная реализация FastCGI режима в PHP с несколькими дополнительными возможностями, которые обычно используются для высоконагруженных сайтов.

Изначально PHP-FPM представлял из себя набор патчей от Андрея Нигматулина, которые устраняли ряд проблем, мешающих полноценно использовать PHP в режиме FastCGI (список улучшений). С версии PHP 5.3 набор патчей включён в ядро, а дополнительные возможности PHP-FPM включаются флагом при компиляции.

PHP-FPM используется в основном в связке с Nginx, без установки Apache.

mod_php

Это модуль для Apache, позволяющий ему выполнять php скрипты. Является наверно самым популярным и простым способом подружить Apache и PHP. Модуль не использует ни CGI, ни FastCGI. Есть свои минусы - скрипты работают под пользователем веб-сервера, невозможно использовать больше одной версии PHP.

Похожие записи

Okay so i have my members script here and some errors below which i"ve tried to solve on my own after searching around a few places on google.

Basically set up how i want showing some debugging things somewhere in there marked by a comment. Theres really two-three errors.
1. MOD Rewrite is picking up the wrong rule its using &y= instead of &user=
2. Its only showing 2 out of three users.... http://joe.hrwr.org/members/
3. I"ll post with this error when i figure it out again >/

My htaccess File.

RewriteEngine On RewriteRule ^(+)/(+)/(+)/(+)/$ index.php?x=$1&y=$2&page=$3&id=$4 [L] RewriteRule ^(+)/(+)/(+)/$ index.php?x=$1&y=$2&page=$3 [L] RewriteRule ^(+)/(+)/(+)/$ index.php?x=$1&id=$2&pg=$3 [L] RewriteRule ^members/(+)$ index.php?x=members&user=$1 [L] RewriteRule ^(+)/(+)/$ index.php?x=$1&y=$2 [L] RewriteRule ^(+)/(+)/$ index.php?x=$1&id=$2 [L] RewriteRule ^(+)/$ index.php?x=$1 [L] RewriteRule ^(+)/$ index.php?pg=$1 [L] RewriteRule ^ver.jpg$ /Lib/imgvers.php

My Memebrs file.

memspage; $curr_mempage = (($pg * $mems_perpage) / $mems_perpage); $username = addslashes($_GET["user"]); if (!$username) { $getusers = $MySql->sqlQuery("SELECT * FROM `" . DB_PREFIX . "users` ORDER BY `id` DESC LIMIT $curr_mempage, $mems_perpage"); $gettotal = $MySql->sqlQuery("SELECT * FROM `" . DB_PREFIX . "users`"); $totalusers = $MySql->numRows($gettotal); $total_pages = ceil($totalusers / $mems_perpage); //start debug print $mems_perpage.", "; //total members per page print $totalusers.", "; //total users in db print $total_pages.", "; //total pages needed print $username.", "; //the username selected print $_GET["x"].", "; //current x page print $_GET["y"]; //errored y page its meant to be user. //end debug print "

"; $class1 = "row-a"; $class2 = "row-b"; $class = $class1; while ($mem_stuff = $MySql->fetchArray($getusers)) { $getperms_query = $MySql->sqlQuery("SELECT * FROM `".DB_PREFIX."groups` WHERE `lvlnum` = "$mem_stuff->userlevel";"); $getperms = $MySql->fetchArray($getperms_query); print ""; if ($class == $class1) { $class = $class2; } else { $class = $class1; } } print "
ID Username Position Status
$mem_stuff->id username/\">$mem_stuff->username $getperms->full_name Not Done
"; } else { } ?>


Anyone got some suggestions or answers?