aws ec2, update ubuntu with dependencies - php

In status quo, I have running aws ec2with ubuntu version 14.04
I'm going to update version to 16.04 and I recognize that sudo do-release-upgrade will help me to do that.
The reason for the ubuntu update, is to upgrade php5 to php7 and to lessen deprecated gems
However, my worries are that, 14.04 to 16.04 brings some significant changes, for example upstart to systemd, and since I have set many configurations related to nginx I want to know some possible changes, or failures following such update.
Also I want to know whether php7.0 perfectly substitute php5 legacies.
Currently php is only used for wrapping c coded 3rd parties, and using limitedly with php5-cli, php5-mcrypt. Are these replacable by version 7?
Please share some experiences.

I cannot give you any specifics, but would recommend to use the beauty of the cloud: create an AMI snapshot of your instance and start in beside your original. Update ubuntu on the copy and see what you get.

Related

Can you download and use XAMPP with WSL2?

I need to pick up PHP, but haven't installed it yet. I'm following a tutorial for building something with the LAMP stack and they've recommended installing XAMPP. I have a windows laptop, and I run WSL2 on it. I'm curious whether it's possible to download and use XAMPP with WSL2 (using the linux download?) or whether WSL2 precludes me from using XAMPP and I should figure out how to manually install apache, mysql, and php?
I've googled a bunch and haven't gotten any clear answer to whether I can use the xampp ubuntu download or not. The answer probably involves some higher level IT conceptual knowledge that I don't understand. Any guidance on how to proceed would be appreciated!

PHP 5.2.17 deb repo

So I have this really old website that will only work on 5.2.x and the cost of migration to 7.x is just ridiculous for us as a company.
I have tried getting 5.2.17 to work alongside 7.x on the Ubuntu Server 16.04 but because it was a source based install, I’m struggling in getting modules to work on the 5.2.x enabled website. It come to a point where it would be just easier to install a separate very old Linux distro and just run it off of it with 5.2 onboard installed and configured from a repo.
So my question is, does anyone would be able to help with acquiring 5.2.17 Debian repository? The website is used internally only and just so we can have access to the database that’s behind it.
Thanks!

CentOS 6.7 php 5.6 Chef

We are running on php 5.4.44 with CentOS 6.7
I was reading some comments found here:
https://www.reddit.com/r/PHP/comments/2w7xok/does_anyone_know_where_i_can_find_a_chef_cookbook/
How could I go about installing php 5.6 on CentOS 6.7 using chef? I have not gotten into chef that much so I'm a bit lost, but I know php 5.4 will be reaching its end of life Or would it be recommended that we change to CentOS 7? I've been trying to research but I really can't find something.
I also read this:
Upgrading PHP on CentOS 6.5 (Final)
Is there any more information I have to post? Or am I asking the wrong question please let me know.
You need to do a few things:
Find a repo containing the PHP version you want, such as the IUS repos
Using Chef, add that repo to your server
Using Chef, set node['php']['packages'] to be the package names that are appropriate for that repo
Then call the chef php cookbook like usual
For example, when I do the steps above, to get to php55 from the default, I do:
default['php']['packages'] = %w(
php55u
php55u-devel
php55u-mcrypt
php55u-mbstring
php55u-gd
php55u-pear
php55u-pecl-memcache
php55u-gmp
php55u-mysqlnd
php55u-xml )
And then including the upstream/community php recipe. Your biggest challenge will be finding a package repo for PHP 5.6, I'd imagine. It looks like IUS only goes up to php 5.6, but webtatic has it.
You may encounter other issues if PHP 5.6 is extremely different in architecture, but that'll get you pretty far. It looks like upstream's php cookbook can also build from source, but I'd avoid that unless you absolutely need it.

How to downgrade PHP version from 5.3 to 5.2 in Ubuntu 12.04?

