I’m currently using OpenSuse 11.1 web server. This is bad since 11.1 is no longer supported. the reason why I am using it is because Function set_magic_quotes_runtime() was no longer being used. (so I was told)
That being said, is there a way to get Function set_magic_quotes_runtime() to function on the newer versions of OpenSuSE?
>
> I’m currently using OpenSuse 11.1 web server. This is bad since 11.1 is
> no longer supported. the reason why I am using it is because Function
> set_magic_quotes_runtime() was no longer being used. (so I was told)
>
> That being said, is there a way to get Function
> set_magic_quotes_runtime() to function on the newer versions of
> OpenSuSE?
>
this has nothing to do with openSUSE version, but the PHP version used;
the function has been deprecated since PHP ver. 5.3. you’ll either have to
install an earlier version of PHP by compiling it from source, or change
your PHP code to not use that function. you may find a starting point
here: http://php.net/manual/en/function.set-magic-quotes-runtime.php
I think installing from source sounds like a more realistic approach for me since I am not a programmer. Could you explain or maybe point me towards a document that explains how to compile PHP 5.2.17 from source and install it?
> I think installing from source sounds like a more realistic approach
> for me since I am not a programmer. Could you explain or maybe point me
> towards a document that explains how to compile PHP 5.2.17 from source
> and install it?
>
> I’d like to use OpenSuSE 11.4.
>
you find the most accurate information for this particular version of PHP
in the INSTALL file of the downloaded source. here are some more extensive
instructions: http://www.php.net/manual/en/install.unix.apache2.php
i have done this a few times but don’t do it regularly, so don’t remember
the exact steps. i do remember that i had to do some searching & fiddling,
because i’m using a 64bit system, and the standard location of some
dependencies are taken from 32bit systems; these need to be replaced
during the ./configure process.
i wanted to keep the original versions of apache2 & PHP intact, so i
compiled both to a different location (to be specified during ./configure
with --prefix=<whatever>), with their own configuration files. if you want
to use the older version of PHP only, you may not have to compile apache2
at all. in either case, you’ll have to specify the locations of some
apache libraries when configuring PHP.
> On Thu, 31 Mar 2011 20:36:01 +0530, abacabb
> <abacabb@no-mx.forums.opensuse.org> wrote:
>
>> I think installing from source sounds like a more realistic approach
>> for me since I am not a programmer. Could you explain or maybe point me
>> towards a document that explains how to compile PHP 5.2.17 from source
>> and install it?
>>
>> I’d like to use OpenSuSE 11.4.
>>
>
> first you’ll have to get the source, from here:
> http://www.php.net/downloads.php
>
> you find the most accurate information for this particular version of
> PHP in the INSTALL file of the downloaded source. here are some more
> extensive instructions:
> http://www.php.net/manual/en/install.unix.apache2.php
>
> i have done this a few times but don’t do it regularly, so don’t
> remember the exact steps. i do remember that i had to do some searching
> & fiddling, because i’m using a 64bit system, and the standard location
> of some dependencies are taken from 32bit systems; these need to be
> replaced during the ./configure process.
>
> i wanted to keep the original versions of apache2 & PHP intact, so i
> compiled both to a different location (to be specified during
> ./configure with --prefix=<whatever>), with their own configuration
> files. if you want to use the older version of PHP only, you may not
> have to compile apache2 at all. in either case, you’ll have to specify
> the locations of some apache libraries when configuring PHP.
>
Before you get yourself into a lot of work, you should read the first comment on that PHP manual page. It shows you how to work around this loss of this function.
>
> Before you get yourself into a lot of work, you should read the first
> comment on that PHP manual page. It shows you how to work around this
> loss of this function.
>
> ‘PHP: set_magic_quotes_runtime - Manual’
> (http://php.net/manual/en/function.set-magic-quotes-runtime.php)
>
> Better still would be to fix the program to not require this feature.
>
he wrote he wasn’t a “programmer,” which i understand to mean he doesn’t
know his way around PHP too well. in that case it might be easier to
compile PHP/apache2 rather than learning PHP to the extent that would
allow him to modify a CMS or web application.
eventually the developers / maintainers of that app. will get around to
upgrade it for PHP 5.3, but in the meantime he’ll have to use something.
also depends on whether he serves his web-app. from his own machine or
uses an external web host. many webhosts haven’t switched to PHP 5.3 yet,
and if he uses his own machine only for development/testing, it makes
sense to run the same PHP version the host does.
Yeah, but PHP isn’t normally obfuscated source. How hard can it be to grep for the place with that function call and use an editor, say nano, to replace that call with ini_set() as shown in the comment, compared to compiling and installing Apache and PHP? Even if I didn’t know my way around Apache and PHP, I know which one would be easier for me.
Also that error message is a warning and could in the worst case be ignored for the time being.
>
> Yeah, but PHP isn’t normally obfuscated source. How hard can it be to
> grep for the place with that function call and use an editor, say nano,
> to replace that call with ini_set() as shown in the comment, compared to
> compiling and installing Apache and PHP? Even if I didn’t know my way
> around Apache and PHP, I know which one would be easier for me.
>
> Also that error message is a warning and could in the worst case be
> ignored for the time being.
>
well, PHP code can get pretty complex. i’ve done it both ways, and if
using a web host, i usually prefer to replicate that hosts conditions on
my local machine as close as possible. up to the OP of course, whatever he
dis/likes most.
> well, PHP code can get pretty complex. i’ve done it both ways, and if
> using a web host, i usually prefer to replicate that hosts conditions on
> my local machine as close as possible. up to the OP of course, whatever
> he dis/likes most.
also if he uses some CMS or such, some of them get updates & fixes pretty
often. he’d have to re-do his modification every time one of the files
gets changed. not nice.