RSS
 

Archive for the ‘RIA’ Category

Suse + Apache sendmail from() address

23 May

Here’s a quick tidbit on setting the [default] from address for php [sendmail] on a suse box. There are *two* settings that need to be changed, let’s look at the default “out-of-the-box” email from address.

WWW daemon apache

The wwwrun is the username that is being used to send the email. (See /etc/apache2/uid.conf). To alter this value, we need to masquerade it.

Computer->YaST->Network Services->Mail Transfer Agent
Click Next
Click Masquerading
At the bottom of the screen click “Add”
Select local user `wwwrun`
Enter the desired ‘Display as’ value (i.e. webmaster@yourdomain.com)

OK out of the dialog and YaST.

If you send a mail now, it will have a ‘from’ address of

WWW daemon apache

To alter the full name `WWW daemon apache`, you’ll need to update the wwwrun user itself.

Computer->YaST->Security and Users->User Management

You may need to set the filter options to show ‘system’ users. Select the `wwwrun` user, click Edit and modify the `User’s Full Name` field.

 
No Comments

Posted in RIA

 

Adobe Flex Upload +[PHP] Session + Firefox = Failure !

20 Apr

Well not quite but almost. Here’s my dilemma, I have a flex app that allows the user to upload files. My backend PHP script utilizes session variables to ensure the user has the appropriate credentials before proceeding with the upload. When ran under a firefox browser, it appears as though a brand-new session is created when flex calls the upload.php script.

Here’s a recap..
1) Flex app uploading a file via file.upload(request,"upload")
2) Upload.php check requires existing session vars to be present
3) When invoked via firefox upload.php has NO existing session variables
4) IE works great!! Yep, I can’t believe it either.

It *is* possible to pass the php session information (print("?".session_name().'='.session_id());) to the upload script but that’s not a viable option due to security concerns.

For now, I’ve coded up a hack around this problem, but I’m hoping to have some more time in the near future to investigate further.

 
3 Comments

Posted in RIA

 

Image cache and Adobe Flex

20 Apr

Okay, I kept running into the headache of images being cached within my flex application. I found a simple workaround, appending a URL parameter of the current time to the image’s path.

For example, the path img/simple.jpg becomes img/simple.jpg?date=12010103. Each time the page is refreshed, a new date parameter is generated, fixing our cache headache.

The flex code

url + "?d=" + (new Date()).getMilliseconds();

And the php code

$url . "?d=" . date("U");

Those two small take care of the images being cached.

 
No Comments

Posted in RIA