Avance Zone

Technical Experts Zone Blogs

Upload File in PHP with Error display, File Name, Size, Type and Srver temporary name

Upload File in PHP with Error display, File Name, Size, Type and Srver temporary name

<?php
   print "<B>\n";
   print "\nContents of \$_FILES:\n";
   foreach ($_FILES["file"] as $k => $v) {
      print "   $k = $v\n";
   }
   print "</B>\n";
 
if ($_FILES["file"]["error"] > 0)
  {
  echo "Error: " . $_FILES["file"]["error"] . "<br />";
  }
else
  {
  echo "Upload: " . $_FILES["file"]["name"] . "<br />";
  echo "Type: " . $_FILES["file"]["type"] . "<br />";
  echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
  echo "Stored in: " . $_FILES["file"]["tmp_name"];
  }
?>

Remove Autorun.inf and IQOSRTK.BAT virus like files from most of drives.

Remove Autorun.inf and IQOSRTK.BAT virus files from most of drives.
Below script used to delete the virus like files from your system. Please Try at your own risk.

Save the below as “Clean autorun virus.bat”  Download here : Clean autorun virus

c:
attrib -r -h -s autorun.inf
del autorun.inf
d:
attrib -r -h -s autorun.inf
del autorun.inf
e:
attrib -r -h -s autorun.inf
del autorun.inf
f:
attrib -r -h -s autorun.inf
del autorun.inf
g:
attrib -r -h -s autorun.inf
del autorun.inf
h:
attrib -r -h -s autorun.inf
del autorun.inf
c:
attrib -r -h -s iqosrtk.bat
del iqosrtk.bat
d:
attrib -r -h -s iqosrtk.bat
del iqosrtk.bat
e:
attrib -r -h -s iqosrtk.bat
del iqosrtk.bat
f:
attrib -r -h -s iqosrtk.bat
del iqosrtk.bat
g:
attrib -r -h -s iqosrtk.bat
del iqosrtk.bat
h:
attrib -r -h -s iqosrtk.bat
del iqosrtk.bat

PHP LDAP Connect with Bind, Serach, Fetch and Closing connection methord

PHP LDAP Connect with Bind, Serach, Fetch and Closing connection methord

Below function used to connect ldap through php programe, this working script is useful in checking and authenticating users in ldap for php login forms.

 
<?php
$all_users=array() ;
$ds='' ;
  $ds=ldap_connect('ldap.YourDomain.com','389')
  or die("Error while connecting to LDAP server") ;
# } # end if

if($ds)
 {
  $bind=ldap_bind($ds) or die("Error while binding with LDAP server");
  $search_result=ldap_search($ds,'ou=People,o=YourDomain.com','uid=username@YourDomain.com')
                  or die("Error while searching data in LDAP server") ;
  $ldap_entries=ldap_get_entries($ds,$search_result) ;
  $i=0;
print_r($ldap_entries);
  echo "<br>";
echo "$ldap_entries[0][dn]";
 
  echo "<br>";
  ldap_close($ds) or die("Error while closing LDAP connection") ;
 } # end if

?>

Unable to give the AutoFit

Qtn: Unable to give the AutoFit


Ans:
Chosse the rows that you want to autofit. and select height as “default” and  select “Optimal Row height” even you can wrap the Text/Values if needed in column properties.


Directly can’t able to edit and update the files from any Web portal.

Qtn: Directly can’t able to edit and update the files from any Web portal.


Ans:
You can update the files by setting OpenOffice as the default application for those file types. Also you can use “Web-Wizard” in files menu to convert any document to web page.


Unable to insert the row or column in merged cell

Qtn: Unable to insert the row or column in merged cell


Ans:
Download the package from http://extensions.services.openoffice.org/node/2092 .By installing the above macro package the problem of inserting/deleting of merged rows/columns would be solved .Goto Tools –> macro–> Run macho –> CalcEasyToolbar –> Insert row

Unable to insert the row or column in merged cell

Unable to insert the row or column in merged cell


“Contains“ Option not available while Filter

Qtn: “Contains “ Option not available while Filter


Ans:
This Feature can found in standard filter –> Regular expressions –> .*<Enter The Filter Word>.* (Even You can use Not Contains by suing <> instead of = )

`

Unable to view the MS Object icon in the Open office

Qtn: Unable to view the MS Object icon in the Open office


Ans:
You will find Open Office Objects , Similar and Equivalent to MS Office Objects where you can insert any objects like (Chart, Drawing,Presentation, Text, Formula)

Mouse Over option while inserting the Object is not working in Open Office

Qtn: Mouse Over option while inserting the Object is not working in Open Office


Ans: You can fine all the options you once inserted like (position,size,arrangement,edit etc). If you mean some additional actions when hovering , you can use macho in OpenOffice. Even You can Edit the objects live.

Solution for Error in Sending Mail in Simple Invoices Or symfony Mail server

Many Servers won’t allow masked domain name like localhost, This has to be replaced with ACTUAL mail server adrress like mail.YOURSERVERNAME.com

This will solve the mail issues and also Error in generating Invoces in SIMPLE INOICES application
Change the mail host in factories.yml in below path
/home/YOUR SERVER.COM/public_html/billing/lib/vendor/symfony/lib/config/config/factories.yml

mailer:
class: sfMailer
param:
logging:           %SF_LOGGING_ENABLED%
charset:           %SF_CHARSET%
delivery_strategy: realtime
transport:
class: Swift_SmtpTransport
param:
host:       mail.YOURSERVERNAME.com
port:       25
encryption: ~
username:   ~
password:   ~