Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Install both 32 bit and 64 bit WAMP server

WAMP server is a platform tool for serving PHP applications on Windows. It includes a combination of Apache, MySQL and PHP service which can help developers test or run PHP applications with minimal setup.Sometimes one would first have a 32 bit version of WAMP installed and a few applications have been configured. But later s/he would mistakenly installed a 64 bit version of WAMP and somehow the 32 bit version configuration is overwritten. This causes a problem where the old applications configured for 32 bit WAMP will not function any more even if the 32 bit version of WAMP server is started....

12,410 0       PHP WAMP 64 BIT 32 BIT MULTIPLE VERSION


  Sending message to Slack Incoming Webhook using PHP

Slack is a popular work collaboration tool and it provides many features which help teams collaborate. It has one function which allows sending messages to channels from external source such as your own web service -- Incoming Webhook. This is extremely useful when want to monitor something and get notified when some event occurs and it doesn't require complicated setup.To send messages using Incoming Webhook, a service URL has to be generated on Slack and then the message can be posted to this URL and it will be posted on your team channel. After clicking "Add Configuration", the process...

25,786 0       PHP CURL SLACK INCOMING WEBHOOK


  Resolving error "SSL certificate problem: self signed certificate in certificate chain"

In a PHP application, cURL is frequently used to make connection to remote server to request some resource. It can be used to transfer data with different protocols such as HTTP, HTTPS, FTP etc.While using cURL in PHP, someone may get an error with message similar to "SSL certificate problem: self signed certificate in certificate chain".This may happen when cURL tries to make a SSL connection server and the server returns a server certificate which is self-signed and it's not trusted by the client(in the client CA store). In this case, you may need to follow below steps to resolve this issue....

28,925 1       PHP SSL CURL TWILIO


  PHP to output string to client terminal

It is a common task to echo messages to the user using PHP. There are lots of ways where the message can be echoed to the client terminal(browser or console window) through PHP. These includes some well know debug methods like var_dump() and var_export() etc. In this post, we will show you some other methods shared by Laruence, one of the core members of PHP development team.1. echoFirst comes with the most common one : echo.$str = "Hello PHP\n";echo $str;2. printThen comes another common one : print.$str = "Hello PHP\n";print $str;3. php://outputAlso we can use file_put_contents() t...

40,142 0       PHP TRICKS DEBUG OUTPUT


  Fix WampServer offline issue

WampServer is a web server on Windows which provides easy to use features for PHP developers. You can easily setup a web server by installing WampSserver without much hard to understand configurations. After installing it and with a simple configuration, you just need to double click it and start all services and your server is gonna up. If the server starts up normally, you will see a green icon which indicates the working status at the taskbar. But if you don't see the green icon shown up, instead you see an orange icon, you are encountering a problem that the server cannot be started n...

3,633 1       PHP APACHE WAMPSERVER


  Some tricks on PHP session

1. Session timeout problemThere is a nuance we found with session timing out although the user is still active in the session.  The problem has to do with never modifying the session variable. The GC will clear the session data files based on their last modification time.  Thus if you never modify the session, you simply read from it, then the GC will eventually clean up. To prevent this you need to ensure that your session is modified within the GC delete time.  You can accomplish this like below. if(!isset($_SESSION["last_access"]) || (time() - $_SESSION["last_access"]) >= ...

13,725 4       PHP SOLUTION SESSION TIMEOUT VARIOUS DOMAIN


  Handy PHP functions should be in your toolkit

When developing projects, there are always some common work should be accomplished, for example, encrption/decryption, get IP. As a PHP developer, you should have a list of the handy functions in your toolkit so that you can pick up in every project you work on. Here is a summary of some handy PHP functions.1. PHP encryption/decryptionEncryption/decryption can be used when storing user confidential information such as passwords. Below function uses base64 and MD5 to accomplish encryption/decryption.function encryptDecrypt($key, $string, $decrypt){ if($decrypt){ $decrypted = rtrim(m...

4,931 0       PHP SQL INJECTION FUNCTION REAL IP


  Useful functions to provide secure PHP application

Security is a very important aspect of programming. There are many functions or modules in any kind of real programming language providing security functionalities  In modern websites, we may often get inputs form users all around the world.There is a famous saying which says that never trust user input. So in web programming languages, we will often see functions which will guarantee the security of the data input from users. Today we will cover some of these functions in the most famous open source language  - PHP.In PHP, there are few useful functions which is very handy for preve...

25,966 0       PHP SECURITY SQL INJECTION XSS AJAX