For one website, I need to add a litle script who resize images in php. For that, I used the GD functions. That worked very well in the dev machine, the problem is that in production doesn't work because php GD support isn't installed.
The things is, I'am not expert in server configurations and maintenance (my experience is mostly develop, and in others jobs other people were in charge of the servers, but this company is very small, so...), and I have a little fear that, if simple I install php-gd support, something wrong could happens to the productions server.
Any advice would be greatly appreciate.
While there is the possibility of something going wrong during the install, this can be mitigated by backups. Only thing I could imagine on the php side is concerning method definition - if somebody defined a method with the exact same name of a predefined mod_gd one, it will break.
If you want to be really sure: get a full backup of the production server, install it in a VM and test adding the GD support to it. If it doesn't break the VM install, it won't break the production server either.
Related
At work i want to upgrade our system to PHP7. It is currently at PHP5.6.
We have a different folder structure, as we have all our code in the /home/user directory.
I am not a server guy, i only code. But i know some linux basics.
I came across phpbrew. Is it safe for me to use? as we have a different folder structure then most have.
I dont want to mess up my development server, so it is important for me that i can switch back to 5.6. The server is running debian 8 and we use apache2.
I also came across this article:
https://lornajane.net/posts/2016/php-7-0-and-5-6-on-ubuntu
Is this a safe way to do what i want?
Any other suggestions are also welcome!
Thanks in advance!
The process described in that link looks plausible. Possibly other online resources might confirm it. Why not make a quick VM and try it out?
Is your current dev server a VM? You could clone it, then make the changes and run both in parallel. If not, you could shut it down briefly, image it, and then use the image to build a VM or another physical box.
That way you've got any custom server setup copied across reliably with minimal effort, and you can test PHP7 along with that stuff, with no risk to the current environment. That would be my advice.
we are working with an ioncube encrypted webshop system. I'm evaluating how to setup continues deployment with this system.
Propably my assumtions are basically wrong. If this is the case I would be very gratefull if you have tips or corrections for me.
I would like to use an paas-provider like Heroku for the deployment. Heroku offers the possibility to load PHP-Modules like GD with composer. So I thought there might be a way to use Composer for loading Ioncube. But I can't find any introduction for composer that mentions .so or .dll files, which normally would be included in the php.ini configuration file.
If it doesn't work with Heroku, do you know any good paas-provider/hoster matching those reqiurements:
PHP 5.4 and greater
GDLib, Imagick, mod_rewrite, curl
editable PHP-configuration (safe_mode off, register_globals off, memory_limit, max_file_size, max transfer size (Post))
Suitable for continuous delivery (e.g. usage of git)
horizontal scaling available
backup & load balancing available by default
MySQL database
Ideally the paas-provider/hoster should offer a managed mail server
Thanks right now for you help.
Ioncube is not available/loadable on Heroku.
I suspect you must search for an alternative Hoster yourself. Such questions do not have a good stand on Stackoverflow as they are mostly subjective, attract advertisement and one can google oneself.
I want to develop a professional website using PHP and MySQL. Can i do it in Windows 7 (64-bit) or i need to install linux based OS. How to go for it.
You can run an AMP Stack (Apache, mySQL, PHP) on Windows no problem. I have been doing this for ten years now. Running on Windows 7 64-bit is also no problem.
There are several pre-packaged installers available. My favourite is XAMPP. They usually allow full customization where needed.
You can also download the stand-alone binaries of each product and install them manually. Makes for very, very good learning but is more work.
Yes, you can.
Though a platform is the least thing you will need...
As mentioned it is possible to develop Php and MySQL sites quite happily on Windows using something like XAMPP, even if they are later to be deployed on a Linux web server and I know a lot of people do this and it works great for them.
However I have found in the past you can run into problems later on this way. For example, a lot of people who have only used Windows in the past can get caught out by case-sensitivity in Linux. So your site runs great locally but then you start getting lots of 404 errors when you go live because for example, mypage.php is not the same as myPage.php any more.
At the other end of the development spectrum, you can achieve some really powerful functionality when you start to work the server a bit more - things like video encoding or audio conversion are possible using PHP (with a bit of help from some other apps) on both Windows and Linux but the ways that you would do it are different therefore your development environment becomes much less useful and again you run the risk of putting something live that doesn't work, even tho it runs fine when you test it locally.
Personally, I think it is always best to develop on as close an environment to the intended production server as you can to avoid any nasty surprises when you go live.
Develop on the same platform you are going to be deploying to (if possible). It'll make it extremely easy to deploy with less room for possible error.
Installing the 64-bit versions Apache/PHP/MySQL on Windows 7 is a bit of a pain, but you can easily install the 32-bit versions using XAMPP (as mentioned by Pekka) from apachefriends.org
For Windows you can use a light package, which content php, apache, mysql, pear. link text
Hello i was wondering if anyone had to install/or is working with Zend Server.
My Question is: If i install Zend Server on a production server will it mess up my existing PHP configuration? Will i have to bring my application offline first or will Zend Server install without problems?
The application must run 24/7 and i need a reliable PHP Stack that will boost performance. Any comments on the performance part of Zend Server? Does it worth the installation?
Thanks,
That's no way to think about handling a production server.
I'm not experienced with the Zend Server product, but I wouldn't just install anything on top of a running production system.
Instead, get yourself a new server that will eventually replace your production server.
Then:
Start with a clean install of your distro of choice.
Install ZS (take notes on exactly what you do)
Install your application and data (take notes on exactly what you do)
Test it thoroughly.
If it works, nuke the server, and repeat 1-4, using your notes.
Once you're satisfied that you can get everything working "from scratch" using your notes, create a plan to migrate from the old server to the new one.
Doing it this way ensures that
You have minimal downtime.
You don't have some mess with ZS installed over the top of some other set up.
You can re-build your server when necessary (you created documentation)
2016 Edit: These days, there are various tools such as chef, ansible, or salt that replace obsessive note-taking with automation. I highly recommend anyone managing production systems learn one or more and use them liberally.
When Zend Server is installed on Linux boxes, it will replace the PHP packages supplied by the distribution, and some other packages which supply some PHP functionality. As tim said, it is better for you not to replace the production server environment on the first round, as not always things will work as expected, even to the advanced users.
Take another machine with similar environment and make it your staging/development environment. This will allow you to play with Zend Server features without actually taking down your production server and sites. At the moment you are sure everything works as expected, and only than, start thinking about changing your production site.
To run multiple LAMP servers on Ubuntu, I use XAMPP for Linux and Bitnami LAMP Stack .
By default, the first works on port 80, the second on 8080. Hence they don't conflict. If you know a little about Apache configuration, and if can write a few simple scripts, you can do many things.
However, doing anything on a production server is dangerous.
Both XAMPP and Bitnami stacks are meant to be development environments.
See timdev's answer, +1 to that.
We're currently running with php 5.2.5. We have now encountered a bug that creates a seg fault. Our first idea at the solution is upgrading to version 5.2.6 but are skeptical of problems that it will create. We are running Apache and host a dozen or so sites.
Will any existing code break?
Are there any significant changes to be aware of. I was reading the change log but didn't notice any.
Is it easy to revert back to 5.2.5 if something goes wrong?
Anything else to be aware of?
It's impossible for any of us to say definitely yes or no about your existing code breaking without performing an analysis on it first.
This is exactly what test environments are for. If you have a test environment set up, you can perform the upgrade, then do regression testing to see if anything breaks. Without this environment, you're making a gamble.
#Grant Wagner: Great point on virtualization. Setting up a good test environment doesn't have to be difficult.
With modern Virtual Machine options VMware Server, Microsft Virtual Server, Microsoft Virtual PC and others, why not set up a virtual environment running your existing platform, then upgrade and test that?
If you are willing to spend money, you can buy tools to do P2V (Physical-to-Virtual) that will take your existing setup and provide you with a virtualized copy of it (this could be valuable if you've done a lot of customization to the configuration that might be difficult to produce to a virtualized version that matches the original well enough to do proper testing).
Most likely not. The jump from 5.2.5 to 5.2.6 is small, it is a bug-fix release (see the changelog).
But whenever upgrading anything, make sure to test your code in a dev environment before putting it into production.
As everyone is saying, only testing will tell you for sure. However, minor version updates like this will only rarely cause compatibility problems.
For what it's worth, here are the change notes.
In the long run though, you will have to upgrade at some point or risk being exposed to known security vulnerabilities.
Thanks for everyone's input. Getting a test server is definitely on the road map. This should be a good argument for finally getting one setup. We're a small enough company where we could easily get away with only having one, but there are so many advantages to having a test server.
Unfortunately it will be hard to get this project moving forward without upgrading and i doubt there will be time for a test environment.