PDA

View Full Version : Php 5


l0rdphi1
07-13-2004, 06:24 PM
FYI PHP 5 was just released.. hopefully DA will support this soon ;)

(Note: two lines in DA's httpd.conf will need changed, since PHP5 uses a different mod_php than php4 does. here (http://us4.php.net/manual/en/install.apache.php))

Phi1.

DJ_Max
07-14-2004, 07:29 AM
Yeah, me too. I've been using PHP5 on other servers since the RC versions. It's really great it you program PHP. Better XML support, error handling, along with new Class exceptions.

I really hope DA supports it soon.:)

blacknight
07-14-2004, 11:03 AM
I wouldn't upgrade to php5 on a production server until it had been released for a few weeks. Do you really want to be the one to discover a security hole?

noose
07-14-2004, 11:08 AM
hmm...
when DA will support PHP5 ?? I want to install this but I fear to damage the DA :/

DJ_Max
07-14-2004, 01:30 PM
Originally posted by blacknight
I wouldn't upgrade to php5 on a production server until it had been released for a few weeks. Do you really want to be the one to discover a security hole?
Hosts have already been using the RC versions on servers, with no problem. And I highly doubt it will cause any problems. It hasn't been widely used for months in testing for nothing.
But still if DA supported it, it doesn't mean you are forced to upgrade.

blacknight
07-14-2004, 01:44 PM
Originally posted by DJ_Max
Hosts have already been using the RC versions on servers, with no problem. And I highly doubt it will cause any problems. It hasn't been widely used for months in testing for nothing.


I think you're missing my point.

Put it this way. Windows is the most common desktop OS. Was the first release of any version stable and secure?

PHP if used intelligently is great, but a lot of idiots code badly using it and it is the hosting provider who pays the price. If people wait a while until it stabilises I'm sure it will be fine, but running around to get the "bleeding edge" is not my way of conducting business.

DJ_Max
07-14-2004, 02:01 PM
Originally posted by blacknight
I think you're missing my point.

Put it this way. Windows is the most common desktop OS. Was the first release of any version stable and secure?

PHP if used intelligently is great, but a lot of idiots code badly using it and it is the hosting provider who pays the price. If people wait a while until it stabilises I'm sure it will be fine, but running around to get the "bleeding edge" is not my way of conducting business.
I get your point. But if DA supports PHP5, you will NOT have to upgrade. I was just making a suggestion.

Also, Windows has other issues. :o

PHP if used intelligently is great, but a lot of idiots code badly using it and it is the hosting provider who pays the price.
Sad, but so true.

jlasman
07-14-2004, 05:23 PM
The real issue to consider is this:

Are there any changes between PHP 4 and PHP 5 that would make our clients' scripts cease to operate properly?

If so, then we can't upgrade to PHP 5 until our clients have had an opportunity to rewrite their programs.

Jeff

blacknight
07-14-2004, 05:34 PM
Jeff

That's a very relevant point. If you think of the number of sites that "broke" once register_globals was switched off .......

l0rdphi1
07-14-2004, 05:42 PM
PHP5 has made every possible effort to preserve portability from PHP4.

However, there is a small list of collision areas. An outline of such can be found here: http://www.zend.com/php5/articles/engine2-php5-changes.php

Again, there is not many, but it's worth a good look over before upgrading your servers.

rhoekman
07-15-2004, 05:53 AM
FYI:

