Accessing services-config.xml values from Flex at runtime

AIR, AS3, Flex Soft! Nessun Commento »

Ecco come accedere al file services-config.xml in runtime.

<?xml version="1.0" encoding="UTF-8"?>
<services-config>
	<services>
		<service id="amfphp-flashremoting-service" class="flex.messaging.services.RemotingService"
				messageTypes="flex.messaging.messages.RemotingMessage">
			<destination id="amfphp">
				<channels>
					<channel ref="my-amfphp"/>
				</channels>
				<properties>
					<source>*
				</properties>
			</destination>
		</service>
	</services>
	<channels>
		<channel-definition id="my-amfphp" class="mx.messaging.channels.AMFChannel">
			<endpoint uri="gateway.php" class="flex.messaging.endpoints.AMFEndpoint"/>
		</channel-definition>
	</channels>
</services-config>

Provare:

trace(ServerConfig.getChannel("my-amfphp").endpoint);

How to restart tomcat in linux

Java, Linux, Varie Soft! Nessun Commento »

if you are using extracted tomcat then,
startup.sh and shutdown.sh are two script located in TOMCAT/bin/ to start and shutdown tomcat, You could use that

if tomcat is installed then

/etc/init.d/tomcat5.5 start
/etc/init.d/tomcat5.5 stop
/etc/init.d/tomcat5.5 restart

Upgrade to PHP 5.4 or 5.5 on Mac OSX Mountain Lion

MacOSX, PHP Soft! Nessun Commento »

There’s a bunch of ways to upgrade the preinstalled version of PHP 5.3.15 on Mac OSX Lion using Macports, brew, etc.., but to me, this was the most simplest. I took the info from http://www.coolestguyplanettech.com/upgrade-to-php-5-4-or-5-5-on-mac-osx-10-8-mountain-lion/

OSX 10.8 Mountain Lion ships with PHP version 5.3, there is an easy upgrade method to either the current stable PHP 5.4 or beta version 5.5.

The latest PHP version in this guide is from this PHP Packaged site which is being maintained for OSX and is known as a reliable source.

curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5

After it’s done, put the following in one of your PHP pages and check.
phpinfo()

In terminal, type the following:

php -v

If you are still getting the old version, it’s because the installation was done in a different directory and pointing to the old one. Type the following in terminal.

cd /usr/bin
rm php
ln -s /usr/local/php5/bin/php php

Now do a
php -v

Should be showing PHP 5.5.11.

Home | Graffiti e Disegni | Educazione | Chi siamo | Blog | Progetti | Contatti
RSS Feed Comments RSS Accedi