I have freshly installed Ubuntu 12.04 and I have installed PHP as well. By default, it is installed with version 5.3.10 but my PHP project doesn't support PHP v5.3.10.
I want to downgrade PHP version to 5.2. How can I do it?
You would have to uninstall PHP and then reinstall an older version. However if your working on a project that your going to sell, or give to clients, or whatever the case my suggestion would be take out any functionality thats actually breaking between 5.2x and 5.3x and replace it with its new counter parts, as most people will not want to revert to older versions of PHP for any needs, and generally speaking php versions only goin in one direction, if you block yourself into 5.2 and your making software in one shape or another for people, what are you going to do next year when all the servers come stock with PHP 6? Not to mention a lot of hosted solutions try to provide the latest and greatest on there new machines, and will not revert for a single client especially on a shared hosting environment.
Anyway yea, back to your question again in your terminal under Ubuntu, you can try the following. sudo apt-get purge php5 which will then prompt you for a password, then proceed with removing PHP assuming you have the PHP package standalone and not bundled in with some preconfigured LAMP stack, but then again it should still work generally speaking so long as the version is right.
As for reinstalling it, remove purge from the command and use install. However you will need to look up the means of getting an archived version installed of PHP as apt-get will get you the latest

Looking to get started with Apache, PHP, MySQL, Python, Django on a fresh Mac

I've looked for other questions, but could not find any...
I have freshly installed my Mac with OSX 10.5. I need to learn Python/Django for a new job, so want to set it all up correctly, ready to develop and run from my browser using http://localhost/
I come from a PHP background and always used MAMP before. But I want to get everything working together... Apache, PHP, MySQL, Python, Django. Using MAMP is easy to install a local development server, but I want to get Python and Django running nicely too. So I can just start developing and also following tutorials on Python/Django.
Please give me some steps (with MAMP or not) to get a nicely working environment for Apache, PHP, MySQL, Python and Django. Thank you, all have great days!
James
Why not try the official installation instructions? Really all you need to do is install Django. You can use its built-in server (http://localhost:8000 by default) for testing:
./manage.py runserver
Your Mac should come pre-installed with Python 2.4 (or later) which is fine for Django 1.0.2.
10.5 comes with Apache installed by default System Preferences > Sharing > Web Sharing.
To enable Apache php module edit the Apache conf (/etc/Apache/httpd.conf) file and uncomment the php module line.
LoadModule php5_module libexec/apache2/libphp5.so.
Restart Apache after by disabling & enabling web sharing
Mysql package can be downloaded form the official website and is easy to install
The fastest way to get started with Django, will be to use TurnKey linux Django appliance.
Link: http://www.turnkeylinux.org/appliances/django
I also came from PHP a few months ago. I'm not sure if this will get moderated up or down because my answer changes your question:
Do not use MySQL and Apache for local development on your Mac. Use Sqlite3 and the development server that is bundled with Django - this allows for inline debugging, etc...
Sqlite3 is basically the same as MySQL except you need to use .schema instead of describe.
If you start having problems, get MacPython. This has helped me instantly solve problems faster than trying to work with the stock Python on Leopard.
Try to use pip instead of easy_install where possible.
When you are ready for real deployment, then you'll need MySQL/Apache/Nginx, etc... but those will be on a Linux system and you'll be better prepared at that point to make a good production installation than you are now. Getting a production-quality stack running on the Mac is more of a pain than it's worth.
BTW, when you do install Apache, use wsgi, not mod_python.
Okay. I'd just install MySQL from their site and stick with what's already on my Mac as of 10.5, then install Django and the Python MySQL driver. But since you like MAMP, install MAMP or XAMPP and read something like this which summarized says:
Mac OS X 10.5 comes with "Python 2.5.1, thus you won’t have to install it. You can verify this by running python in the Terminal."
Checkout Django cd $HOME/Code; svn co http://code.djangoproject.com/svn/django/trunk django_trunk
Tell Python where Django is echo "$HOME/Code/django_trunk">/Library/Python/2.5/site-packages/django.pth
Add django-admin.py to your PATH
Install the MySQLdb driver from sf.net this probably requires GCC which means you might want the set with Xcode from Apple's Dev Tools.
Do a source code edit
"At this point, edit the _mysql.c file
and comment out lines 37, 38 and 39 as
follows:"
//#ifndef uint
//#define uint unsigned int
//#endif
run
python setup.py build
sudo python setup.py install
Verify the installation

Categories