php5 on FreeBSD 5.x is not recommended at this stage it is conflicting with bind libraries for some odd reason. There is a bug report dating 6 december 2003 (http://bugs.php.net/bug.php?id=26544) the problem is still not resolved.

DJ_Max
07-15-2004, 07:54 AM
Originally posted by l0rdphi1
PHP5 has made every possible effort to preserve portability from PHP4.

However, there is a small list of collision areas. An outline of such can be found here: http://www.zend.com/php5/articles/engine2-php5-changes.php

Again, there is not many, but it's worth a good look over before upgrading your servers.

Yeah, The only way i could see you having problems, is by default, PHP5 has long arrays set to OFF. So $HTTP_POST_VARS, $HTTP_GET_VARS, $HTTP_SERVER_VARS, etc.. won't work. Unless you go into the php.ini and set it to ON.

But for the most part, ever since RC versions, scripts like phpBB have gotten around this, and still have support for PHP3, as thats the only reason some scripts still use long arrays.

All these posts I see make valid points, but what this thread about was DA having support for PHP5. If you do not want to upgrade, DON'T. Let the few people who want to upgrade. As I could care less if you want to upgrade or not.
:o

jlasman
07-15-2004, 10:57 PM
Originally posted by DJ_Max
All these posts I see make valid points, but what this thread about was DA having support for PHP5. If you do not want to upgrade, DON'T. Let the few people who want to upgrade. As I could care less if you want to upgrade or not.
This thread was an announcement that PHP5 was out.

Everyone on these forums may not have the same level of knowledge you do.

It made no mention of incompatibilities, including the incompatibility with Installatron, a product designed for DA.

So are you suggesting that I should have:

(a) created another post and another thread?

(b) expected everyone would figure out for themselves that some of their own scripts, some scripts they'd bought, and some scripts their customers had used, would no longer work

or

(c) just gone on my merry way, not updating for a while, and letting a lot of other hosts lose business when their clients; scripts, and in some cases their own, no longer worked?

I consider these forums a venue for a DA self-help community, and I consider this thread the appropriate place to point out that there might be some incompatibilities. If you think otherwise, please bring it to the attention of DA staff using the "Report this Post" button, so we can get the purposes of this forum cleared up.

Thanks.

Jeff

DJ_Max
07-16-2004, 06:52 AM
Well I thought that since this was in the Version Updates forum, and the thread started was posting how to install PHP he wanted DA to think about it.

If there was a thread to talk about PHP5, it should be in the 'DirectAdmin General Discussion' or 'MySQL / PHP'.

Wiether or not you should make another thread, I think this thread is fine now, unless it gets too long and have to be moved.
All these posts I see make valid points, but what this thread about was DA having support for PHP5. If you do not want to upgrade, DON'T. Let the few people who want to upgrade. As I could care less if you want to upgrade or not.
I just said that because I felt that some people were taking this thread to seriously, it was just a suggestion. This place isn't for posting if or when you want to upgrade(at least I don't think).

l0rdphi1
07-17-2004, 11:31 PM
Hello,

I'm just after -support- for PHP 5. I probably should have been clearer, but this is more what I'm after:
http://www.directadmin.com/forum/showthread.php?s=&threadid=3981

That is, you can use PHP 5 if you like, but you're in no way forced to do so.

And again as Jeff noted: Installatron is not compatible with PHP 5. We're waiting for ionCube to release a PHP 5 loader, and that ETA is set for "later this year."

Phi1.

ExitTheMatrix
08-29-2004, 06:56 PM
I would like to add my vote to update DA to PHP5 asap. My host is holding back for the update of DA before installing it on his servers.

I'm just getting into OOP and have found that I really like the new OOP features in PHP5.

Again, my vote to upgrade asap! :D

l0rdphi1
08-29-2004, 07:36 PM
I do not think this is going to happen any time soon.

Here's why:

1/ Apparently the PHP4 and PHP5 Apache modules cannot run side-by-side. Of course, you can configure one to run as CGI and the other CLI, or you can use two instances of Apache, but neither of those methods are very appealing to me personally.

2/ A lot of scripts (Gallery, for instance) are VERY incompatible with PHP5.

Once the PHP 4 and 5 Apache modules can run side-by-side (if ever), I'll put a how-to together on how to get it set up.

Phi1.

fusionictnl
08-30-2004, 07:26 AM
I would think PHP 5 is backward compatible. Maybe not at standard installation, but through the php.ini. If DA or users would make a php.ini that forces PHP 5 to use long arrays and other disabled functions that were available in PHP 4, than an upgrade wouldn't be so hard.

jmstacey
08-30-2004, 08:43 AM
Originally posted by fusionictnl
I would think PHP 5 is backward compatible. Maybe not at standard installation, but through the php.ini. If DA or users would make a php.ini that forces PHP 5 to use long arrays and other disabled functions that were available in PHP 4, than an upgrade wouldn't be so hard.

Is that even possible? If the binary doesn't support those features, putting the directives in the .ini wouldn't do anything. At least thats how most programs run.

blacknight
09-13-2004, 06:10 PM
One of our client's has requested that we setup a server for him with DirectAdmin AND php5. So far it is working, but there is a LOT of breakage :D
A lot of open source scripts will not work with php5 at all.
In a few months the bigger projects will probably release php5 compatible versions, but I wouldn't hold my breath.

