Downgrading from PHP 5.3.10 to PHP 5.2.1

I have a legacy PHP application that doesn't work in the supplied 5.3.10 PHP version. It does work in 5.2.1 though. So I'm trying to downgrade to 5.2.1 but seem to be having issues.

Every time I find an article online I run into some issue.

I found this one http://docs.moodle.org/22/en/CompilingPHPfrom_source , but when I run the "/configure \" … line, I get

Sorry, I cannot run apxs. Possible reasons follow:

Perl is not installed

apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs

Apache was not built using --enable-so (the apxs usage page is displayed)

Then it tells me to type "make", so I do. I get

"make: *** No targets specified and no makefile found. Stop."

I've never done any installing from source before in my life so I'm somewhat lost.

Thanks for any help.

ps. This is Ubuntu 12.04

3 Replies

You shouldn't manually compile PHP 5.2.1 it's no longer supported and will have security vulnerabilities. I suggest either #1 Fixing the application or #2 switching to a distro that comes with PHP 5.2 and is still supported (as far as I know that'll only be CentOS which I think comes with 5.1). Fixing the app is the best idea, what problems are you having with PHP 5.3?

ecography,

What PHP errors are you running into? It may be much easier to update the PHP commands than it is to do what you're currently trying to do.

Is this a custom app? Open source that's no longer supported? Something that you don't want to upgrade to a newer version? Something else?

Totally worth just updating the application if it already works in PHP 5.2. I'd suggest starting by enabling errorreporting and displayerrors within a commonly included configuration file or class and then seeing what the big issue is. It's likely just one or two things.

Here are a list of deprecations and incompatibilities between PHP 5.2 and PHP 5.3:

http://us3.php.net/manual/en/migration5 … atible.php">http://us3.php.net/manual/en/migration53.incompatible.php

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct