Skip to main content

Posts

Showing posts with the label php

PHP Curl and You

I have 2 servers which I wanted to talk to each other, one is a web server running Ubuntu and the other a Windows Server 2008. My task was to be able to create Active Directory users using PHP and from what is available, I found a very neat library for PHP called adLDAP . It had all the necessary functions needed to manage your Active Directory save for the very troublesome fact that you need to use LDAP over SSL in order for the module to be able to create accounts and change passwords. Everything else works without LDAP over SSL. At first I was trying my hand out in making it work without the LDAP over SSL. But after some research, I found out that it is required by Windows Server itself to accommodate account creation. Knowing a bit about certificates and on how modern browsers typically screws over displaying the page due to those 'certificates cannot be verified' errors, I had little choice in this matter. At first I thought maybe that error prompt could be a minor nui...

PHP Upload Limit

Sometimes, you write a code which has upload features or backing up a database then only to find out that your PHP installation limits your upload to 2mb. Ive encountered this problem while I was backing up databases using phpMyAdmin and realized that the file ive downloaded is too huge for an upload without tweaking the necessary files. So with this I resulted to editing the php.ini file to accommodate a larger file upload size. The php.ini file varies from one location to another depending on your install (may it be Windows, Mac or Linux).. In my Linux server (Ubuntu) its found in /etc/php5/apache2/ Here are the variables you need to watch file_uploads upload_max_filesize max_input_time memory_limit max_execution_time post_max_size You may change the values as you like but take note that setting some things higher (ie. memory_limit) would consume your resources a bit more. So be careful in editing. After tampering the settings, you may need to restart your Apache servi...