Showing posts with label web browser. Show all posts
Showing posts with label web browser. Show all posts

Thursday, August 30, 2018

Laravel, Swiftmailer and Uncaught Swift_TransportException

Writing PHP applications that deliver email notification helps to build a versatile system that uses the most basic communication media on the Internet. The Email.

Getting the Email out would require knowledge of the Email server in use to deliver 1 or thousands of email notifications. Common Email use SMTP, sendmail, postfix or a custom Transport implementation for corporate use. There are security and reliability concerns when passing to any Email server. Some of which include protection from email header injection attacks, MIME compliant, HTML/multipart emails, inline or embedded images.

Swift Mailer helps to handle most of these things. Why reinvent the wheel? In order to use it, the application should support PHP 7.0 or higher. Installation through Composer simplifies the whole process.

$ composer require "swiftmailer/swiftmailer:^6.0"

More details are found at Swift Mailer.

Purpose

Back to the original reason of this post. On a recent Laravel application, tested was carried out and checklist done on Centos Linux development server However when deployed to production Centos Linux server, email notification produced following error;

PHP Fatal error: Uncaught Swift_TransportException: Connection could not be established with host EMAILSERVER_NAME[Permission denied #13]

The full error is shown below.

[Thu Aug 30 14:35:54.225637 2018] [php7:error] [pid 18234] [client IPADDRESS:32852] PHP Fatal error: Uncaught Swift_TransportException: Connection could not be established with host EMAILSERVER_NAME[Permission denied #13] in /var/www/tboxmy/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:277\nStack trace:\n#0 /var/www/tboxmy/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(62): Swift_Transport_StreamBuffer->_establishSocketConnection()\n#1 /var/www/tboxmy/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(113): Swift_Transport_StreamBuffer->initialize(Array)\n#2 /var/www/tboxmy/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(79): Swift_Transport_AbstractSmtpTransport->start()\n#3 /var/www/tboxmy/public/info/testemail.php(21): Swift_Mailer->send(Object(Swift_Message))\n#4 {main}\n thrown in /var/www/tboxmy/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php on line 277 

 Solution

I am sure there are other possible ways to get this error, but in my case it was SELINUX. On the development selinux was on permissive and on production it was enforcing (quite strictly).

The next time this happens; here are the steps to take.

Determine selinux status and the booleans.

$ sestatus
. . .
$ getsebool httpd_can_sendmail
httpd_can_sendmail --> off
$ getsebool httpd_can_network_connect
httpd_can_network_connect --> off

Turn the permission to ON.

$ sudo setsebool -P httpd_can_sendmail 1
$ sudo setsebool -P httpd_can_network_connect 1

Restart the web server.
Done.

Friday, November 17, 2017

What's new in Firefox Quantum (screens)



Firefox 57, also known as Quantum is a major upgrade for Firefox web browser. Here are initial screens of this new web browser compared to previous version of Firefox 56.






Tools menu






Toolbar


Preferences
 

Speedtest



Speedtest Ranking



Thursday, April 20, 2017

Mouse Cursor Disappear in Chrome Web Browser

Google Chrome is among the web browsers that I use frequently on MS Windows 10. Chrome provide many standard web browser features, security and option to extend its capability via plugin extensions. Work productivity goes up a notch when many application windows are launched to run concurrently. The monitor screen is big enough to allow re-positioning of the windows, overlapping windows and minimizing of windows.

On 20th April (today), the mouse cursor disappears when its moved over the Chrome window. It appears back when the cursor is moved outside of the Chrome window area. Moving the cursor again on Chrome window area, its noticeable that an invisible cursor is moving as hyperlinks light up, menu and buttons get active and the standard windows minimise and maximise buttons can be accessed.

A quick search on the internet shows that this problem have occurred way back in June 2014. Its almost the same thing, and issue only started after a MS Windows update that had occurred the day before. Yes, there was a Windows 10 updated yesterday.

Solution is to disable the Hardware Acceleration in Chrome. Here is how to get that cute cursor back on Chrome.


Step 1: Open Chrome web browser (if its not already open).

Step 2: Click "Customise and control Google Chrome" or the "3 vertical dots" button. Its usually at same row as the URL bar. Choose "Settings", scroll down and click "Show advanced settings...".

In the section "System" uncheck Use hardware acceleration when available. Close Chrome and launch Chrome or restart Chrome.

I have not found out if its due to MS Windows change in its settings or Chrome settings changed. Maybe someone out there have an answer.

Monday, February 2, 2015

Howto Update to Android Studio 1.1

The Android Studio 1.1 Preview 2 is released to address bug fixes. Many new Android developers will benefit lots from the bug fixes and will have better experience on Android development with this powerful IDE.

Look for details on the update at android.com. One nice feature is having the AVD Manager on a separate window. This is great for multi display set ups.






Wednesday, December 10, 2014

Howto Install Joomla 3 on MS Windows 8

Content Management Systems (CMS) provides a simple framework to focus on developing a web site to deliver specific contents. Basic stuff like user authentication, layout and web standards will be handled by the CMS while more important stuffs like getting the message across and providing a specific service can be the main focus.

Yes, gain insights of experts and community around the world by using a CMS like Joomla! that practices use of open source software (OSS) license.

Installation was done based on notes from docs.joomla.org at https://docs.joomla.org/Use_Joomla!_on_your_own_computer

Following are my notes on installation of Joomla! 3.3.6 on Windows 8. Before going to step 1, ensure the web server has;

Apache 2.4
PHP 5.4 (min 5.3.10), enable following PHP modules
  • Magic Quotes GPC Off
  • Register Globals Off   
  • Zlib Compression Support 
  • XML Support   
  • Database Support: (mysql, mysqli, pdo)  
  • MB Language is Default 
  • MB String Overload Off  
  • INI Parser Support    
  • JSON Support  
  • configuration.php Writeable
MySQL 5.5

Step 1: Getting Joomla!

Download Joomla! from http://www.joomla.org/download.html and extract it to a folder, e.g. myjoomla.
Copy this to your web folder. e.g. C:\apache24htdocs

Step 2: Preparation

Create a MySQL database called myjoomla3. Login to MySQL client and type;

CREATE database myjoomla3;

 And logout.

Step 3: Installation

Open a web browser and enter URL Address. E.g. http://localhost/myjoomla and enter details. Complete the sections for "Configuration", "Database", "Overview".

Configuration


I choose to create the default Administrator username as "admin".



Database
Ensure the configuration for database created is entered correctly. Choose MYSQLi if you are prompted to do so.

Overview
Choose Install Sample Data: Default English (GB) Sample Data

Click "Install". When installation is completed, you will receive the confirmation message "Congratulations! Joomla! is now installed."

Open Windows Explorer and remove the installation folder in joomla named installation. E.g. C:\Apache24\htdocs\myjoomla\installation


Step 4: Post installation

Test the installation with a web browser as;
  1.  front-end page  at http://localhost/myjoomla/
  2.  site administration page  at http://localhost/myjoomla/administrator/
First access: Front-end on desktop

First access: Front-end on mobile
First access:Administration page


Step 5: Choosing a template

This is an extra step for looks. In a web browser open the Administration page, e.g. http://localhost/myjoomla/administrator

In the default Administration page, observer the left column and click "Template Manager". In the left menu choose "Styles". There are 4 styles available for you;
  1. Beez3 (for Front-end)
  2. Hathor (for Administration page)
  3. isis (Default for Administration page)
  4. protostar (Default for Front-end)
 Try to click on Hathor, notice the page has changed. Click Beez3, and in Front-end see the changes.


Done.

Thursday, October 9, 2014

Managing Firefox Sidetab

In the recent upgrade to Firefox version 32.xxx, the sidetab bar appeared when using the Delicious bookmarks addon. Steps shown are for disabling and enabling display of the sidebar.

So whats a sidebar? Its just displays and application/addon in a column next to the web pages being viewed. Delicious and Facebook are example of addon that uses Sidebars.


Disable the sidebar

Step 1. Disable sidebar
At the top of the sidebar, click on the gear.
Uncheck the "Show sidebar".
Done

Enable sidebar
Step 1. Add Sidebar item to the Firefox menu.
Click on the Firefox menu, choose "Customize"
In the Additional Tools and Features window, drag "Sidebars" icon to the menu. Click "Exit Customize"

Step 2. Turn on Sidebar.
Click on Firefox menu, choose Sidebars.

Click on the Application available for Sidebars. In this case its the Delicious bookmarks.

Done.

Tuesday, August 26, 2014

Quick start to Mozilla Firefox OS 1.x

For those of you who were looking for a new smart phone, it might be good to also look at Firefox OS. This is being developed by Mozilla and will be a game changer.

Quick notes:

  1. Initially known as B2G (Boot to Gecko) in the Mozilla Project and initially demonstrated in 2012
  2. Has a Linux based operating system
  3. Target for smart phones, tablets and smart TV.
  4. Among the first adopter was ZTE Open phone
  5. Its has 4 software layers. I.e. Gonk (Linux kernel), Gecko (application services), XUL Runner (Application run-time) and Gaia (User interface system)
  6. Supports HTML5
  7. Website at https://developer.mozilla.org/en-US/Firefox_OS
  8. Apps can be found at the Firefox marketplace.
Current development is at Firefox OS 1.3 (Stable) and Firefox OS 2.1 (Unstable)  and you can try it out via a simulator.

Following are steps to install and run a simulator:
Requirements: Firefox version 30+

Step 1. Install the simulator.

Open Mozilla Firefox web browser and access "App Manager add-ons" by typing in the URL
https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/

Click "Install Firefox OS 1.3 Simulator (Stable)" or which ever version pleases you.

When the Pop-up appears, Click "Allow" then wait till the download starts (There isn't any indicator onscreen) and when the Software Installation box appears, click "Install Now".

Click "Firefox OS 1.3 Simulator has been installed successfully."

Step 2:  Check installation

To determine if its installed, open Mozilla Firefox web browser and enter URL as
about:addon

You should see "Firefox OS 1.3 Simulator ...."

Step 3: Start up the App Manager

In Mozilla Firefox web browser enter URL as
about:app-manager

At bottom of the  App Manager click "Start Simulator"
The Firefox OS Simulator will appear as a new Firefox Window.


Congratulations...you now have access to the latest Smartphone OS.





Friday, April 19, 2013

Faces of Clouds

Cloud is a big thing these last few months. Just to clear some terms that is of interest and where even so called IT experts are not able to agree on. This means, that its my personal view based on resources published by industry experts.

3 items are of interest. The first, is naming of a cloud based on its deployment. Second, clouds can further be classified based on services it provide to users. And lastly, a case study. Think of your plan to build a cloud and how it would be shaped.

A) A cloud is named based on its location or deployment.

  1. Public - Applications, storage and services made available to the general public for free or for a fee.
  2. Private - For a single organisation and decisions made centrally on resources.
  3. Community - Shared infrastructure having several organisation with specific interest that is managed internally or by a 3rd party.
  4. Hybrid - Combination of either Public, Private or Community, or all three.

B) A cloud can then be named based on its services.

  1. IaaS (Infrastructure-as-a-Service)
    1. Users install own operating system and maintain its own patches, IP addresses. - Rackspace, Amazon EC2.
    2. Users can leverage resources to sell as a service provider to their clients.
  2. PaaS (Platform-as-a-Service)
    1. Run your own application on a provider's platform
    2. Develop on a provider's platform - Google AppEngine, Oracle Cloud Platform, OpenShift.
  3. SaaS (Software-as-a-Service)
    1. Full web application - E.g. Googledocs, SalesForce, Gmail
    2. Web services (consumed by other web application) - GoogleMaps API, PayPal

C) A case study

