LAMP How To – Open Source At Work

Only Passion Matters

Entries for January, 2010

php coding standard and tips

It is important that developers follow a certain coding standard to help make the code readable and maintainable. These are what I gathered so far as the best coding practice:
File formatting:
- Never close php tag when using zend framework, ie, “?>”
- Use 4 space indentation as tab spacing. It is possible to configure this in [...]

Installing SVN on a samba shared drive in mac

1. Configure the samba share in linux. It needs to have the “delete readonly = yes” line, if not, you will permission errors in .svn/entries when checking out projects in mac. so we need something like this:

[homes]
comment = LAM IT Home Directories
[...]

mounting windows share on local machine via samba – fixing selinux

if you are running selinux, you get this error

SELinux is preventing samba (smbd) “getattr” to /mnt/blarblar (cifs_t). For complete SELinux messages. run sealert -l e523015e-150a-4736-80c1-c7a40af6d396″

In fstab, we need to mount samba with the right context like so:

//10.2.115.11/linuxbackup /mnt/blarblar  cifs domain=MYDOMAIN,user=backupservice,password=blarblar,context=system_u:object_r:samba_share_t:s0 0 0

or using command line, remember to use the right context

mount –context=”system_u:object_r:samba_share_t:s0″

I found the “samba_selinux” [...]