I am not sure if this is the proper place for this, so I apologize if I should ask it elsewhere.
I am attempting to setup an old Drupal 5 site just for the purpose of being able to view it short term. To do this I need to install PHP 5.2 on the web server (Ubuntu 10.04). Does anyone have any suggestions on how to do this? I can't find a simple way to install old versions of PHP.
This is quite a problem, as you probably know PHP-5.2 is been dead for some time now, so you can't just apt-get install php. The best way to go is to compile it yourself.
You can grab a copy from the github PHP repository, and the follow the installation instructions (under ubuntu you'll need first to install the meta package build-essential to get all the tools needed to compile it).
Be aware that you should not run php5.2 in production by now!
PS: You'll probably have a better answer if you try superuser or serverfault.
Related
I need Openshift Online to get the PHP PECL extension V8Js running for letting React.js execute server side Javascript from PHP. Are PECL extensions now enabled? If yes, how can I do that? The last I saw was a feature request for this from 02.2014. But I did not get information if in the meantime something has changed.
25.07.2015: I'm a step further. Corey pointed me to a promising direction. Did not know, that PECL is some kind of PEAR. Both seem compatible to openshift. I added 'v8js' to the .openshift/pear.txt file and when git pushing the app the console talked to me. I tried to install v8js with 'pecl install channel://pecl.php.net/v8js-0.2.0' but the compiler could not find V8, console said:
checking for V8 Javascript Engine... yes, shared
checking for V8 files in default path... not found
configure: error: Please reinstall the v8 distribution
So, how do I find the path to V8, and how do I know, if it is already there? If not there, how do I get it?
26.07.2015: Did not manage to install V8. I tried to do it like described in the Google docs. The compilation takes 600MB! and I am running out of quota. Maybe I may need to upgrade python version too, since the depot_tools require a more recent version. So, this is very complicated right now. I am asking myself, if I am on the right track. I would still prefer the mainstream PHP way with V8Js for serverside Javascript instead of node.js.
What shall I do? another shared hosting (search hard)? Cloud hosting, like bitnami and Amazon AWS? Is there still hope with openshift? Virtual, managed server? I am confused.
Have you tried reading through the section of the Developer Portal about PHP cartridge dependencies? https://developers.openshift.com/en/php-getting-started.html#step3
The Openshift Online support immediately answered my question: "Sorry, we do not have the V8Js PECL extension at this time".
But from the hints of corey112358 and N.B. and own experience and from internet research I additionally learned that it's a hassle to make that extension run or find hosting support, if you are not a Google engineer who can install v8 or if you have no time or money to run an own server or if you are no expert in V8Js. So, in this case, you may find node.js a more comfortable solution.
I am trying to use the PayPal PHP SDK to make an online store, however the documentation tells me I need composer. When I try to install composer I get this error. I have no idea what this means, or how to fix it. What can I do to fix this? I
P.S. There are quite a few questions about this on SO, however, all of them that I have seen ask about using WAMP or something similar. I have no intention of using WAMP, or anything like that. The only thing I am trying to do is install composer properly.
EDIT: I am just using the Composer installer for Windows.
You need PHP installed whether you have a full test environment running or not. If you can't run PHP from the command line Composer stuff doesn't work. With a basic install of PHP the openssl extension is included so that error would go away.
You can install PHP manually on its own, or you could just install WAMP or any of the many others. I use Zend Server myself. It just installs everything for you so that it works without needing to mess with manual installation.
Once PHP in general is installed, though, that should get rid of this error.
I don't know it is the right place to ask this question but still for me it is the best place to ask question so i am asking this
"My Aim is to install alternative php cache (apc) on my website (hosted by dreamhost) "
My problem is it is not installing by following the wiki http://wiki.dreamhost.com/Pecl_APC .That wiki clearly specified that i need to run a custom php install in order to install APC but whyy?? isn't there a way to install APC in existing php version .My site uses php 5.2.17. Please help me i am stuck into this from a very long time now.The dreamhost wiki is not helpful at all i need answer from someone who has installed APC on their server please help
thanks in advance
I guess you need to install a custom PHP because APC is a plugin that to configure needs compiling with PHP. So I guess dream host do not want to give you access to the default installation.
Did you try installing the custom PHP?
What error have you come across?
I really say its a very hard time for me when started to install these 3 things on my windows 7 platform. I know there is WAMP available to install at one shot. But I for good understanding I want to install these 3 separately and want to integrate it. Why its so clumsy and difficult for integration? Can anybody please advise me how I can do the following?
Which latest versions of these 3 are best compatible?
After installing Apache what in which mode I should run it? Console application or Server Mode?
In apache whats the difference if I run with CGI or without CGI?
What the things or modules or any changes I have to ensure before going to install the MySql and PHP?
When I installed the MySql it tell me that MySql server is installed. Is the my MySql server is another HTTP server? Is it a replacement for Apache?
After I install the PHP what are the minimum things I should check so that I will be ensured that it will work with Apache after integration.
I found the logfile locations for Apache. But where can I find the logfile locations for PHP and MySql?
May be I am newbie in this domain so I am asking these questions. But it will help anyone who want to start newly. Please advise me...
Ok, I still dont see why you dont want to just install a package like WAMPP/XAMPP or Zend Server CE (personal favourite atm).
Put it this way:
Generally speaking, all latest versions are compatible, meaning,
latest PHP + latest MySQL + latest Apache
Typically server mode, but this really depends on what you want...
this is not something for noobs, again rather use a package
Do you want CGI? or not? Read the documentation on
http://httpd.apache.org/docs/2.1/howto/cgi.html
Dont bother, this usually isn't necessary - again use a package
Mysql is a Database Service
Browse to http://localhost/ if it works, then it works. Libraries depend on your personal needs, if you for example need php's
MCRYPT library installed, you'll know - install it... if it's
already installed, it will work anyway
Google it
I doubt this will help you much...
I'm a newbie and after I've successfully learnt enough to build my simple but useful web services, I managed to put myself in a position where I need to configure my own PHP build.
The problem is I don't really know what build means --never built anything either.
My broad question is:
Any good step by step tutorial that doesn't just say "must have dependencies"?
My specific question is:
For instance, one that shows how to build PHP with odbc, then rebuild (configure.nice and make nice?) with imap in addition.
If someone finds a PHP bundle that comes with odbc, great; with odbc & imap, better. But I'm really looking for someone to show me how to fish. Please.
Thnx.
A.
Gazler is correct, for a simple setup, you can just configure Ubuntu through the repositories via apt-get. For RHEL-based systems - yum would be the equivalent. However, if you are wanting to know more of how to compile from scratch (which would give you more control over installation), then you can do so.
Basics of compiling an application:
Download source from website (such as PHP, www.php.net)
untar the source (tar -xzvf source.tar.gz)
cd source
Configure the source (./configure [install-option-flags])
Compile source (make)
Test Install (doesn't actually install) - make test
Install the software (make install)
Step 4 is a very broad step. You will need to figure out what options you want to configure - see PHP Core Configuration Options.
Requirements for installing PHP will differ between environments, so that's too broad to cover in one answer, however, you will at least need a c-compiler to compile the source. Usually gcc is my choice, and is usually installed already. On Ubuntu (Debian-based) use apt-get install build-essential or search and install via yum on RHEL-based systems, I believe it would be something like yum install gcc.
You will probably run into dependencies issues as you compile, as I said its a very broad step, however, once you figure out the requirements that you need, you should be good to go, so long as you document your steps for your environment.
Again, the easiest way to go is to install via your software repository (apt-get, yum, emerge, pacman, etc), but these don't give you as much leverage on controlling your environment installation, whereas building from source gives you all the configuration control that you'd need.
You haven't mentioned what distro you are on, On ubuntu you can do:
sudo apt-get install lamp-server^ php5-imap php5-odbc
That should be enough to get you started and configured.