How would you shape a cloud based on above (A) and (B) for following situation?
Lets say a government wants to setup a TeleHealth cloud. It allows any application for hospitals, clinics and government. Some of these applications are built and some bought. Geographically users are very dispersed throughout the country. 

A) Community
Why? Organisations apart from the Ministry of Health, clinics and hospitals would also include 3rd party resources for pharmaceutical, research, assets, payments.

B) PaaS

  1. By providing one or two standard platforms, all development can be better managed. Deployed applications can be made to meet security and other standards set.
  2. Many new applications/web services can be introduced by users. 


Wednesday, June 30, 2010

Android on Sony Ericsson

The Sony Ericsson X10 runs on Android operating system. This is an X window on linux kernel 2.6.29-rel. Its really responsive in my
opinion when I do the following;
1. Using the standard virtual keyboard.
2. Switching between application.
3. Using Timescape to read messages and mediascape for multimedia.


Among the 10 main apps I Installed and will keep;
1. Dolphin web browser.
2. MP3 download.
3. Ringtone Editor.
4. Task manager.
5. PasswdSafe.
6. Astro File Manager +smb module.
7. Connect Bot.
8. Android vnc viewer.
9. EASYNOTE.
10. Mytask.

But i still cant open OOo documents. PDF AND MS WORD WORKED!

