f



PHP 4 and PHP 5

What is main difference between PHP 4 and PHP 5?
Is possible to use object programming apporach with PHP4?
Is possible to use Stored Procedures in Oracle with PHP4?

Where I can get more informations?

Thanks in advance 


0
ablyplus (10)
1/1/2005 8:32:15 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

4 Replies
1964 Views

Similar Articles

[PageSpeed] 31

"ablyplus" <ablyplus@yahoo.com> wrote in message 
news:cr5n6g$5bp$1@ls219.htnet.hr...
> What is main difference between PHP 4 and PHP 5?

take a look at http://www.zend.com/php5/

> Is possible to use object programming apporach with PHP4?

Yes. The new features in PHP 5 are mainly cosmetic (e.g. visibility). With 
PHP 4 you can define classes with methods, properties and constructors. You 
can create objects from these classes at runtime. You do not *need* PHP 5 to 
write object oriented code with PHP.

> Is possible to use Stored Procedures in Oracle with PHP4?

Read the manual. take a looki at http://www.php.net/manual/en/ref.oci8.php 
at scroll down to example 2.

> Where I can get more informations?

Looking for it might be a start.

> Thanks in advance

You're welcome.

-- 
Tony Marston

http://www.tonymarston.net



0
tony155 (869)
1/1/2005 10:30:35 AM
"ablyplus" <ablyplus@yahoo.com> wrote in message 
news:cr5n6g$5bp$1@ls219.htnet.hr...
> What is main difference between PHP 4 and PHP 5?
Much improved OO, and the odd incompatibility. The only noticeble one is 
that array_merge must be given 2 arrays, you can just chuck in a simple 
variable and expect it to be merged with an array. It chucks a warning I 
believe, and still does it.

> Is possible to use object programming apporach with PHP4?
The OO part goes a long way to supporting static methods, variables and 
constants. In PHP4, you could call a method statically 
(ClassName::Function()) or from an instance (Object->Function()), it didn't 
care. PHP4 doesn't support static variables or class constants. To finish 
off this static class business, they also add self:: and parent::. self is 
the static analogy to $this, and parent:: is how you call a parent class's 
function, useful in constructors.
There's also visibility, public private and protected, plus most standard 
C++ object stuff, like the final keyword, abstract, extends, and the ability 
to implement and interface, which is just a dumb template for how the class 
should look.
That said, you can still do heaps of OO stuff in PHP4, it's just more 
'correct' in PHP5.

> Is possible to use Stored Procedures in Oracle with PHP4?
No clue.

> Where I can get more informations?
Read the php manual chapter on OOP in PHP5. 


0
hynee (1)
1/3/2005 12:46:03 PM
Hi,

Yes, you can do OOP in php4. I have been doing OOP for over 10 years, 
first in Smalltalk, then in java, now in php. Smalltalk was probably the 
first real OO language and it still is one of the simpelest, purest and 
most powerfull ones. Both php4 and php5 are easier and more effective 
for OOP then Java (and C++) because, like Smalltalk, php has weak typing 
and because weak typing also works with primitive datatypes (these 
allways give you headaches with Java). I wrote an entire OOP framework 
in php4 and i am not the only one, see 
http://www.hotscripts.com/PHP/Scripts_and_Programs/Development_Tools/Application_Framework/index.html. 


In a way php4 is actually more like Smalltalk then php5, because it does 
not mess up your mind with nonsense like public, private, protected, 
interfaces etc*. But it has two major limitations:
- it implicitly copies objects whenever passed or assigned by value. You 
can work around this by allways using references with objects,
- it has no exceptions (try-catch). This is not a big problem for simple 
code becuase you will get a reasonable error message and line number, 
but if you really do reuse code, the line numbers pointing to the reused 
code give little clue about the code that really causes the error. This 
makes it hard to debug. It can be worked around too, but that causes 
more error handling code in places you do not want it. For the workaroud 
see http://www.phppeanuts.org/site/index_php/Pagina/92/error.html

You can also write code that runs equally (i mean: does the same) on 
both php4 and php5. You only need a small wrapper function library and 
some coding guidelines. For these download the PHP 5 portable release. 
The coding guidelines are in readme.html. The wrapper library is in 
classes/pnt/pntPhp4Functions.php and pntPhp5Functions.php, which are 
included from classes/pnt/generalFunctions.php. The wrapper library also 
  explains (partly in the form of code) the main differences between OOP 
