Tag: PHP
How to update to php 5
by admin on Aug.16, 2011, under DirectAdmin
Note: If you want the latest version of php and apache, it’s recommended you use custombuild:
http://files.directadmin.com/services/custombuild/1.1
The following guide is only to be used if if you still want to use the old apache versions… basically, only if you still need FrontPage.
To update to php5, the build script will still work. All that you need to do is swap out the version, compile normally and make a few modifications to your /etc/httpd/conf/httpd.conf file.
1) download the php-5.2.4.tar.gz from php.net into your customapache directory:
cd /usr/local/directadmin/customapache
wget http://files.directadmin.com/services/customapache/php-5.2.4.tar.gz
2) change your build script for the new version:
nano build
change: PHP_VER=4.4.4
to: PHP_VER=5.2.4
3) build php normally:
./build clean
./build php n
If you’re using apache 2.x, use
./build clean
./build php_ap2 n
instead.
4) edit /etc/httpd/conf/httpd.conf
Remove any referce of:
LoadModule php4_module modules/libphp4.so
and make sure they’re replaced with:
LoadModule php5_module modules/libphp5.so
Remove any reference of:
AddModule mod_php4.c
and replace with:
AddModule mod_php5.c
5) find this piece of code:
<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi
</IfModule>
replace with:
<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php5 index.php3 index.phtml index.cgi
</IfModule>
Find this:
<IfModule mod_php4.c>
AddType application/x-httpd-php .inc .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
</IfModule>
(it might have AddHandler instead of AddType)
replace with:
<IfModule mod_php5.c>
AddHandler application/x-httpd-php .inc .php .php5 .php4 .php3 .phtml
AddHandler application/x-httpd-php-source .phps
</IfModule>
Then restart apache.
If you get the following error while compiling php:
checking whether to enable LIBXML support… yes
checking libxml2 install dir… no
checking for xml2-config path…
configure: error: xml2-config not found. Please check your libxml2
installation.
*** There was an error while trying to configure php. Check the configure.php file
Then edit the configure.php file (or configure.php_ap2 if you’re using apache 2), and change:
–with-xml \
to:
–disable-libxml \
–disable-dom \
–disable-xml \
–disable-simplexml \
–disable-xmlreader \
–disable-xmlwriter \
or else install the missing rpms/packages for xml. (libxml2-dev and libxml2-utils on debian). Redhats:
yum -y install libxml2-devel libxslt-devel
FreeBSD:
pkg_add -r libxml2
pkg_add -r libxslt
On debian systems if using apt-get to install libxml2-dev and libxml2-utils doesn’t work, then install from source:
wget http://files.directadmin.com/services/customapache/libxml2-2.6.30.tar.gz
tar xvzf libxml2-2.6.30.tar.gz
cd libxml2-2.6.30
./configure
make && make install
then recompile php as usual.
Incoming search terms:
php-5 2 4 tar gzWhich Is Right For Me: Windows Hosting or Linux – Unix Hosting?
by admin on Jul.20, 2011, under Tutorial
We all have our preferences when it comes to operating systems some people prefer one of the many flavors of Windows, while others prefer one of the several distributions of Linux. It is all the matter of what works best for you. Another aspect that should be taken into consideration when determining which type of hosting you should use Windows or Linux/Unix, is what you intend to do on your website.
There are many differences between the two operating systems. However, when it comes to hosting there are just as many differences. Some people with Windows operating systems choose to use Linux/Unix hosting. On the other side of the coin, some people who use Linux/Unix operating systems choose to use Windows hosting. Do you find this confusing? If so, you are not alone. You may be wondering how this would work.
Well essentially, when you acquire hosting for your website, you are basically paying someone else to host your website on their computer. These computers also have operating systems. Therefore, when you choose Windows or Linux hosting, this will mean that the computer your website is run from is using that chosen operating system.
Windows Hosting
Windows is perhaps one of the most well-known and popular forms of operating systems. There are many advantages to using Windows hosting. Because millions of users have Windows and use the many Microsoft products such, using Windows hosting would allow you to easily integrate any of these products into your website. Windows hosting would also allow you to run ASP (Active Server Pages) on your website, which is placing dynamic content on your website using computer scripts.
What is great about Windows is that it boasts an easy to use interface perfect for beginners. There are usually many options such as ASP mail, Access Database, ASP.NET, and SQL Database, IIS, and PHP. Windows hosting also allows for publishing websites with FrontPage,
As with almost anything in this world, Windows hosting does have its disadvantages. One of the main disadvantages is the costs. One Microsoft server, if buying your own, will cost you a couple of thousand dollars, if you were running the software yourself. You have many choices when it comes to software such as Windows 2003, Advanced, and Windows 2000 server. However, with the competitiveness of the hosting industry, you will find the Windows hosting is extremely affordable when using a remote server.
Linux/Unix Hosting
Linux and UNIX hosting are two different types of operating system that are extremely similar to one another. In essence, the two are closely related something like cousins; therefore, they are generally combined in hosting. Now what is great about Linux/Unix is that you have the ability to integrate unmatched security into your website. There are also many other benefits of the duo that make it the choice for many people.
One such benefit is the fact that Linux/Unix is extremely compatible with PHP, which is the latest craze in programming languages. Cost is another very attractive benefit of the duo. In many cases, the operating system is free. Some distributors have begun to charge for the system, but many are still available for no costs. For little to no cost, additional software can be obtained for Linux/Unix such as BIND, Sendmail, Apache, and APF Firewall.
Security is probably the most popular benefit of using Linux/Unix hosting. The level of security offered by this duo is unmatched by Windows hosting. To add to the benefits, statistics show that this operating system offers more overall stability and control in operation as well.
With Linux/Unix hosting, you have the ability to integrate Chmod permission, Mod Rewrite, Apache Web server, as well as MySQL and PHP.
Of course, as with Windows hosting there are some disadvantages to using Linux/Unix hosting. The main disadvantage being ease of use. Unlike Windows hosting, Linux/Unix hosting does not contain an easy to use, user-friendly interface. Basically, it requires a large list of commands to use and is not recommended for the beginner. This type of hosting requires a great deal of technical knowledge and familiarity to install and control.
Which one is for you?
Well, in short, it depends on what you need. If you need intense security, PHP compatibility, have technical knowledge, and you do not need to have all the latest website features, Linux/Unix hosting may be the right choice for you.
However, if you need a website that offers ASP, an easy to use interface, and the ability to integrate Microsoft products, then Windows hosting is the best decision for you.
As you can see choosing between Windows hosting and Linux/Unix hosting, all depends on what you need on your website, your level of experience, and of course, your overall budget.
Incoming search terms:
vps windows indonesia,comment windows hosting,unix vs linux hosting which one is the best?,which windows is best for meFatal error: Allowed memory size of 123456 bytes exhausted (tried to allocate 234567 bytes) in /path/file.php
by admin on Apr.18, 2011, under DirectAdmin
Php is setup is to limit memory usage per process. If you require more, this limit can be increased.
Edit
/usr/local/lib/php.ini
and set:
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
to a higher value, like 20M. Save, exit, then restart apache.
Incoming search terms:
allowed memory apache,directadmin Allowed memory size of,error 123456,fatal error upload allowed memory size php post,fatal error: allowed memory size of,php 123456LiteSpeed Web Server 4.0.5 Released
by admin on Apr.09, 2011, under News
About LiteSpeed Technologies, Inc.
| Version | Release Date | Type |
| Web Server 4.0.5 | 06-26-2009 | Minor Feature/Security Enhancements |
|
||
Incoming search terms:
LiteSpeed Web Server hack,software faster internet 2011LXAdmin Administrator Tutorial
by admin on Feb.16, 2009, under Tutorial
LXadmin “Host in a box” is the only control panel that makes use of Lighttpd and DJBDNS which only uses 8 MB of RAM with a freshly installed system. The control panel itself uses 1 MB of RAM when idle. LXadmin “Host in a box” is part of LXadmin, the leading light-weight control panel in the industry. The only difference between the two is the use of different daemons.
This lightweight control panel has all of the features included in all leading control panels such as mail, spam filter, PHP, CGI, Perl, SUexec, FTP, MySQL and much much more. You will get to find out more in this document as you read.
2a. Accessing the control panel
|
There are several ways to access LXadmin: http://yourdomain:7778 – You can access the control panel through any hosted domain by putting :7778 at the end of the domain. https://yourdomain:7777 - You can access the control panel securly using SSL through any hosted domain by putting :7777 at the end of the domain. http://192.168.0.1:7778 or https://192.168.0.1:7777 - You can access the control panel through any IP address allocated to the server. This is useful when your domain transfer has not yet propagated. A window (top right image) will appear. Enter your username and password and you should have successfully logged in. |
|