Next, android will be on tablet PCs like the Cisco Cius.

The Android can be built with ecipse and the java development kit. See
http://www.alittlemadness.com/2010/06/07/understanding-the-android-build-process

Wednesday, June 3, 2009

[Jaunty] Firefox can use apt://

Some URLs accessed by Firefox is used to install packages for Linux. For example the URL to add the canonical cloud client.

apt://ubuntuone-client?refresh=yes

I get the following message.

Firefox doesn't know how to open this address, because the protocol (apt) isn't associated with any program.

Solution.

I started synaptic and added the package apturl, searched for Ubufox extension for Firefox. Restarted Firefox and now I can access the URL.

Thursday, March 5, 2009

France Adoption of OpenOffice.org, Firefox, Thunderbird and OSS

In Europe, movements towards open source software (OSS) have long been a silent battle. France is one of those that started to look into the benefits of OSS in the early 2000.

The French Gendarmerie Nationale (national police) is composed of the police forces and the military police with over 100,000 employees distributed across the country. In 2001, the decision to explore OSS implementation started and by 2005 OpenOffice.org (OOo) was implemented. Other OSS implementation like Firefox (web browser) and Thunderbird (email & calendaring client) soon followed. Since they have managed to developed their employees with OSS skills, their next plan is for the migration to Linux desktops.

See:
French Gendarmerie goes for Ubuntu

The French Ministry of Agriculture have migrated over 500 servers to Mandriva Linux since 2005. This is mainly to replace its MS Windows NT servers. A total of 15,000 employees is under this Ministry. Plans are underway to have an additional 400 servers on Linux.

See:
French Ministry of Agriculture

The French Parliment moves towards OpenOffice.org in 2007. Following that Ubuntu Linux will be used as the desktop operating system. This will be over 1,000 PCs running Ubuntu Linux. Which translate to even more opportunities to use the hundreds of OSS available to through the Ubuntu software repository.

See:
French Parliment

Tuesday, September 30, 2008

Spam, Scam and Hoaxes

Internet, Email and other forms of Online tools are increasingly getting accessible to all level of users. This includes the students, teachers, housespouse (i thought housewifes may soon be subjective), business person, security guards, cleaners and other professions.

There are some out to take advantage of the new comers, ignorant or busy Internet people with these new technologies. The ideas may be as old as the Ford T but many people still find themselves a victim. As a start, if any thing on the Internet is doubtful or sound too opportunistic there are some web sites that list common issues.

  1. Hoax-Slayer (http://www.hoax-slayer.com )
  2. Scambusters (http://www.scambusters.org )
  3. Sophos (http://www.sophos.com)
There are many more sites, but the list above is a start.

Tuesday, April 29, 2008

Firefox 2 could not display Joomla! popups

The problem
I have just update Firefox (via Ubuntu Gnome update tools). Problem occured when I tried to edit my web content using Joomla 1.0 and the text editor choosen was;
TinyMCE result: The editor menu buttons dont appear at all
JoomlaFCK result: The pop up box for links, anchor, insert image and others appear blank

In previous Firefox 2.0.0.12, things look fine for TinyMCE and JoomlaFCK editor.

I am using Firefox 2.0.0.13 on Ubuntu 7.10:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080325 Ubuntu/7.10 (gutsy) Firefox/2.0.0.13

Solution
Upgrade to Firefox 2.0.0.14 or newer. Firefox 3 at the moment is still in beta, so I decided to give it a pass for now.

Tuesday, January 15, 2008

Firefox 1.5 extensions for weather

The Linux CentOS 5.1 is still using Firefox 1.5.0.12 at the moment. To enhance Firefox usage there are Extensions that seems like little programs that can be added to Firefox. I can find the extensions at https://addons.mozilla.org/en-US/firefox/browse/type:1

I didnt have to search the web or memorise the URL link. Instead, in Firefox I on Tools -> Extensions and a nice dialog box appear where there is a hyperlink "Get more extension" at the bottom right. Click on this and a web browser brings you to the extension page.

I found a "forecast 0.9.6" that provides a nice display of the weather retrieved from accuweather.com web site. Currently it supports Firefox 1.5 -3 .0 which suits me just fine. At the firefox extension page, click on "Install now". Close all Firefox windows and open a new window. I am prompted with the option box for a default forecast location. I selected "Kuala Lumpur" and was given the following codes

ASI|MY|MY015|KUALA LUMPUR|


The Forecast appears at the bottom of Firefox where profiles can be customised by right clicking the extension.

It says Mostly Cloudy, 30 deg Celcius today. It also shows the weather for the next 2 days. Yippee now I can plan my travels.

Blog Archive