in php4 and php5.

PhpPeanuts does not work with Oracle. Php4 does, see 
http://www.php.net/manual/en/ref.oracle.php. Also see 
http://www.php.net/manual/en/ref.oci8.php, look for "Example 2. Using 
Stored Procedures".

Greetings,

Henk Verhoeven,
www.phpPeanuts.org.

* just an opinion ;-)

ablyplus wrote:

> What is main difference between PHP 4 and PHP 5?
> Is possible to use object programming apporach with PHP4?
> Is possible to use Stored Procedures in Oracle with PHP4?
> 
> Where I can get more informations?
> 
> Thanks in advance 
> 
> 
0
news18670 (95)
1/3/2005 11:52:36 PM
> Both php4 and php5 are easier and more effective
> for OOP then Java (and C++) because, like Smalltalk, php has weak
typing
> and because weak typing also works with primitive datatypes (these
> allways give you headaches with Java).

I don't understand what you mean here. In what way can you use
primitive types in PHP, that you can't in Java? It seems to me that PHP
is using almost entirely the same OO model as Java.

> In a way php4 is actually more like Smalltalk then php5, because it
does
> not mess up your mind with nonsense like public, private, protected,
> interfaces etc*.

You may be confusing simple with simplistic. Being able to specify
access levels provides compiler-enforced documentation to the
maintainer and user of the code. When you specify something as private,
you can be sure that it can't be called outside the class, thus
avoiding a lot of potential erroneous use. It also means that users of
the class only need to concern themselves with the public interface (or
public and protected, if they want to inherit from it), thus avoiding
distraction from irrelevant (from the user's perspective)
implementation details. Thus, these may make it _easier_ to program.
Unless you think that becoming a better programmer is "messing up your
mind", that is. ;)

Separating interfaces from implementation is a rather fundamental comp
sci concept, and if you consider that "messing up your mind", then,
well, it seems you have some schooling to do (despite what you say
about your years of experience. Some people just stop learning, it
seems, so number of years of experience is rather irrelevant by
itself).

> - it has no exceptions (try-catch). This is not a big problem for
simple
> code becuase you will get a reasonable error message and line number,

> but if you really do reuse code, the line numbers pointing to the
reused
> code give little clue about the code that really causes the error.

You can use debug_backtrace(), with an appropriate decoding to text, to
improve this, as it gives the stack trace all the way back to global
scope.

Regards,

Terje

0
1/21/2005 9:06:25 PM
Reply:

Similar Artilces:

PHP-4 to PHP-5 Conversion
I found a wonderful downgrade (PHP-5 to PHP-4) script by Alan at <http://www.akbkhome.com/svn/akpear/PHP_DownGrade/>. Anyone have or came across PHP-4 to PHP-5 conversion script? -- | Just another PHP saint | Email: rrjanbiah-at-Y!com ...

PHP 4 vs PHP 5
Over the past year or so I have been teaching myself php and have exclusively used php 5. I now need to create a script to handle form information on a server running php 4 (we will upgrade to 5, but it may be a while). I will be creating and testing the script on a local server with php 5.2, then uploading for final testing and deployment on a server with 4.1.2. Now this may be vaque, but what I need to know, for a script that is just going to take a html form post information and up to 6 word files uploaded, and then email them as an attachment with the data, is there any major change between 4 and 5? If the changes between 4 & 5 are large, I will just write it in perl, but would prefer php (at least the 5 version) due to the ease of file uploading. Bill H Hi Bill, If there is absolutely no chance to have PHP 5 running on your production server, I'd suggest to run PHP 4 on your testing server... Without a doubt, you will run into trouble. No science here, just common sense... PHP 5 has more possibilities to work with classes (private/public functions, etc...). It also has specific functions or libraries that are only available to PHP5, ie. SimpleXML. The function references on php.net will usually tell you in which version those functions are available... But again, why make it hard on yourself and test your software on a server with a (deliberately) different configuration then your production environment. Kind regards, Mathew Mathieu Maes wrote: > Hi ...

PHP 4 & PHP 5 at the same time
Hi, I've decided it's time to take PHP5 for a spin, but all the hosts I use are still only on PHP4, so I need to keep PHP4 running and operational on my dev box. My dev environment is a Windows XP Pro Machine with Apache 1.3.33 and PHP 4.4.0 I'm sure many of you have PHP4 and PHP5 running on a Windows Box with Apache as your server. I'm particularly interested in being able to use ports to decide what version of PHP I am running, so I can just add a port number to see how a page will perform in PHP5. ie: http://randomsite/index.php -> PHP4, http://randomsite:81/index.php -> PHP5 What solutions have you guys come up with? Michael. > I'm sure many of you have PHP4 and PHP5 running on a Windows Box with > Apache as your server. I'm particularly interested in being able to use > ports to decide what version of PHP I am running, so I can just add a port > number to see how a page will perform in PHP5. ie: > http://randomsite/index.php -> PHP4, http://randomsite:81/index.php -> > PHP5 > > What solutions have you guys come up with? I've been looking into this, and found a solution - I have 2 Apache Services running (both Apache 1.3.33) I've named one service Apache which runs on port 80 and has the php4 module loaded, and another service apache-php5 which runs on port 81 and has the php5 module loaded. Can anyone see any problems with doing things this way? ...

Question of PHP-4 vs PHP-5
When debugging the blowfish utility I noticed that $bf = new Crypt_Blowfish($mykey); echo("BF: " . $bf"); Outputs the word "OBJECT" on a PHP-4 linux system and "OBJECT id #1" on a windoze PHP-5 system Can anyone confirm this is correct and even better - explain what the output of each is please (I dont understand PHP classes yet) tks tony tony@tony.com wrote: > > When debugging the blowfish utility I noticed that > > $bf = new Crypt_Blowfish($mykey); > echo("BF: " . $bf"); > > Outputs the word "OBJECT" on a PHP-4 linux system > > and "OBJECT id #1" on a windoze PHP-5 system > > Can anyone confirm this is correct and even better - > explain what the output of each is please > (I dont understand PHP classes yet) Yes, both are correct, but the question is wrong - if you want to describe an object then give it a method to describe itself. If you want to see inside an object then use the var_export() fn. The difference is related to the change in how objects are referenced in the different PHP versions. C. tony@tony.com wrote: > When debugging the blowfish utility I noticed that > > $bf = new Crypt_Blowfish($mykey); > echo("BF: " . $bf"); > > Outputs the word "OBJECT" on a PHP-4 linux system > > and "OBJECT id #1" on a windoze PHP-5 system > > Can anyone confirm this is correct and e...

PHP 5 or PHP 4 compatible codes
Kinda OT. I haven't yet moved to PHP5. But, interested to know how many of you _really_ started using it or moved? Are you doing any compatible tweaks specifically for PHP 5 (forward compatible) or PHP 4 (backward compatible)? -- | Just another PHP saint | Email: rrjanbiah-at-Y!com R. Rajesh Jeba Anbiah wrote: > Kinda OT. I haven't yet moved to PHP5. But, interested to know how > many of you _really_ started using it or moved? Are you doing any > compatible tweaks specifically for PHP 5 (forward compatible) or PHP 4 > (backward compatible)? Basically, if you code for PHP4, it will work in PHP5. However, if you wish to take advantage of the full PHP5 abilities, scrap backward compatibility. Berislav -- If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are Groucho, Chico, and Harpo, then Usenet is Zeppo. "Berislav Lopac" <berislav.lopac@dimedia.hr> wrote in message news:<cdfr9s$6qs$1@ls219.htnet.hr>... > R. Rajesh Jeba Anbiah wrote: > > Kinda OT. I haven't yet moved to PHP5. But, interested to know how > > many of you _really_ started using it or moved? Are you doing any > > compatible tweaks specifically for PHP 5 (forward compatible) or PHP 4 > > (backward compatible)? > > Basically, if you code for PHP4, it will work in PHP5. However, if you wish > to take advantage of the full PHP5 abilities, scrap backward compatibility. > So, are you writing codes with a...

php 4.4.1 constructor Vs. Php 5.0 constructor
I have a class with a constructor function that looks like so on my php 5.0 box: public function __construct(....) does this syntax change when I go back to php 4.4.1? I've never used 4.4.1 before, been solely 5.0 until now. It seems the 4.4.1 box is giving me an error on that call. I've been looking on google for a while for a simple answer, but must not be searching for the right thing. Thanks in advance. Greg Scharlemann wrote: > I have a class with a constructor function that looks like so on my php > 5.0 box: > > public function __construct(....) > > does this syntax change when I go back to php 4.4.1? I've never used > 4.4.1 before, been solely 5.0 until now. It seems the 4.4.1 box is > giving me an error on that call. > > I've been looking on google for a while for a simple answer, but must > not be searching for the right thing. > > Thanks in advance. PHP 4.x supports only constructors that have the same name as the class, e.g. class abc { // Constructor function abc() { } } The chances are pretty good that you will have to upgrade to php 5 -- Etienne Marais Cosmic Link South Africa It's true that PHP4 requires a constructor to have the same name as the class, but that doesn't mean you have to upgrade to PHP5 just to use the __construct method. Simply add a new method to you class with the same name as the class and use that to call the __construct method. So...

Compatibility problem, php 4 vs php 5? Using wamp 5, having some problems
Sorry if I too obviously clueles, but I'm just starting editing our web-site that was prepared by someone else. The web-site is running at a Norwegian web-hotel (www.domeneshop.no), running php 4. Our site (www.widenoja-design.no) works ok, menu-choices and all. When I serve the same files from my local disk for editing and testing, the menus no longer work. I'm running Wamp 5 with the php 4 module loaded and enabled. Any clues? Is there any directives I can put in my files to force php 4 execution? I am able to switch to another software bundle locally if you have a strong recommendation. Thanks for any pointers! -- Christian Aastorp Message-ID: <v0ccs1pmg5a4temr3g2gtes0nf1p708p81@4ax.com> from Christian Aastorp <> contained the following: >Any clues? Is there any directives I can put in my files to force php >4 execution? At a guess, it sounds like a register globals problem. Register globals is off in newer versions of PHP. Where you have a menu item like this http://www.widenoja-design.no/index.php?CAT=tjenester is your script accessing the choice by looking for $CAT ? If so you need to change that to $_GET['CAT'] or $_REQUEST['CAT'] -- Geoff Berrow (put thecat out to email) It's only Usenet, no one dies. My opinions, not the committee's, mine. Simple RFDs http://www.ckdog.co.uk/rfdmaker/ ...

Problem with Mail()
In my PHP 5.0 at home, I'm using the following code to successfully write to a database and also send out an email. For some reason, when I take this code to work, it still writes to the database but doesn't send mail so we're (me and the I.T. guy) trying to find out whether it's the difference between PHP 4 or something else with email security. Does anyone here have experience with mail() in PHP 4 to know whether PHP 4 had issues with mail() that were fixed with PHP 5 ???? We've been chasing this from the mail server side at work when perhaps its some nuance between versions of PHP. Appreciate any help... Chris /* > $to = stripslashes($to); */ $to = stripslashes($to)."\r\n"; $subject = stripslashes($subject); $text = stripslashes($text); /* > mail('$to',$subject, $text); */ mail($to, $subject, $text, "From: admin@localhosthome.com"); cover wrote: > $to = stripslashes($to)."\r\n"; > Might or might not be the cause, but you should remove the trailing CRLF here. JW On Mon, 27 Feb 2006 22:33:57 +0100, "Janwillem Borleffs" <jw@jwscripts.com> wrote: >cover wrote: >> $to = stripslashes($to)."\r\n"; >> > >Might or might not be the cause, but you should remove the trailing CRLF >here. Thanks for the reply. I tried it after reading your post and no change... Thanks again, cover wrote: > In my PHP 5.0 at home, I'm using the following co...

PHP 4.X vs PHP 5.x
When does it really matter? I have read that PHP5 has a stronger object model, is that really helpful? walterbyrd wrote: > When does it really matter? I have read that PHP5 has a stronger object > model, is that really helpful? > It is if you're doing OO programming - which I much prefer. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== ...

Can I learn PHP 5 with PHP 4 book?
Hi I would like to learn PHP and I know we are at version 5. A friend let me use 2 of his books but they cover PHP 4. Is that ok for starting to learn the language? Or should I go straight with a PHP 5 book ? Thanks a lot Patrick varois83 wrote: > Hi > > I would like to learn PHP and I know we are at version 5. A friend > let me use 2 of his books but they cover PHP 4. Is that ok for > starting to learn the language? Or should I go straight with a PHP 5 > book ? > > Thanks a lot > > Patrick > I'd recommend going straight for a PHP 5 book. While virtually everything in PHP4 works in PHP5, it's better to learn the new features such as better OO support available in PHP5. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== varois83 wrote: > Hi > > I would like to learn PHP and I know we are at version 5. A friend > let me use 2 of his books but they cover PHP 4. Is that ok for > starting to learn the language? Or should I go straight with a PHP 5 > book ? > > Thanks a lot > > Patrick > Hi Not really, there are significant differences in PHP5 compared to 4, especially the OOP class use, but also differences between mysql and mysqli are not shown in a PHP4 book, simply as mysqli has only been introduced with PHP5. Achim AchimR wrote: > varois83 wrote: >> Hi >> &...

Running PHP 4 and PHP 5 together in vhost environment.
Folks, We are running PHP 4 right now on our servers and would like to give people the option of experimenting/using PHP 5 if they desire. Our system are RedHat Linux running Apache 1.3.x -- would have really like to run both PHP 4 and PHP 5 together as modules, but that seems to be impossible due to name conflicts. The only other solutions we saw were to run PHP5 as CGI (which had drawbacks), or try running a proxy server (below). Our requirements were that it had to support multiple virtual hosts, allow people to try out PHP5 by just giving a file a .php5 extension, support putting an entire site on php5 and also work regardless of relative/absolute URLs that might be used in their code. Here is the solution we came up with, any feedback is welcome: We decided to run a 'back' server built with PHP 5 and responding at a unique IP address. The vhost info on this server would be almost identical to the main servers, except for their virtual host names,e.g. Main Server - www.alpha.com Back Server - php5.alpha.com The php5.alpha.com is also added to their dns info and resolves to the IP address of the 'back' server. All the vhosts on that server are NameVirtualHosts. The DocumentRoot, etc.. would be identical. Our main servers would have a Reverse Proxy setup so that any request for a file ending in .php5 would be sent to the Back server for processing. (If someone wanted their whole site t...

Running PHP 4 & PHP 5 together as modules
Folks, We would like to upgrade our servers to PHP 5 and PHP 4 together as modules on the same server (not as cgi, not passing requests to another server). I did some extensive searching on this and we ran some tests over a year ago and did not find a solution (other than proxy forwarding to a PHP 5 configured server). When PHP went to version 4 from version 3, it was possible to run both at the same time, and have users select by file extension, i.e. .php4,.php5. It seems a naming conflict within the code itself prevents that from working with PHP 5. Has anyone discovered a way to do this? We are running apache 1.3.x on RHEL 4. Thanks! -- John ___________________________________________________________________ John Murtari Software Workshop Inc. jmurtari@following domain 315.635-1968(x-211) "TheBook.Com" (TM) http://thebook.com/ "John Murtari" <jmurtari@thebook.com> wrote in message news:x7r6r15s95.fsf@hammer.thebook.com... > Folks, > > We would like to upgrade our servers to PHP 5 and PHP 4 > together as modules on the same server (not as cgi, not passing > requests to another server). I did some extensive searching on > this and we ran some tests over a year ago and did not find a > solution (other than proxy forwarding to a PHP 5 configured server). > > When PHP went to version 4 from version 3, it was possi...

Running PHP 4 and PHP 5 together on Apache/Linux
Folks, We have been running PHP 4.x on Apache 1.3.x with no problems. After the first upgrade from php3 -> php4 were were able to load both modules for php 3 and php 4 with no problem. With an AddType directive we forced php 3 execution for just those files ending in php3. Thought we could do the same with php 5. We have a lot of folks on 4 who may not be ready to upgrade yet, so we were planning on letting php 4 handle anything ending in ..php or .php4 -- and use php 5 for just php5 extensions. Did the same thing as before in our Apache Config, we ...

Running PHP 4 and PHP 5 together as modules, same Apache
Folks, I work for a web provider and we would really like to start allowing people to experiment with php 5 on their websites without forcing an overall upgrade and potential code problems. Did some extensive searches and have seen ideas about running php 5 via cgi or using mod_proxy so that if folks access their site as php5.sitename.com -- we pass it through to an apache server configured for php5. When the last 'major' php upgrade ocurred from 3 to 4. It was possible to have folks change their file extension to .php4 and they could use the 'new' version of the language. While people who had files ending in .php or .php3 stayed with the 'old'. Later on as php4 became more common we changed the default handling so that .php files were handled by the 'new' version and we told people if they wanted to STAY at php 3, they had to change their filenames to end in .php3 or add a directive in an .htaccess file. That kept everyone happy. We have done extensive testing and it appears that both php 4 and php 5 modules cannot coexist under Linux, Apache 1.3.x -- and the groups seem to say it's a namespace problem within the PHP modules. Does anyone know of a fix/patch coming for this? Many thanks! -- John ___________________________________________________________________ John Murtari Software Workshop Inc. jmurtar...

unix / php 4.4.0 / php.ini ?
hi all, i cant find php.ini in upgraded php from 4.3.7 ?!?!? where the hell is it ? the prefix is new but there is no lib directory /usr/local/php-4.4.0/ On Mon, 08 Aug 2005 16:25:48 +0200, g0c wrote: > where the hell is it ? find / -name "php.ini" -- JDS | jeffrey@example.invalid | http://www.newtnotes.com DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/ On 2005-08-08, g0c <REMOVEg0c@msn.com> wrote: > hi all, > i cant find php.ini in upgraded php from 4.3.7 ?!?!? > where the hell is it ? > the prefix is new but there is no lib directory /usr/local/php-4.4.0/ phpinfo() will tell you where to look for it. -- Cheers - Jacob Atzen "JDS" <jeffrey@example.invalid> wrote in message news:pan.2005.08.08.14.35.47.363349@example.invalid... > On Mon, 08 Aug 2005 16:25:48 +0200, g0c wrote: > >> where the hell is it ? > > find / -name "php.ini" > > -- > JDS | jeffrey@example.invalid > | http://www.newtnotes.com > DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/ > of course id did that, and it found only in old install dir /usr/local/php-4.3.7/lib :-) "Jacob Atzen" <jacob@aub.dk> wrote in message news:slrndff3cj.a1s.jacob@tank.aub.dk... > On 2005-08-08, g0c <REMOVEg0c@msn.com> wrote: >> hi all, >> i cant find php.ini in upgraded php from 4.3.7 ?!?!? >> where the hell is it ? >&g...

PHP Training Institute In Delhi, Live Projects on PHP. Short Term PHP Courses, PHP Scripts, PHP Training with Live Projects.
Vserve Global offers short term PHP: Hypertext Preprocessor Training Course, which is a widely used, general-purpose scripting language that was originally designed for web development, to produce dynamic web pages. It can be embedded into HTML and generally runs on a web server, which needs to be configured to process PHP code and create web page content from it. It can be deployed on most web servers and on almost every operating system and platform free of charge.PHP is installed on over 20 million websites and 1 million web servers. TOPICS:- >> Core PHP Language >> HTML, Cascad...

PHP within PHP...
I took over the support of a website that is set up something like this inside one of the pages: include_once("header.php"); <?php //to get the content of the page they do this: $content = mysql_query("select content etc...); echo $content; ?> include_once("footer.php"); I am having problems evaluating any php that is used in the mysql content. Is there a way to get the mysql withing the mysql to run? Thank you for your time, Mandragon On Sep 17, 12:56 pm, Mandrago...@gmail.com wrote: > I took over the support of a website that is set up something like > this inside one of the pages: > > include_once("header.php"); > > <?php > //to get the content of the page they do this: > $content = mysql_query("select content etc...); > > echo $content; > ?> > > include_once("footer.php"); > > I am having problems evaluating any php that is used in the mysql > content. Is there a way to get the mysql withing the mysql to run? > > Thank you for your time, > > Mandragon Sorry, The question should read: "Is there a way to get the php withing the echo $htmlcontent to run?" Of course you are, $content is a resource. The MySQL Query resource. try this: $content = mysql_query('bla bla bla'); while ($row = mysql_fetch_assoc($content)) { $result[] = $row; } $content = $result; Now you can use $content ;). In answer to your edit... eval($co...

php to php obj
Hi All, Is there any tool to convert the .php files into its object files in deploying the files to other's server like java classes are deployed? Thanks in advance --AR John7481 <arjohn7481@hotmail.com> wrote or quoted: > Is there any tool to convert the .php files into its object files in > deploying the files to other's server like java classes are deployed? To what end? Do you want a PHP obfuscator? They tend not to be needed - since the code remains on the server. Do you want a PHP squeezer? Again - since PHP remains on the server that is of reduced importance. PHP obfuscators and squeezers are out there - but what exactly are you looking for? -- __________ |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply. With total disregard for any kind of safety measures Tim Tyler <tim@tt1lock.org> leapt forth and uttered: > John7481 <arjohn7481@hotmail.com> wrote or quoted: > >> Is there any tool to convert the .php files into its object >> files in deploying the files to other's server like java >> classes are deployed? > > To what end? > > Do you want a PHP obfuscator? They tend not to be needed - > since the code remains on the server. > > Do you want a PHP squeezer? Again - since PHP remains on the > server that is of reduced importance. > > PHP obfuscators and squeezers are out there - but what exactly > are you looking for? I think he'...

php outside php (?)
Sounds weird, i know. What i want/wonder is the following: PHP can do the next: <?php if($foo == 'bar') { ?> Ow yeah, foo is bar! <?php }; ?> But how can i do the following: <?php $foo= ?> this is what foo looks like. <?php }; ?> This way i could edit the content of $foo in DW's design-view. I hope it's clear enough for you all to understand... Greetings frizzle. frizzle wrote: > But how can i do the following: > > <?php > > $foo= > > ?> > this is what foo looks like. > <?php > > }; > > ?> > > This way i could edit the content of $foo in DW's design-view. > I hope it's clear enough for you all to understand... <?php ob_start(); ?> this is what foo looks like. <?php $foo=ob_get_clean(); ?> -- Justin Koivisto - justin@koivi.com http://koivi.com Wow, little late on the reply, but i still wanted to thank you for your help. This is exactly what i meant, and it works great! :D Thanks again. ...

Version of PHP 5 that can 'module' together with PHP 4 on Linux/Apache
Folks, We are slow in rolling out PHP 5 to our users because it won't live as a module with PHP 4 in Apache 1.3.x/Linux. I have seen many workaround like running it as CGI or using a reverse proxy to forward php 5 requests to another server. Any 'php gods' out there who might know how hard that support would be to add to a future version of PHP 5, like PHP 5.1. I'm sure we are not the only hosting provider running into a problem with upgrading to PHP 5. We have a lot of folks with a large installed base of PHP 4 code (which some of them are not too familiar with) -- and we really can't drag them into upgrading. I remember when PHP 4 came out, with a few mods, we were able to support both 4 and 5 within Apache as modules and it made the transition a lot easier! Any thoughts? -- John ___________________________________________________________________ John Murtari Software Workshop Inc. jmurtari@following domain 315.635-1968(x-211) "TheBook.Com" (TM) http://thebook.com/ On 04 Feb 2005 12:53:36 -0500, John Murtari <jmurtari@thebook.com> wrote: > Any thoughts? Use FastCGI. I wrote a howto: PHP4+PHP5+Apache http://ondra.zizka.cz/projekty/howto_php5php4single.txt This is big trouble to thousands of server admins, but PHP developers throw obstacles under their legs: My workaround works till some 4.3.6 - then, the last trick...

Running PHP 4 and PHP 5 together as modules, Linux, Apache 1.3.x
Folks, We have been running PHP 4.x on Apache 1.3.x with no problems. After the first upgrade from php3 -> php4 were were able to load both modules for php 3 and php 4 with no problem. With an AddType directive we forced php 3 execution for just those files ending in php3. Thought we could do the same with php 5. We have a lot of folks on 4 who may not be ready to upgrade yet, so we were planning on letting php 4 handle anything ending in ..php or .php4 -- and use php 5 for just php5 extensions. Did the same thing as before in our Apache Config, we are running on Redhat 9 -- but can't get both 4 and 5 running together. It seems we can run one or the other, but not both -- when we start apache we get ONE server process that just sits there, nothing in the log files? After some web searching could not find much, one guy said there was a conflict in memory management and you can't run the two together? Anyone got this to work and how? Had posted this to the alt..php group and still looking for a solution? Thanks! -- John ___________________________________________________________________ John Murtari Software Workshop Inc. jmurtari@following domain 315.635-1968(x-211) "TheBook.Com" (TM) http://thebook.com/ ...

imagerotate problem with PHP 4.3.9
Recap: Using imagerotate within PHP 4.3.9 - PHP 5.2.0 for both XP and Linux, all using GD2 If you rotate an image 180 degrees, all is fine If you rotate an image > 0 degrees and < 180 degrees, or > 180 degrees and < 360 degrees, while the image will rotate, its dimensions are somehow not refactored and as a result you get a rather annoying black bar in the newly-rotated image, along with part of your image being cropped off. I learned about a possible workaround with ImageMagick's convert command, but has anyone found a better solution (other than using XP's built-in image rotation routines)? Thanks Phil On Wed, 20 Jun 2007 15:45:03 +0200, comp.lang.php <phillip.s.powell@gmail.com> wrote: > Recap: > > Using imagerotate within PHP 4.3.9 - PHP 5.2.0 for both XP and Linux, > all using GD2 > > If you rotate an image 180 degrees, all is fine > > If you rotate an image > 0 degrees and < 180 degrees, or > 180 degrees > and < 360 degrees, while the image will rotate, its dimensions are > somehow not refactored and as a result you get a rather annoying black > bar in the newly-rotated image, along with part of your image being > cropped off. > > I learned about a possible workaround with ImageMagick's convert > command, but has anyone found a better solution (other than using XP's > built-in image rotation routines)? Depends on what you want from it, how would you like it to behave...

