SOHO : Small Office Home Office
Freeware - Opensource software tips, tricks, tweaks & fixes for managing, securing, improving the performance of SOHO Desktop, Laptop, Networks
Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Monday, November 19, 2012

EasyPHP error cannot run specified program



EasyPHP is a COMPLETE WAMP package and READY-TO-USE ENVIRONMENT for PHP DEVELOPERS including the server-side scripting language PHP, the web server Apache, the SQL server MySQL, as well as development tools such as the database manager PhpMyAdmin, the debugger Xdebug and many others. Nothing to configure. It's already done! You just need to download, intall ... and code. The administration page allows you to list the docroot, extensions,change the Apache port, the timezone, max execution time, error reporting,upload max filesize, add/remove alias, manage modules.

After installing and running the easyphp I got an error 
"The system cannot execute the specified program" 

Solution:
You are trying to run some program on Windows (such as apache.exe or htpasswd.exe) and you are getting "The system cannot execute the specified program" error. This usually means that the program you are trying to run was compiled against DLLs that are not on your system.

The Apache 2.x binary windows distribution, specifically, was compiled against the Visual Studio 2008 re-distributable package, which you can download from microsoft.

Download link:
Microsoft Visual C++ 2008 SP1 Redistributable package (x86)

Microsoft Visual C++ 2008 SP1 Redistributable package (x64)

Microsoft Visual C++ 2008 Redistributable package (choose from the list of downloads accordingly)



Continue Reading...

Monday, March 26, 2012

Install ioncube loader in ubuntu

IonCube protects software written using the PHP programming language from being viewed, changed, and run on unlicensed computers.
1. Download ionCube loaders to suite your system architecture
wget http://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
2. Extract
tar zxvf ioncube_loaders_lin_x86.tar.gz
3. Move to a permanent location
mv ioncube /usr/local/lib
4. Add reference to your php.ini file (sudo nano /etc/php5/apache2/php.ini)
zend_extension = /usr/local/lib/ioncube/ioncube_loader_lin_5.2.so
There are a few versions of the loader in the tar archive and you must  choose the one as your php version ( check php version with command  php -v )
5. Restart apache
/etc/init.d/apache2 restart
6. Verify
Print phpinfo() and notice the following red rectangular, "with the ionCube PHP Loader v4.0.1, copyright(c) 2002-2010, by ionCube LTD"
Continue Reading...

Sunday, May 22, 2011

How to Show if your server is Online or Offline?

One way to try to find out if a server is online is to try and open a socket connection to the server. If the connection fails, one can assume that the server is down (although the problem can be somewhere else too).

Check out this function and read all the user comments:

Here's a very simple demonstration of php code:
<?php if (fsockopen('www.yourserver.com', 80)){     
echo(
'The server in online');  

} else{  
 
echo(
'The server in offline');  
?>
The first parameter is the IP address of the server you want to check (in this case, www.yourserver.com, it could also be something like 111.222.333.444). The 80 is the port number (for HTTP), which can sometimes be different (21 for FTP etc.).
Continue Reading...

Thursday, August 19, 2010

Simple Ad Rotator PHP script

Overview: Creating a simple ad-rotator, the ads are stored in a text file and picked randomly by this PHP code.

Most of the webmaster use banner ads, we will be creating a very simple banner rotator, which picks up randomly one ad from the banner file and displays it, this file can be called in any other page to display the banners.

We will be storing banner ads in a text file banner_ads.txt

banner_ads.txt

Note that the banners are seperated by ~ in our banner file.










ad_rotator.php

The above 'ad_rotator.php' can be included in any PHP page to display a banner ad by using include 'ad_rotator.php'; tag wherever banner is required.

The above concept can be also be used to display random quotes etc, just modify the banners_ads.txt with the random content you want.


Continue Reading...