[PHP] Can I install versions of PHP/MySQL that will be compatible with my host server?

2005-09-19 Thread Dave Gutteridge
PHP General List,

First, let me say that while I have been scripting with PHP and MySQL
for my web sites for a few years, I have never configured or installed
either PHP or MySQL, so I should be considered a newbie for installation
issues.


The situation:

I am running Linux on my home computer. The specific distribution is
CentOS 4.1. My computer is a pentium 3 with 512 MB Ram.

On the web hosting service where my web sites are hosted, they have the
following versions of PHP, MySQL and phpMyAdmin:

PHP Version 4.3.8
MySQL 4.1.3-beta-standard
phpMyAdmin 2.5.7-pl1

What I would like to do is install versions of these applications on my
machine that will be compatible with my server so that I can develop and
test web sites on my home machine which will hopefully work on my host
server.

I know that the current latest versions of these applications are as
follows:

PHP 4.4.0
MySQL 4.1.14
phpMyAdmin 2.6.4

I've already spoken to my web host and they intend to upgrade to the new
versions as soon as they build a compatible interface for them with
their administrator control panel interface.


The Questions:

If I install the latest versions locally, will they be backwards
compatible enough with the versions on my host server?

Would it be easy enough to install the versions that my host has, and
then upgrade later?

Any advice would be much appreciated.

Dave


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can I install versions of PHP/MySQL that will be compatible with my host server?

2005-09-19 Thread Jochem Maas

Dave Gutteridge wrote:

PHP General List,

First, let me say that while I have been scripting with PHP and MySQL
for my web sites for a few years, I have never configured or installed
either PHP or MySQL, so I should be considered a newbie for installation
issues.


The situation:

I am running Linux on my home computer. The specific distribution is
CentOS 4.1. My computer is a pentium 3 with 512 MB Ram.

On the web hosting service where my web sites are hosted, they have the
following versions of PHP, MySQL and phpMyAdmin:

PHP Version 4.3.8
MySQL 4.1.3-beta-standard
phpMyAdmin 2.5.7-pl1

What I would like to do is install versions of these applications on my
machine that will be compatible with my server so that I can develop and
test web sites on my home machine which will hopefully work on my host
server.

I know that the current latest versions of these applications are as
follows:

PHP 4.4.0


do you 'abuse' references? if not then you should have no problem.
... you may have code that breaks on 4.4 due to fixes made to the core engine 
of php...
e.g:

$var = array_pop( explode('-', '1-2-3-4-5') );

.. is bad code (read the manual page for array_pop very carefully) and would 
work
in older versions but the engine has been tightened up to disallow such fauxpas.


MySQL 4.1.14


unless you are using very new features of mySQL I doubt you will have
compatibility problems (although be ware of the difference between the mysql
extension and it's replacement mysqli)


phpMyAdmin 2.6.4


wouldn't worry about this at all.one version will have a few more/nicer 
features.
not a big deal :-)



I've already spoken to my web host and they intend to upgrade to the new
versions as soon as they build a compatible interface for them with
their administrator control panel interface.


don't hold your breath for that :-)




The Questions:

If I install the latest versions locally, will they be backwards
compatible enough with the versions on my host server?


mostly yes, some stuff will break. it depends on what your code actually does.



Would it be easy enough to install the versions that my host has, and
then upgrade later?


the release archive has what you need:
http://nl2.php.net/releases.php



Any advice would be much appreciated.


...hth.
if you get stuck with a incompatibility problem with your home machine
and hosting machine, and no one else can help ... call the 'A'team
(er ... I mean mail this list and see if the regulards** can help :-))


rgds,
Jochem


** I hereby put forth the motion to include the word 'regulard' into the
english language ... stemming from 'regular retard' , invented in the spirit
of total bastardization of every language through the power of
internet acronymization ;-)



Dave




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can I install versions of PHP/MySQL that will be compatible with my host server?

2005-09-19 Thread Dave Gutteridge
Thank you for your helpful assistance in explaining the situation to me.

It would seem from the advice I've been given that I don't need to worry
about compatibility when it comes to application versions.

But I do have a follow up question. Are there any specifications or
installation options that I should look out for? Are there installation
options I should ensure that I have selected for my home installation to
ensure the behaviour is the same as my host machine?

Dave

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can I install versions of PHP/MySQL that will be compatible with my host server?

2005-09-19 Thread Jordan Miller

On Sep 19, 2005, at 8:31 AM, Jochem Maas wrote:



e.g:

$var = array_pop( explode('-', '1-2-3-4-5') );

.. is bad code (read the manual page for array_pop very carefully)  
and would work
in older versions but the engine has been tightened up to disallow  
such fauxpas.





Jochem,

Whoa... what do you mean by this, exactly? I am running PHP 5.0.4 and  
$var is correctly set with the code you give above. I could not find  
anything like you describe in the array_pop manual (see below).  
Please elaborate on why this is bad code.


Jordan

array_pop

