I also feel that given the time Marcos has spent on this program, I should make a contribution to helping others implement a php-residence installation.

My website was also initially in Frontpage and I found forms worked well for inquiries but this was not a end to end solution I desired, I wanted to add the ability for prospective clients to check room availability and make bookings for our Small Hotel we've built for our retirement. We have found it counterproductive to have people emailing for the same nights when all is booked so if they can visualize the availability it allows them to schedule their trip to our availability (or go elsewhere). (note) I find a significant portion of people do not go to the rooms page - emailing instead, thus I HAVE renamED the rooms page the home page.

So lets see about using PHP-Residence with Ubuntu.

PeterP mentions “I simply can't transfer data from the testing installation to the main web server. This caused a major problem in that I had been merrily using the local 'testing' installation to maintain my databases by manually entering e-mailed bookings from clients (in the past I simply kept these on an Excel spreadsheet). When it finally came time to upload the data to the web server – I couldn't do it! I used the system to create a back-up file – but when I transferred that to my web server's “dati” folder – it wouldn't work! I tried many alternatives – but failed ”

I can see where this could be an issue - building on a hosting site your database will have your user name appended so a name you provide locally won't likely be possible on a shared site. I think it could be a good idea to do a basic setup on the web using your domain name, you don't have to add the links to your sites web pages so you can play with it on line to your hearts content, but depending on your connection to the internet you may wish to be able to work offline. Use the same database name, password and user for your offline site. Also its not enough to simply put the backup file in the dati directory, you must create a basic working site and install the file which puts it back into the MYSQL database and then restores all the data.

My Internet connection varies considerably - in Canada where I currently live and work I have a decent connection. However the hotel is located in Southern Mexico with no phone lines present. A year ago I was able to get G3 digital Cellular access by use of a External Antenna and Router, this was fast enough to almost allow fluid Skype conversations but the provider IUsaCell then decided to go GSM and have moved some transmitters. By aiming at a antenna 35 kilometers away we seem to have re-established contact but good transmissions seem to be limited to evening - I'm not sure if this is a result of Solar Radiation or simply high business use during the day. (in 2017 was fortunate to have a internet provider locate a rebroadcast tower on our hotel, we still pay but bandwidth equals or exceeds the Telmex ADSL in a nearby city)

I did experiment with Windows with easyphp (the linux webserver running with Windows)and its a brilliant system except it isn't a email server so I am guessing you will need to add something to enable email functionality. The other drawback is Windows has extra costs in requiring a Antivirus system and generally employees can screw it up too many ways. As we are dealing with a small hotel - 10 rooms I wanted to keep to a single computer, there is a temptation for a dedicated server which could cache other hotel traffic if going that route I would have used SME server from but instead am trying a single Linux Computer providing desktop and server functions using Ubuntu Workstation.

1. Download the latest long term release of Ubuntu Workstation and make a install disk, you want a good ADSL or Cable connection for this and setup as you are dealing with 100's of megabytes of information. I specify a long term release as you are using this for business use.

1a. Advisable - download a pdf of so you have a Ubuntu-Linux manual .

2. Install Ubuntu Workstation. Some Graphics cards don't work well with Linux - on my portable I needed to minimize graphics capabilities or portions of my screen blank out. If installed on a regular computer you may want to try and use a computer with 2 video monitor ports on the same video card - this will give you a 50% increase in productivity as you can be copying and pasting from help files and emails to your applications, both in Windows and in Ubuntu if you have set up duel booting.

3. Install the LAMP server, which includes Apache server, MYSQL and PHP, It is very important to install separately and ensure each is working as often times the 1st item is not started while 2nd was installing. I say again install each item separately as shown.

sudo apt-get install apache2

Verify its running by going to http://localhost

3a. Install mysql-server

sudo apt-get install mysql-server

Once the installation is complete, the MySQL server should be started automatically. You can run the following command from a terminal prompt to check whether the MySQL server is running:

sudo netstat -tap | grep mysql

When you run this command, you should see the following line or something similar:

tcp 0 0 localhost.localdomain:mysql *:* LISTEN -

If the server is not running correctly, you can type the following command to start it:

sudo /etc/init.d/mysql restart

3b. Install phpmyadmin

sudo apt-get install phpmyadmin

You should then be able to run phpmyadmin locally either


http://localhost/phpmyadmin should work

If not you probably did something wrong -

Try re-installing

sudo dpkg-reconfigure -plow phpmyadmin

make sure you have a mark appear beside the mysql database.

phpmyadmin will allow you to create, edit, and drop databases more visually, just access via your local web http://localhost/phpmyadmin or .Use if you have difficulties with command line use of MYSQL.

4. I think its a good idea in terminal to type apt-get update watch your hard drive light you could be updating for quite a few minutes before control is returned to you in terminal, this updates your linux files to the most recent.

5. Follow Marcos information on copying PHPresidence to web server. As you are doing this locally with Ubuntu it needs to look like /var/www/php-residence. I fought with this as the /var/www is a directory needing Root Access but yet it should be so easy in the file manager but there appears to be no way to use the file manager however the file manager is nautilus so

gksudo nautilus and after entering your password your new temporary file manager will be bestowed with ROOT capabilities. Copy your PHP-Residence to /var/www/php-residence .

note: gksudo is like sudo but for security reasons must be used for graphical applications where root access is required - see

6. You must create a MYSQL database either using Marcos method or simply in phpmyadmin - you do not need to add any info in phpmyadmin other than create database.

7. As per Marcos you need to set permissions on php-residence/data, if in Graphical Nautilus with root permissions you could right click on directory /var/www/php-residence/dati and provide read right permissions or perhaps better in terminal type sudo chmod 755 /var/www/php-residence/dati This gives the owner READ Write Execute permissions but the Group and User Read and Execute Permissions only.

8. Upon 1st entry to the php-residence directory http://localhost/php-residence you will be asked to provide setup info.

Having used the same Database name, user and password on the local system as the online webserver you should be able to use the backup and restore function to save the info over between the 2.

On the administrator menu of PHP-Residence under configure if I recall correctly is the option to set up a master slave site, I haven't done this yet but it appears one will need a IP address of both, this could be an issue for me as capability of the cellular G3 Router to handle a dynamic DNS address is something I have yet to look into, but the ability to work in real time off line and automatically update online as bookings occur is a powerful incentive.

I would love to say I have PHP-Residence up and actively managing the hotel but I still have a business in Canada and so it may yet be till I retire before I can be there enough weeks to train employees.

Please feel free to update this Wiki info or add comments (preferably in Bold or italicized so I can easily see the corrections). I am an amateur to this so am hopeful other new users of Linux will find this helpful and yet veterans of Linux and PH-Residence may develop this guide further.

Lastly I neglected to mention Local Backups - Marcos backup within PH-Residence seems to work fine, I would suggest downloading multiple dated backups possibly including version number as one can only restore to the same version number. One also wants to backup the entire Workstation - a useful free backup system is available at which works with Windows and Linux file systems, requiring only a external USB drive. A Graphical backup in beta is , much easier to use but there seem to have been complaints of corrupted backups (note-2017 I have experienced failures with redobackup restores and only use Clonezilla) - I did note that Clonezilla requires no spaces in names, I suggest the same if trying redobackup and never rely soley on 1 backup - you should have at least 2. Also if doing a restore always try to use the same backup program or a later version but never a previous version of the backup program, its a good idea to put the revision number of your backup program on the disk when made.

If you are using Cell G3 access like me you may need a dedicated router as the G3 devices here in Mexico seem to be made for PC's. I would have considered another Internet Cell supplier Telcel which supplies GSM devices or even IUsacells new GSM devices but they did not have wired Routers and I wanted maximum signal to the office. Signal on our hotel is only acceptable on the highest point of the hotel about 15 meters up and I did not want to have a computer tied up sitting up there with a access card in it. Its tough enough having a card or router sealed in a watertight plastic container with ethernet cable running to a network switch and on to the office.

My 2018 suggestion, this year with retirement from printing business to that of hotel I decided to invest in a 10 room purchase of Marco's system. This allowed me to use his Https: certificate so I could for instance put a link such as Booknow (though I used,“Learn More”) directly to the booking form. Facebook requires a SSL security for a direct link like this. Part of the reason I did this was the wording Google was going to start penalizing regular sites. I also created short link in to add the reservation link as a robot reply message to Facebook Messenger and to the free and recently released Whatsapp business edition available for Android phones. In addition to a similar link to our hotel for GoogleMaps, because the 1st problem is providing pricing and availability and the 2nd is giving them a map to get here when everyone is using a Cellphone

Anyway it seems some use this software only for taking reservations online and then use a different backend. I suggest you may want to see if you can get a 10 room version from Marco for the above reasons and get the advantage of his support.

If it works out for you then you will be set to implement the reservation system hotel or campsite wide.



References -

PeterP's - A Total Beginner's Experience with Php-Residence located in Wiki

Installing and configuring Apache2 web server -

Installing and starting mysql-server -

Installing php-myadmin -

another_beginner_s_experience_dealing_with_php-residence_-_and_using_ubuntu_workstation_-_with_server_installed_for_office_added_reservations.txt · Last modified: 2019/12/03 13:42 by marco