patch Roadsend PHP SiteManager with php 5
how to use Roadsend PHP SiteManager with php5, any clues ?? ...

PHP 4.2.2 and php://stdin
Hello, I am using php 4.2.2 in Red Hat 9.0 with apache 2.0.40 I try to build a php script that accepts POST requests that contain multimedia data and shoves them in a MySQL database. My problem is that it seems that I cannot read the POST data from stdin. I created the following php script to test it: <?php $in = fopen("php://stdin", "rb"); $line = fread($in, 10); echo "Content-type: text/plain\n\n"; echo "len=".strlen($line)." OK\n"; ?> and however I try to POST a file either with cURL (curl --data-binary @file http://....) or with netcat (nc host port, ...) what I get back is len=0 OK i.e. no data are read! Any ideas? Thanks! Stelios G. Sfakianakis wrote: > Hello, > I am using php 4.2.2 in Red Hat 9.0 with apache 2.0.40 I try to build a > php script that accepts POST requests that contain multimedia data and > shoves them in a MySQL database. My problem is that it seems that I > cannot read the POST data from stdin. > > I created the following php script to test it: > > <?php > > $in = fopen("php://stdin", "rb"); > $line = fread($in, 10); > echo "Content-type: text/plain\n\n"; > echo "len=".strlen($line)." OK\n"; > > ?> > > and however I try to POST a file either with cURL (curl --data-binary > @file http://....) or with netcat (nc host port, ...) what I get back is > > len=0 OK > &...

Web resources about - PHP 4 and PHP 5 - comp.lang.php

PHP - Wikipedia, the free encyclopedia
.php, .phtml, .php4, .php3, .php5, .phps PHP code can be simply mixed with HTML code, or it can be used in combination with various templating ...

PHP - Wikipedia, the free encyclopedia
.php, .phtml, .php3, .php4, .php5, .phps PHP code may be embedded into HTML code, or it can be used in combination with various web template ...

Chapman PHP Web Services - Home
Chapman PHP Web Services home page.

..:: PHP GROUP ::..
Home Feedback Contact Us Site Map www website 22nd May 2012 Investors & Associates Awards & Achievements PHP Clients Customer Support PHP Services ...

The Complete list of PHP Podcasts, Screencasts, and Video Podcasts.
A complete list of all PHP podcasts, screencasts and video podcasts, aggregated into a single feed. Come explore all the podcasts that the PHP ...

PHP: The Right Way
An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative PHP tutorials around the Web

Freelance PHP, Freelance PHP Developer, Freelance PHP Programmer, PHP Freelancer, PHP Freelancer India ...
Freelance PHP, Freelance PHP Developer, Freelance PHP Programmer, PHP Freelancer, PHP Freelancer India ...

PHP: Hypertext Preprocessor
... general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want ...

CakePHP: the rapid development php framework. Pages
... are built-in. Translations, database access, caching, validation, authentication, and much more are all built into one of the original PHP MVC ...

PHP Advent 2011
C hristmas is upon us once again, and it’s time to have a look at what’s under the PHP Advent tree. Join us each day as our wonderful authors ...

Resources last updated: 3/24/2016 2:48:58 AM