(PHP 4, PHP 5)

array_pop -- Pop the element off the end of array
Description

mixed array_pop ( array array )

array_pop() pops and returns the last value of the array, shortening  
the array by one element. If array is empty (or is not an array),  
NULL will be returned.


Note: This function will reset() the array pointer after use.

Example 1. array_pop() example

?php
$stack = array(orange, banana, apple, raspberry);
$fruit = array_pop($stack);
print_r($stack);
?
After this, $stack will have only 3 elements:

Array
(
   [0] = orange
   [1] = banana
   [2] = apple
)
and raspberry will be assigned to $fruit.

See also array_push(), array_shift(), and array_unshift().

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can I install versions of PHP/MySQL that will be compatible with my host server?

2005-09-19 Thread Jochem Maas

Jordan Miller wrote:

On Sep 19, 2005, at 8:31 AM, Jochem Maas wrote:



e.g:

$var = array_pop( explode('-', '1-2-3-4-5') );

.. is bad code (read the manual page for array_pop very carefully)  
and would work
in older versions but the engine has been tightened up to disallow  
such fauxpas.





Jochem,

Whoa... what do you mean by this, exactly? I am running PHP 5.0.4 and  


what I meant an what I wrote apparently don't match up very well :-)
I meant to give a valid example of when you can't pass the return value from
a function to another function due to the fact that a reference is expected
and in some situation the var you are passing is a reference to 'nothing' -
which works in older version of php but is also the cause of a couple of
weird/nasty  inexplicable potential seg faults ... it was fixed, Derick
opened his mouth, alot of people got angry - personally I don't give a shit
because I only use 5.0.x (I'll be waiting until the shitstorm has died down
before trying out 5.0.5 or 5.1 :-)

maybe this helps to explain (alot) better what I was talking about ...
http://phplens.com/phpeverywhere/?q=node/view/214

anyway thanks for the catch Jordan.

$var is correctly set with the code you give above. I could not find  
anything like you describe in the array_pop manual (see below).  Please 
elaborate on why this is bad code.


Jordan

array_pop

(PHP 4, PHP 5)

array_pop -- Pop the element off the end of array
Description

mixed array_pop ( array array )

array_pop() pops and returns the last value of the array, shortening  
the array by one element. If array is empty (or is not an array),  NULL 
will be returned.


Note: This function will reset() the array pointer after use.

Example 1. array_pop() example

?php
$stack = array(orange, banana, apple, raspberry);
$fruit = array_pop($stack);
print_r($stack);
?
After this, $stack will have only 3 elements:

Array
(
   [0] = orange
   [1] = banana
   [2] = apple
)
and raspberry will be assigned to $fruit.

See also array_push(), array_shift(), and array_unshift().







--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can I install versions of PHP/MySQL that will be compatible with my host server?

2005-09-19 Thread Jordan Miller

That is very interesting, thank you. We cannot escape politics, eh?

Jordan



On Sep 19, 2005, at 9:32 AM, Jochem Maas wrote:


Jordan Miller wrote:


On Sep 19, 2005, at 8:31 AM, Jochem Maas wrote:


e.g:

$var = array_pop( explode('-', '1-2-3-4-5') );

.. is bad code (read the manual page for array_pop very  
carefully)  and would work
in older versions but the engine has been tightened up to  
disallow  such fauxpas.




Jochem,
Whoa... what do you mean by this, exactly? I am running PHP 5.0.4 and



what I meant an what I wrote apparently don't match up very well :-)
I meant to give a valid example of when you can't pass the return  
value from
a function to another function due to the fact that a reference is  
expected
and in some situation the var you are passing is a reference to  
'nothing' -
which works in older version of php but is also the cause of a  
couple of
weird/nasty  inexplicable potential seg faults ... it was fixed,  
Derick
opened his mouth, alot of people got angry - personally I don't  
give a shit
because I only use 5.0.x (I'll be waiting until the shitstorm has  
died down

before trying out 5.0.5 or 5.1 :-)

maybe this helps to explain (alot) better what I was talking about ...
http://phplens.com/phpeverywhere/?q=node/view/214

anyway thanks for the catch Jordan.


$var is correctly set with the code you give above. I could not  
find  anything like you describe in the array_pop manual (see  
below).  Please elaborate on why this is bad code.

Jordan
array_pop
(PHP 4, PHP 5)
array_pop -- Pop the element off the end of array
Description
mixed array_pop ( array array )
array_pop() pops and returns the last value of the array,  
shortening  the array by one element. If array is empty (or is not  
an array),  NULL will be returned.

Note: This function will reset() the array pointer after use.
Example 1. array_pop() example
?php
$stack = array(orange, banana, apple, raspberry);
$fruit = array_pop($stack);
print_r($stack);
?
After this, $stack will have only 3 elements:
Array
(
   [0] = orange
   [1] = banana
   [2] = apple
)
and raspberry will be assigned to $fruit.
See also array_push(), array_shift(), and array_unshift().



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php