To change your password, click client home and then on the top right corner, you will see the password tab. Click on it and fill in your existing password and the new password twice and click Update.
You have to add a DNS template initially. DNS template is the DNS configuration which will be copied to your domain’s DNS when a new domain is created. For adding a DNS template, you have to basically specify the primary and secondary nameservers for the domains you are planning to create on this server. For instance: ns1.lxlabs.com and ns2.lxlabs.com . The name is simply an identifier which will be used later when creating the domain.
For creating a new DNS template,
go to “Client Home” page and under “Domains“, click the “DNS Templates” icon

In the DNS Templates page, you can see the list of existing DNS templates. If you do not have any existing DNS template, create a new DNS template by clicking the “Add DNS Template” tab on the top.

In the next page, enter the DNS information for the template:

Click the “Add” button and the new DNS template is created. You can see the new DNS template in the list of DNS Templates

Click on the new DNS Template name to edit DNS records like NS, A, CNAME, MX and TXT

Before you proceed to add a new Reseller, you have to add a new plan for the new client/reseller
To add a new plan,
To add a new plan, click “Client Plans” icon

In the next page, click the “Add Client Plan” tab.

Here you can enter the plan details like:
Client Plan name)
Description of the plan
Number Of Clients allowed
Number Of Domains allowed
Disk Usage (in MB)
Number Of Subdomains allowed
Mail Disk Usage (in MB) limit
Number Of Autoresponders allowed
Number of Mail Accounts allowed
Number Of Mailing Lists allowed
Traffic (in MB per Month) limit
Maximum number of MySQL Databases
Maximum Number Of Domain Users
Ability to add more domains
Ability to set Disabled URL
Ability to Enable Ssl
Ability to Enable Statistics
Ability to Enable Cgi
Ability to Enable Php
Ability to Enable Asp.net (ignored On Linux)
Allow Scheduler Management or not
Allow Backup Scheduling or not
Allow Backing Up or not
Can Manage DNS or not
Once you have created the plan, go back to the “Client Home” page and click the “Clients” button link

This page will list your existing customers and resellers. If you do not have any, click on either the “Add Reseller” tab that you see on the top.

In the “Add Reseller” page, enter a name for your Reseller, password and email address.
If you enable the “Send Welcome Message” check box, an email with the account details will be sent automatically to the Reseller’s email address.
Select the plan you have created earlier and click “Add” button.
Now in the “Clients” page, you should be able to see the new Reseller that you have created:

