Today my PHP application on my linux virtual server was giving me a ton of error on simply allocating space for sessions. I couldn’t have actually ran out of space but it was worth the check.
100% of my virtual image was used and since I did not want to go to the hassle of re-doing everything again, after a bit of research, this is what I have found that helped me a ton:
VBoxManage modifyhd /path/to/the/virtual/disk/image.vdi –resize 20480
This would work perfectly, but my image wasn’t a VDI it was a VMDK which will throw you an error when you do the same process.
There is a way around it:
1st – VBoxManage clonehd /path/to/the/virtual/disk/image.vmdk /path/to/save/the/new/virtual/disk/image.vdi –format vdi
2nd – VBoxManage modifyhd /path/to/new/virtual/disk/image.vdi –resize 20480
For a 8GB Virtual Image it can take up to 20 minutes for the whole process.
Note: This was done in command line for OSX.
I was having this little bit of trouble with Windows Vista accessing my files on the SAMBA server.
After a little research I have found a great post wich gives a great trick to work out the imcopatibility issues between Vista and Samba.
Follow the link: Get Vista and Samba to work
Yesterday, after spending some hours to get all development eviroment set, I have managed to finish the installation of the good and old Xubuntu 9.04.
It’s a bit faster than the 9.10 and so far, no errors what so ever. Next step, wait for the next stable release for Xubuntu and check out some forums before the upgrade.
is by far the best file / printer sharing service available for Linux. It will surely provides a way to share folders, files and printers with Linux systems and Windows systems, therefore installing it on Xubuntu have some tricks.
First, using Synaptic (or apt-get) install samba (lower case). It will also ask to install other libraries and install them as well.
The next step is to install swat (lower case) a web management tool for SAMBA. Just like SAMBA you can either use the Synaptic or the apt-get to install it.
Now come the tricks.
First make sure that the that the #<off># is removed in the /etc/inetd.conf file.
Now, with apt-get, install the xinetd server. This is the second most important step to allow SAMBA and SWAT to work together.
To finalize, open the xinetd.conf file (/etc/xinetd.conf) and add before the xinetd.d include:
# description: SAMBA SWAT
disable = no
socket_type = stream
protocol = tcp
user = root
wait = no
server = /usr/sbin/swat
port = 901
With this it will be possible to access SWAT by 127.0.0.1:901 at your browser.
By default it will only enable the printer sharing to any users. To allow folder sharing, you must go to:
[Menu] Applications -> System -> Shared folders.
Now all is left is to configure SAMBA, a task that using SWAT, becomes very easy.
I have just installed PHP5 Memcache on my Xubuntu dev machine and every page loaded was returning me an annoying error of Memcache connection error.
Warning: Memcache::connect() [memcache.connect]: Can't connect to localhost:11211, Connection refused (111)
When after you tried everything it still doesn’t work, you got to research for something that will actually correct your issue. With that in mind I found this great post that shows a very easy trouble shooting for fixing the connection error with Memcache.
The post is related to installing, but the last 3 commands will help you do a full troubleshoot with your current Memcache configuration.
Follow the link: http://netweblogic.com/php/installing-memcache-for-php-5-on-linux-centos/
Some times doing the same action again and again is quite anoying, so creating a bash script might be the easier way out.
A bash script is simply a file that executes a series of commands. Something very similar to bat files on Windows.
As many other Xubuntu and Linux users, I had no idea of how to create a bash script and how to execute. Well is pretty simple. While surfing the net I found a pretty good tutorial that will give you the basics of how to create a very simple bash script: http://floppix.ccai.com/scripts1.html
Now some notes:
- The extension of the bash script does not matter, but the usual is .sh
- If you are saving something that will be used globally, the best place to save is /usr/local/bin
- If you are saving something that will be used only by your user then save it at ~bin
- Linux will look for any command that is inside the bin dir, but you can access it on it’s current directory by typing ./command
- the script will be written using c++ mostly (that is Linux main language)
I have been playing with Readyboost for Microsoft Windows Vista and it’s one of the best features (or the only good feature) that Vista has.
Usually I do my programming with a Xubuntu box, so I thought why not try the same with Xubuntu.
It’s not hard.
- Plug, if not plugged, the usb device
- Usually Xubuntu will mount the device (or at least show it for you on the desktop). Right click on the icon (Removable Volume) and check if it is mounted (if you can see the files inside the disk, it is mounted). If so, open a terminal screen and type mount. It will show a list of the mounted devices on y our PC. Try to identify the device name for your usb device. Usually is /dev/sda1, but, like in my case, it can change.
- Mount the device (if not mounted) and in a terminal screen, use the mount command to show a list with all devices mounted. If you are having trouble finding the device, copy the list to mousepad and umount the device (right click on the icon on desktop) and then, list the devices again. Most likely the device that is missing is your device.
- You can use the df -h to list the mounted devices and find out which one is the usb device
- Now, before creating the readyboost, you will need to umount the device, so go to the desktop and right click on the icon and umount it.
- Now let’s set up the swap file (readyboost).
- sudo mkswap /dev/sdf1
- Setting up swapspace version 1, size = 3917820 KiB no label [...]
- sudo swapon -p 32767 /dev/sdf1
- This will set up the swap priority for last (to avoid priority mix with the original swap file)
- Last step, let’s check the swap files:
- cat /proc/swaps
It’s not as easy as Windows Vista, but you can always create a script to run this every time.
I have been strugling with this issue for the past 2 days. After updating Xubuntu 8 to the 9th core, the VPNC started to act different from what it was before and every time I have connected to the VPNC it was killing the connection for the Internet.
I was discussing this with a friend of mine, much more experienced with Linux, and he told me what was going wrong.
The VPNC removes the default route that connects you to the INTERNET, connecting you only to the private network. If you want to have both of worlds at the same time, you will need to add a new route to the VPN.
Doing this by the GUI is extremely annoying so he did sent me a good article teaching how to do this using the command prompt.
Go to: http://www.gentoo.org/doc/en/vpnc-howto.xml and go more specifically to the #7 item.
Follow what is being told and you are good to go.
Just a note, you need to be a route for that, so use the sudo command to help you out.