Khalil Majdalawi's Blog Web development,Technology,Games and more…

30Jan/120

an error occurred while processing this directive

today i faced this problem "an error occurred while processing this directive" after uploading new drupal website using justhost.com hosting company, it turns out just a permission issue with files, i changed it to 755 and error disappeared

10Oct/110

Adding Dynamic Subdomains in Godaddy

Just go to your domain zone file editor and add * and your server IP into A(Host) records

Tagged as: No Comments
27Oct/100

PHP Excel Reader

Excel Reader opens an Excel spreadsheet using ODBC given a previously defined DSN (data source name) pointing to an existing Excel spreadsheet file.

Queries can be executed to retrieve the list of sheets in a spreadsheet, the names of columns of each sheet or the data in the cells as an array.

Download:
phpkode.com
phpclasses.org

Tagged as: , No Comments
5Oct/095

Delete .svn folders recursively using command line

some times i work on small projects with friends and we use Subversion to track and store code changes, collaborate, and share project files so once we finish we usually upload it somewhere by copying the whole project folder so i face that subversion makes folder inside each folder in the project called ".svn" and that take time to remove manually and unnecessary size to upload
so i run a command inside the project folder to remove that folders recursively before upload.

Run this:

find . -name .svn -exec rm -rf {} \;

4Jul/093

How to get client MAC address in PHP

<?php
exec('arp '.$_SERVER['REMOTE_ADDR'],$user_mac);
echo substr($user_mac[1],strpos($user_mac[1],':')-2, '17');
?>

Note : this technique only works on local area networks with linux based server and its impossible to get mac address in php over internet

Tagged as: 3 Comments