jmstacey
09-14-2004, 07:26 AM
So you've switched entirely to php5 or do you have both php4 and 5 running?If the later, how did you go about it?
hold my breath.

dredg
09-14-2004, 08:32 AM
Switched entirely.

You could rig both. It wouldn't be too difficult actually.
You could load the php4 module and associate .php with that and run anything with a .php5 as a cgi against the php5 binary.

Icheb
09-17-2004, 01:45 AM
Originally posted by dredg
Switched entirely.

You could rig both. It wouldn't be too difficult actually.
You could load the php4 module and associate .php with that and run anything with a .php5 as a cgi against the php5 binary.

You got my interest there...
Wouldn't two different PHP installations 'work against eachother' or is that php4 module also located inside php 5?
(any documents about this ?)
Note that i haven't had the time to google for it yet, so an answer of use google or something would be understandable

dredg
09-17-2004, 02:04 AM
Only if you load both php4 and php5 modules at the same time - this will cause breakge which would probably make you cry. :)

What I suggested was :
contuniue loading php4 module. This will handle all files with the extension '.php'
Build php5 from source. Do not load the php5 module. Instead, run scripts with an extension of '.php5' as cgi scripts, using the php5 application.

Of course, running scripts this way does have security implications, but it will allow you to run both versions at the same time.

NrgUser
09-18-2004, 08:53 PM
PHP5 + MySQL 4 does not work. You will have to mess with settings in both PHP5 and MySQL config files to get it to work. Not to mention copying files around. PHP5 no longer bundles the required dlls or anyhting to run MySQL, if has the DDL but will not work.

I have been wrking on fixing this on my windows XP machine to get them to work, I have tried quick fixes on the internet, nothing seems to work. Atleast on apache 2.

dredg
09-19-2004, 02:01 PM
And the award for 'most pointless piece of information yet' goes to...
Originally posted by jlasman
DA dooesn't use apache 2.

Jeff

blacknight
09-19-2004, 05:54 PM
It doesn't run on windows XP either, so what's your point?

NrgUser
09-19-2004, 07:35 PM
bah edit

Icheb
10-21-2004, 04:22 PM
Originally posted by dredg
Only if you load both php4 and php5 modules at the same time - this will cause breakge which would probably make you cry. :)

What I suggested was :
contuniue loading php4 module. This will handle all files with the extension '.php'
Build php5 from source. Do not load the php5 module. Instead, run scripts with an extension of '.php5' as cgi scripts, using the php5 application.

Of course, running scripts this way does have security implications, but it will allow you to run both versions at the same time.

Can anyone provide a httpd.conf that allows something like this ?
I've been trying for 4 hours now with different approaches. (On a to-be production server)
The best result I had was an "premature end of script headers" error in my error_log, but most other solutions didn't even come close to working, as Apache had 1 thread up but just didn't respond.
I've seen DA servers with PHP5, so I know it's possible, but if anyone could kick me into a direction that would actually work in the end, I'd really like that.

jmstacey
10-21-2004, 11:32 PM
I think he meant that you do not want to load both at the same time by apache because that will break it.
Because the php4 module is already loaded, just recompile the cgi version of php with php5. Then add a handler to the httpd to tell it to use the cgi version of php with all files that have a .php5 extension.

It might look something like this, although this is off the top of my head ;):
AddType application/x-php .php5

Icheb
10-22-2004, 02:00 AM
I have also tried that.

Ok, I think I screwed up the PHP ./configure by using the default one for the custombuilder, but for the rest, it should work...


When I got it to run as CGI, it gave me a nice "premature end of script headers" in my error_log.
(with just:
<?PHP
phpinfo();
?>
as source code).

webquarry
06-03-2005, 01:39 PM
I'm playing with a FC3 server with php5 and installatron just for fun (non-production) and when I install installatron I see this:

Fatal error: Using $this when not in object context in /usr/local/directadmin/plugins/iTron/sources/misc.php on line 775 Plugin Installed!

Anyone have any ideas why?

jmstacey
06-03-2005, 03:39 PM
It appears that Installatron is not fully compatible with php5. That error has to do with the way objects are handled in php5 compared to php4.

I suggest contacting Installatron support.

CrazyLane
06-06-2005, 12:12 AM
Goto that line and see if it has something like $this = null and change to unset($this).