#1  
Old 9th August 2006, 18:09
ColdDoT ColdDoT is offline
Senior Member
 
Join Date: Jan 2006
Location: Netherland
Posts: 178
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ColdDoT
Default Apache + php4 + cgi_php5

Hello

i have setted up a long time ago a server with php4 and php5 at the same time php5 as cgi.
if you go to blablabla.php it wil be parsed trough php4 is you use blablabla.php5 then it will be parsed by php5.

the prob is every function that uses fopen kind of things, it will not run on php4 and it will run on php5, examples
SOLUTION WAS FOUND
(no it isn't the allow fopen config in server.ini)

the code behind the script test.php(5) (both files have the same script)
Code:
<?
$site = file_get_contents("http://www.colddot.nl/awstats/awstats.pl?month=".date("m")."&year=".date("Y")."&output=main&config=www.colddot.nl&framename=mainright");
preg_match_all('#<b>(.*?MB|GB|KB|Bytes)<\/b>#i',$site, $gb2);

$traffic = preg_replace("#(.*)<b>#","",$gb2[1][0]);
$traffic2 = preg_replace("#(.*)<b>#","",$gb2[1][1]);
echo $traffic+$traffic2."<br>";
?>
Greets ColdDoT

//EDIT SOLUTION
i was working on php 4.4.2 so i upgraded to 4.4.3 and my prob was gone
__________________
2B or not 2B (a pro)

Last edited by ColdDoT; 13th August 2006 at 16:20.
Reply With Quote
Sponsored Links
  #2  
Old 10th August 2006, 18:05
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Did you also try

Code:
<?php
$site = file_get_contents("http://www.colddot.nl/awstats/awstats.pl?month=".date("m")."&year=".date("Y")."&output=main&config=www.colddot.nl&framename=mainright");
preg_match_all('#<b>(.*?MB|GB|KB|Bytes)<\/b>#i',$site, $gb2);

$traffic = preg_replace("#(.*)<b>#","",$gb2[1][0]);
$traffic2 = preg_replace("#(.*)<b>#","",$gb2[1][1]);
echo $traffic+$traffic2."<br>";
?>
Maybe you didn't allow short open tags for PHP4.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 10th August 2006, 18:52
ColdDoT ColdDoT is offline
Senior Member
 
Join Date: Jan 2006
Location: Netherland
Posts: 178
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ColdDoT
Default

I've tested it. nop diden't work

i can write verry complicated scripts on php4 i can scan dirs etc but at te moment i do it using the http:// or ftp:// it will send wrong headers or something like that.
__________________
2B or not 2B (a pro)
Reply With Quote
  #4  
Old 11th August 2006, 17:13
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

What about this?

Quote:
Tip: You can use a URL as a filename with this function if the fopen wrappers have been enabled. See fopen() for more details on how to specify the filename and Appendix M for a list of supported URL protocols.
on http://de.php.net/manual/en/function...t-contents.php ?

PHP4 and PHP5 use different php.ini files on your setup, maybe that's the reason. Maybe some wrong setting in the php.ini for PHP4?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 13th August 2006, 15:49
ColdDoT ColdDoT is offline
Senior Member
 
Join Date: Jan 2006
Location: Netherland
Posts: 178
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ColdDoT
 
Default

I have taken the ini out of php tar (php.ini-recomment)
i have enabled the follow extensions, maybe that causus problems.

(just below top [PHP])
Code:
zend_extension_ts=/var/server/webserver/apache2/ioncube/ioncube4.so
zend_extension_ts=/var/server/webserver/apache2/zend/ZendOptimizer4.so
zend_optimizer.optimization_level=15
added to the extensions list
Code:
extension=zip.so
extension=rpmreader.so
extension=id3.so
extension=lzf.so
extension=bz2.so
extension=fileinfo.so
can that causus the prob

//EDIT
tested by commenting it out (uncommening) with ';'
no diffrents

//EDIT SOLUTION
i was working on php 4.4.2 so i upgraded to 4.4.3 and my prob was gone
__________________
2B or not 2B (a pro)

Last edited by ColdDoT; 13th August 2006 at 16:20.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP4 Configuration, it's possible? sergioab Installation/Configuration 5 31st May 2006 01:35
mod_mono apache 2.2 ColdDoT Server Operation 5 23rd May 2006 02:58
Problem with the installation of Dokeos (LMS) in ISPConfig jofranco General 4 28th April 2006 00:45
PHP/MySQL/Apache2/ISPConfig configuration issues? senzapaura General 21 25th December 2005 14:01
Apache 1.3 Support SleeperZ General 3 9th November 2005 11:10


All times are GMT +2. The time now is 01:17.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.