Compiling PHP for WebStart

I use a Mac based application called WebStart that is excellent quality however the updates for PHP and other components are slow and I have been searching all over and been trying to get support from the admins but to no avail. I have however figured out how to compile new versions of PHP from source to work with WebStart.

You need to download and extract the latest version of PHP that you want use then from terminal go into that folder and run the following commands (This is for PHP 5.3.x):

$> ./configure --prefix=/usr/local/webstart/sw/php-5.3 --with-config-file-path=/usr/local/webstart/sw/php-5.3 --with-apxs2=/usr/local/webstart/sw/apache2/bin/apxs --with-db4=/usr/local/webstart/sw/bdb/ --with-kerberos=/usr --with-mcrypt=/usr/local/webstart/sw/lib-mcrypt --with-mhash=/usr/local/webstart/sw/mhash --with-ldap=/usr/local/webstart/sw/openldap --with-pgsql=/usr/local/webstart/sw/postgresql --with-mysql=/usr/local/webstart/sw/mysql --with-mysql-sock=/tmp/mysql.sock --with-mysqli=/usr/local/webstart/sw/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/webstart/sw/mysql --with-iodbc=/usr --with-zlib-dir=/usr --with-bz2 --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-shmop --enable-sockets --enable-mbstring --with-gettext=/usr/local/webstart/sw/gettext --enable-exif --with-jpeg-dir=/usr/local/webstart/sw/lib-jpeg --with-png-dir=/usr/local/webstart/sw/lib-png --with-freetype-dir=/usr/local/webstart/sw/freetype --with-gd --enable-gd-native-ttf --with-curl=/usr --enable-ftp --disable-rpath --with-xsl --enable-soap --enable-bcmath --enable-calendar --enable-cli --disable-debug --with-openssl --with-xmlrpc --with-iconv=/usr/local/webstart/sw/lib-iconv --with-mssql=/usr/local/webstart/sw/freetds
$> make
$> make test
$> sudo make install

After that you will need to modify the files in Apache a bit:

$> cd /usr/local/webstart/sw/apache2/modules
$> sudo rm libphp-5.3.so
$> sudo mv libphp5.so libphp-5.3.so

Then with the apache main configuration editor in Webstart and look for “LoadModule php5_module modules/libphp5.so” and put a “#” in front of it causing it to be commented out. After that restart the server once you save the configuration and your PHP is updated! I will try to figure out how to get the latest versions of Apache working for you, I will be back when I have that information regarding this application.

Posted in Uncategorized

PHP 5.4.0 Released!

All users of my server, please prepare even harder for PHP 5.4.0, because they just released it and I will be upgrading as soon as it is ready and pushed as an update. Right now you can you test your code by adding the previously stated php-dev handlers to the .htaccess of the folder you want running on PHP 5.4.0.

AddHandler application/x-httpd-phpdev .php

Just add this to the .htaccess file and you will be able to test the new version on your code, so that it doesn’t break with the upgrade. Additionally, I will be adding a new branch php-old which will allow you to keep your code running php 5.3 for a specific time, however it will not have all of the features the current system will it will allow you to work on upgrading your code to php 5.4.0.

AddHandler application/x-httpd-phpold .php

Posted in Uncategorized

Server Upgrade

If you recently noticed your site down, fear not I was in the process of upgrading the server. I am now using CentOS 6.2 with PHP 5.3.9. If you have any issues please feel free to put in a ticket in support and I will take care of it for you.

I have also updated the system to now have PHP 5.4.0 RC6 as the development version of the PHP for future testing your code. I would highly suggest you start doing this now so that you can prepare for the upcoming version of PHP 5.4.0 being introduced to the server.

You can now make a directory’s PHP files run under PHP 5.4.0 by adding at the top of it:

AddHandler application/x-httpd-phpdev .php

If you have any requests for the server please contact me and I will review and install them.

Posted in Server Administration

My Letters to Congress/Senate

