server security for sessions

most of PHP application use session module. Commonly to provide user authentication and most of hoster providers store session files in /tmp directory. Session files from all users/sites at one dir, it is big security risk!

Looks like /tmp is shared between users and used to store authentication information, really bad idea.

Session module allow to change default path for session files (configurable is strong PHP side), so it simple for webmasters and PHP coders to solve this problem, just need to change session path like this:

session_save_path('/home/your_own_dir/tmp');

or

ini_set('session.save_path', '/home/your_own_dir/tmp');

cvs diff usage

Some Joomla and Mamaba solutions is so big. I have not problem with size - I just add new disks to my server.
I use control version software for all my projects (SVN or CVS) and it is very easy to share my work with another coders or track what I did here before year(yes, I provide support for all my projects).

So, common problem which I take latest weeks is that I have big applications and just export:
[code]
cvs export -r release_X_Y project
[/code]
Produce 30-50 megs, this take time to upload. So, I just put little optimization to my work and get only patches:
[code]
cvs diff -N -c -r release_X_Y -r release_X_Y > diffs
[/code]
upload patch and apply it to existing project is good way to spare time

Tags:
cvs, svn

what is PDO?

many clients ask me why I suggest to use PDO as part of optimization

it is very simple
PDO structures is native PHP drivers, which mean that was designed and optimized for PHP

Just image, libmysql use buffers and PHP interface use buffers. This mean that functionality is doubled! It is absolutely normal step to remove libmysql as layer. As part of server optimization this step require MySQL 4.1 as minimal version.

At the end, migration from libmysql usage to PDO save up to 40% server resources!

Tags:
PHP

Favorit editor need to be default

A long time ago, when I start to use my first FreeBSD workstation I used ee as simple editor (it is simple and very useful), after ee I use vi it take a lot more time to understand "how" and "why" it works, but... I don't stop it use.

Only one thing stop me to use vi as default environment for PHP based projects - miss XDebug support.
So, at moment at all my servers I use vi as default editor, sometime I have not root privileges and use next lines in .bash_profile


EDITOR=vi
export EDITOR
alias editor=$EDITOR

Where our time is going

Permalink

it is amazing, login screen go away and I just do my job :)

be carefully, don't forget to logout if you don't use trusted computer or don't know how else will use it. This feature wait one year ,after last visit before run logout automatically!

I work with GPix every day and only now I understood how many time I spent to admin login page

I spent to GPix near 2 hours(average) every day and I login minimum 3(average) times per day. My browser remember login and pass, so I wait page and click login 5-8 secs

All this mean that I spent minimum 90 minutes for latest year to login!!! and all this time I use two computers only! amazing
So, I implement "Remember my computer" button I think that it will be useful for GPix administrators.

Tags:

backlink checker

Permalink

this feature will per grid option and will allow another options
you will can to set price and keep backlinks require

Permalink

as result GPix will stay curl independent
and I don't implement crontab functionality(it will separated job)

This release is unofficial, this mean that official release will contain little more features and fixes.

I will be glad to see your opinions about 'backlinks' feature.

Download GPix

Permalink

this release contain fixes for 'create regions via admin' problems

it isn't backlinks related error. I made some optimizations in region.class.php, so thanks for testings.

In reply to by anonymous_stub (not verified)

Permalink

looks like permission problem

post updated

In reply to by anonymous_stub (not verified)

Permalink

file re-uploaded and verified

please notice me if you still have not rights

I have received several mails from active GPix testers about 'back links' functionality.

It is common way to increase you site rank and don't spend direct money for this.
So, I see common problem 'curl' extension and cron setup.

As result I will try to implement this functionality without this requirements.

Tags:

netcat common usage

do you have several servers?
do you transfer data between them?

time to time I transfer data between servers and in most cases I use

scp local-file user@host:/path/remote-file

to send file or

scp user@host:/path/remove-file

to receive

for this task netcat is useful too, so it can be like this
server side

nc -l -p 12121 > local-file

and at client site I just need to

cat local-file | nc host 12121

of course 12121 need to be replaced with something random because "nc" don't provide authentication and encryption

Tags:

ssh(putty) session particularity

Often I develop and control process using ssh(putty) session. Connection with server allow me monitor and do related sub-task like svn/cvs updates.

I don't like when my session give timeout message - server require activity. I use "top" on my local server, but some third party environment don't allow me this (have not access to top!), so I just thinking about this situation after couple minutes of googling discover 'watch' command.

It is so easy:

watch ls

and you session keep alive

GPix 1.3.2

Permalink

congratulations, 1.3.2 released!

GPix users, I want to notice you don't forget to review CHANGELOG.txt, before update

New release included next:

Currently I wait test results, so it will take several days to see release at TUFaT

Tags:

Grids as options

option list via direct lists for multiple grids (http://forum.tufat.com/showthread.php?p=153689)

To implement this feature in your skin, you need to apply next changes
index.tpl:

{if $links}
{foreach item=link from=$links}
{$link}   
{/foreach}
{/if}

replaced with:

{if !$app->setting->grids_as_options}
{if $links}
{foreach item=link from=$links}
{$link}   
{/foreach}
{/if}
{/if}

after this line


in toolbar.inc.tpl
insert next code:

{if $app->setting->grids_as_options}
##Grid:##

{html_options options=$grids_names selected=$smarty.request.grid}
   
{/if}

Tags: