TUFat 3.1.2

TUFaT 3.1.2 was released with next changes:
pyjuk7icsm

  • "remember me" option for tree login
  • improve portrait handler
  • multiple fixes for magic_quotes_gpc problems

Now, this family tree script marked as stable and new features will be implemented.

GPix 1.4.1

Main goal for GPix versions 1.4.x is integration with third party systems. GPix 1.4.0 was release with integration API. Now, this API is improved and new integration modules added.

So, if you use vBulletin, Drupal, Mambo or Joomla. GPix can handle user authentication for this systems. As result you existing user don't need separate registration for GPix. More all existing users will be handled automatically.

Fight with empty pages or enable error reporting and debug

When users install scripts or play with functionality they can get 'white page'. Commonly page without content mean that something is wrong and you can not see errors, warnings or notices, because reports of this type disabled by php configuration.

optimization with memcached - is it simple to implement?

memcached is service which provide memory cache storage. It can provide access to cached object via network and it is extrimly fast!

memcashed pecl module is a way which can be used to access cache storage. How it work? It more complicated instead Cache_Lite, but it is fastest. This fact can be explain: Cache_Lite use file system to store cache objects.

PEAR::Cache_lite - speed, simplicity, security

One way to speed up web application is to lower database usage. Databases designed to provide very fast manipulation with data in files. Often developer use databases for everything and store session data, user files. This action make tables big and database server work slowly...

site optimization cases

Ever site have content for cache or pregenerate.

Why cache need to be part of optimization? - if you know what you do and how it is very fast way to lower server load. So, after load is lowered you will have time to think about logical optimization ;)

What we can cache?

  • content
  • sql results
  • functions results
  • logical results(which isn't design as separate functions)

Fast file transfer with pseudo HTTP server

Time to time I need to transfer site from server to server very quickly and have not common solution for this, because I have permissios.

Solution is to use http server if you have this one of server with backups or use netcat.
On server side I run

nc -l -p 8080 < mybackup.tar.gz

or
netcat -l -p 8080 < mybackup.tar.gz

and now can use wget, curl or browser for this url:
http://serveradress:8080

if you sent link to client it will best to do little more:

(echo -e "HTTP/1.1 200\nContent-Disposition: attachment; filename=mybackup.tar.gz\n
Content-Type: application/octet-stream\nConnection: close\n"; cat mybackup.tar.gz ) 
| nc -vv -l -p 8080

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:

  cvs export -r release_X_Y project

Produce 30-50 megs, this take time to upload. So, I just put little optimization to my work and get only patches:
cvs diff -N -c -r release_X_Y -r release_X_Y > diffs

upload patch and apply it to existing project is good way to spare time

Advanced proxy usage

Sometime application don't support proxy.... and it is a big problem, because you can not access internet directly or really need to hide you ip.

In this case Linux(Debian) users can use dante-client

sudo apt-get install dante-client

append next lines

   route {
      from: 0.0.0.0/0 to: 0.0.0.0/0 via: proxy.example.com port = 3128
      proxyprotocol: http_v1.0
   }

to /etc/dante.conf
and simple run you program with socksify, for example

socksify kopete

Syndicate content