Congressman/Senator ********,
Please vote against the SOPA/PIPA Bill(s) when and if they come to vote. I respect copyright laws and the reasons behind them, being an intellectual property owner myself. I however believe and know that this Bill will do more harm than benefit to the United States and it’s interests. I on a daily basis work with the internet as a Web Developer professionally and I know that the tools that are being proposed to help fight piracy are only going to hurt those who are not at fault, all the while allowing the ones responsible to continue with their piracy. Additionally small businesses, such as my own, will easily fall prey to the claims of larger entities and pass from existence because they are not allotted the freedom to present their ideas. The internet as we know it, is as the United Nations states, a civil liberty and giving way for this Bill to be passed would allow for an abuse of the law system unseen of before. I humbly ask that you represent me and the rest of your constituents with honor and acknowledgement of our will. We, the people, ask you to decide carefully when you once again approach the subject of SOPA/PIPA and any bills that would threaten the existence of the internet as we know it and the freedoms that we hold dear. Thank you.

Respectfully,
Rev. Alfonso E Martinez, III
Owner, Dark Prospect Games & Hosting
http://darkprospect.net

Posted in Uncategorized

Anubis Server Has Been Updated to PHP 5.3.9

I have updated the server with the latest PHP and will be adding PHP 5.4.0 later on and moving 5.3.9 to a php-legacy branch for backwards compatibility for a few months until users are able to get their code upgraded to PHP 5.4.0.

On top of this I have also installed a better security protocol and firewall to prevent brute forces from accessing the server. Recently we have attained the attention of some scripts trying to root the server. If you are locked out just contact me and I will make sure that it gets resolved.

Posted in Server Administration Tagged

New Elemental Fury Features in Planning

Ranking

As of Elemental Fury 2.0, you will see a new way of ranking bringing some current features more into the light that have been familiar before. Before it was all based on power, now it will be based on a variety of things.

Below you will see these with their descriptions:

Power - The raw power your realm presents, including all the power of your units and defenses
Population Size - How many people you have in your realm
Battle Experience - This is earned by attacking or successfully defending against an attack, failed defenses can take a small percentage from you.
Game Play - Now being active in game has its bonus! You will now have a percentage of your rank be based on how active you are, however not as weighted as the other ranks.

To Be Decided Upon
Diplomacy
 - What you do in regards to others in the world, for example creating or joining a Faction, building reputation with a Faction, etc.
More Ideas to Come!

Realms, Groups and Battle

At Dark Prospect Games, we are always trying to find new ways to improve the game and the balance of the interactions between people. From this desire to improve the game play for all players veterans and newly registered, we have come up with a new system that will help that a become possible.

Currently in the 1.x system we have Continents that do not give any real distinguishable difference between accounts and no costs for doing cross continent attacks. With version 2.0, however we will be making those continents more segregated and unique with an inability to attack one another without cost. Each realm will have an X and Y coordinate on their continent that will show distance from another player. Mana will be the price for attacking and the farther you have to travel the more that cost is and the longer those units take to get there.

Additionally the system in which we have spells and units now, will be done away with. The new 2.0 version will have groups of units that specialize in one offensive and/or one defensive spell/weapon (depending on your race.) Additionally there will be several types of spells/weapons that can be used each with a bonus over other types and weakness against others. When grouped together the potential power will increase.

In order to do battle, you will have to (as stated above) use mana and wait for that attack to conduct. The units will travel the attacked realm and then proceed to siege their realm. Once they are finished attacking they will then return to their realm of origin.

As you can see there are many balances and checks to be made in the new system and I am glad that I have such awesome players to help keep me coming up with new ideas.

Posted in Uncategorized

PHP-Dev Debugging

As I found out earlier today, after trying to replicate the environment in PHP dev as I have via cPanel, you do not want to use –prefix=/usr at all. I had both the /opt/phpdev directory and the /usr directory as prefix tags and evidently I did not see it. It ended up breaking the 5.3.8 install until I was able to recompile the proper paths in cPanel.

As a side note the new dev version currently usable on the server is PHP 5.4.0 RC2. Again contact me for details on how to prepare for the new version upcoming. Thanks!

Posted in Uncategorized Tagged , , ,

Obsidian Moon Engine Release for Open Source Under BSD License

After much thought and self debate, I have released the Obsidian Moon Engine under a free open source BSD License for anyone to use, with the inclusion of Powered by Obsidian Moon in their site.

Anyone can make a game or site with this framework easily, and it is quite light because the goal of the project is 100% modularity. Contributors will definitely get credit for the work they do on my Engine and I hope that it brings joy to programming for many people.

Posted in Uncategorized Tagged , , , , , , ,

Prepare for PHP 5.4 on Anubis

For those of you who are residing on the Anubis server, please make sure that you are fully prepared for PHP 5.4 by checking all the deprecations and removals before the upgrade when PHP 5.4 releases. I am planning on releasing it once it becomes available via cPanel. Currently it is in Release Candidate 1, and should receive one more RC before finalizing the release for public consumption. Thank you to all the users for your understanding and I hope you enjoy using the new PHP when it becomes available.

Posted in Uncategorized Tagged , , , , , ,

How to Compile PHP-Dev for cPanel

After much research and experimentation I have found that creating a secondary/test php install is not too hard, but can be challenging if you don’t know what you’re doing. I spent all night working on creating a decent installation of php. First of all you need to install these packages for your (CentOS or Fedora) server.

yum install aspell-devel curl-devel cyrus-sasl-devel e2fsprogs-devel freetype-devel glibc-devel keyutils-libs-devel krb5-devel libgcc libidn-devel libjpeg-devel libpng-devel libselinux-devel libsepol-devel libstdc++-devel libX11-devel libXau-devel libXdmcp-devel libxml2-devel libXpm-devel mysql-devel net-snmp-devel openldap-devel openssl-devel tcp_wrappers zlib-devel

After you have those you can then go about downloading and installing the developers version of PHP:

wget http://downloads.php.net/stas/php-5.4.0RC7.tar.gz
tar xzf php-5.4.0RC7.tar.gz
cd php-5.4.0RC7

Note: You can use this method with any version of PHP.

After this we can then get to creating the configure for the make and install, pay attention to the –prefix=/opt/phpdev because that represents the location we will use:

./configure --disable-fileinfo --enable-bcmath --enable-calendar --enable-exif --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-mbstring --enable-pdo=shared --enable-soap --enable-sockets --enable-wddx --enable-zip --prefix=/opt/phpdev --with-bz2 --with-curl=/opt/curlssl/ --with-freetype-dir=/usr --with-gd --with-gettext --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-jpeg-dir=/usr --with-kerberos --with-libdir=lib64 --with-libexpat-dir=/usr --with-libxml-dir=/opt/xml2 --with-libxml-dir=/opt/xml2/ --with-mcrypt=/opt/libmcrypt/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli=/usr/bin/mysql_config --with-openssl=/usr --with-openssl-dir=/usr --with-pcre-regex=/opt/pcre --with-pdo-mysql=shared --with-pdo-sqlite=shared --with-pic --with-png-dir=/usr --with-pspell --with-tidy=/opt/tidy/ --with-xmlrpc --with-xpm-dir=/usr --with-xsl=/opt/xslt/ --with-zlib --with-zlib-dir=/usr --with-config-file-path=/opt/phpdev

make
make test
make install

We then want want to edit the /opt/suphp/etc/suphp.conf file and make sure that we add the following line to the section after [handlers] ;Handler for php-scripts:

application/x-httpd-phpdev="php:/opt/phpdev/bin/php-cgi"

In the file /usr/local/apache/conf/includes/pre_main_global.conf you will need to add:

AddType application/x-httpd-phpdev .phpdev
<Directory />
suPHP_AddHandler application/x-httpd-phpdev
</Directory>

And finally to use it anywhere you just need to add the following to your .htaccess for the folder you want to test in the development version:

AddType application/x-httpd-phpdev .php

That essentially sums up the general creation of a testing version of php and the above modules to the config command can definitely be changed and added to or have some removed, etc. Just remember to have fun!

Posted in Computer Science