What Are The Pros/cons/issues For PHP4/PHP5 With Apache (either 1.3 Or 2).
I'm starting a database/web interface project, using Linux and postgresql. I've programmed in PHP4 in the past, and for this new project am unsure whether to use PHP4 or PHP5. My main concerns are stability and security. What are the pros/cons/issues for PHP4/PHP5 with apache (either 1.3 or 2).
View Complete Forum Thread with Replies
Related Forum Messages:
What Are The Pros And Cons For Magic_quotes_gpc
My first impulse was to turn it off. But maybe I'm wrong. Or is it one of those 6 of one half a dozen of the other things? From what I'm seeing on a search it might improve performance slightly but with some s/w there are security issues... (We have register_globals turned off). General working env. is mySql, but might switch to PostGres in the future. Right now I'm using Perl::DBI to access the database, but that's because I don't know PHP data access methods yet and have some already written stuff to work with.
View Replies !
What Are The Pros And Cons Of Running Php As A Regular CGI
I am considering going with the ISP Dreamhost because they offers both php4 and php5 support. However, I recently learned php4 runs as a regular CGI by default. This can be change, so it will runs as an Apache module. But if you want to run php5, you must run as PHP-CGI. Dreamhost states there are: "There are a FEW VERY MINOR drawbacks to running PHP-CGI. They are: * Custom 404 pages won't work for .php files with PHP-CGI. * Variables in the URL which are not regular ?foo=bar variables won't work without using mod_rewrite (example.com/blah.php/username/info/variable). * Custom php directives in .htaccess files (php_include_dir /home/user;/home/user/example_dir) won't work. * The $_SERVER['SCRIPT_NAME'] variable will return the php.cgi binary rather than the name of your script" But are these really minor drawbacks? What if, for example, you really do need to override a php directive?
View Replies !
Pros/ Cons Of Passing Parameters In URL
I looked, but couldn't find anything on this concept. Question: What are the pros and cons of passing parameters in a URL with dynamic PHP pages? What is the worse thing than can happed? My thoughts: Cons: 1) exposing DB values or Fields, etc 2) URL looks bad 3) some search engines might not follow it 4) give to much information and a Hacker might do something harmful? Pros: 1) maybe easier to code (problably not) 2) you can email links to people to see the dynamic data (BIG PLUS) 3) you can make search engines follow the link (BIG PLUS) as some spiders can follow it 4) your website might look bigger, as in more pages than it really is So, do the positives out weigh the negatives? Or are my pros/cons NOT CORRECT/ ACURRATE.
View Replies !
Pros/cons Of Db Counter Vs Gallery Type
I'm trying to add a view counter to my gallery. I have two options a database or the kind "Gallery" the php software uses. I've used Gallery on other sites and it is great, but my other gallery has too many photos to switch now. I've looked at theirs and don't quite understand it. Using a MySQL would be very easy, just have a counter column and do a update id+1 everytime the script is loaded. Problem with doing that is if someone hits refresh 1000 times the number will increase 1000. Another question I have is processor based. Which eats more processor? Using MySQL to track it? or having a data file store it?
View Replies !
PHP5 And PHP4 Compatibility Issues
adactio.com/journal/1202 has a very interesting PHP script which gathers RSS data from various feeds and prints them in an HTML table. He calls this a lifestream. Anyways, unfortunately, my knowledge of PHP is rather limited - I'd rather work with a stylesheet. It turns out that my local machine has PHP5, and the script works flawlessly. However, Bluehost, my hosting provider, has PHP 4.4.4. As a result, I'm getting a lot of exceptions thrown around. I think I figured out my way around the getElementsByTagName(), which should be get_elements_by_tagname() in PHP4, but I'm still getting heavy exceptions. I also googled and found that the date_default_timezone_set() function isn't supported in PHP4 either. I'd appreciate it greatly if anyone could point out where the incompatibilities are - even if there's a better way of doing this RSS gathering, I'd just like to see anyway for educational purposes. My PHP source is the following (I've left out the HTML surrounding it): <?php date_default_timezone_set("Europe/Paris"); $feeds = array( "feed1" ="http://...", "feed2" ="http://...", "feed3" ="http://...", "feed4" ="http://..." ); $details = array("title","link"); $list = array(); $rss = new DOMDocument(); foreach ($feeds as $name =$feed) { $rss -load($feed); $items = $rss -getElementsByTagName("item"); foreach ($items as $item) { if ($item -getElementsByTagName("pubDate") -item(0)) { $date = $item -getElementsByTagName("pubDate") -> item(0) -nodeValue; } else { $date = $item -getElementsByTagName("date") -item(0) - Quote:
View Replies !
Apache 2.0 W/PHP4; W/PHP5 Cohabitate
Apache 2.0 is currently installed to support an application using PHP4. I do not have PHP4 development environment installed. I want to install PHP5 for a learning session. The httd.conf file in Apache has the following entry: LoadModule php4_module "C:/Program Files/ktdms/php/sapi/php4apache2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/Program Files/ktdms/php" <Directory "C:/Program Files/ktdms/knowledgeTree"> The install process for PHP5 application instructs the following insertion in httd.conf: # For PHP 5 do something like this: LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php # configure the path to php.ini PHPIniDir "C:/php" Will this work without conflict? Can I install PHP5 development environment using Apache 2.0 while another application is using Apache 2.0 with PHP4?
View Replies !
Install Php4 And Php5 At The Same Time To Apache
Here is some note about installation together php4 and php5 on apache2. First you need is to edit with the help of hex editor php4apache2.dll (in my case, or php5apache2.dll) in php4 directory. You find "x-httpd-php" and replace with "x-httpd-plc" e.g. (I found 2 matches) Save your dll file and edit your apache config (httpd.conf) e.g. like: Code:
View Replies !
Issues With PHP5
I've used php4 I just created a site and am using php5 server... now some of my commands are broken if(isset($HTTP_POST_VARS) doesnt workand my method of passing a variable through a url doesn't work also... ?id=1 anyone know what the fixes are?
View Replies !
Use PHP4 Dom XML In PHP5?
Is it just me... Or is PHP5 XML very limited? Or am I missing something very obvious? Any way to use PHP4 Dom XML in PHP5? Does anyone know why support for it was dropped? I have following code I need to have replaced: PHP4 $eir_dom = domxml_open_mem($eir_padfile_content); $eir_root_node = $eir_dom->document_element(); // = root element PHP5 $eir_dom = new DOMDocument; $eir_dom->loadXml($eir_padfile_content); // how do I set $eir_root_node ? PHP4 .... $nodes = $cur_root_node->child_nodes(); .... if ($test_node->node_name() == $next_node_name_to_find) { PHP5 // child_nodes(); node_name() PHP4 .... if ($node_child->node_type() == XML_TEXT_NODE) { $node_child->set_content($new_content); break; } PHP5 // set_content, node_type()
View Replies !
PHP4 Dom XML To PHP5 XML
Can anyone point me to a guide or something for conversion? I tryed http://alexandre.alapetite.net/doc-...5/index.en.html but it doesn't work (not all parts anyway) - and as I can't find a working IDE/debugger combination I can't currently figure out why. I need to translate following code: PHP4 $eir_dom = domxml_open_mem($eir_padfile_content); $eir_root_node = $eir_dom->document_element(); // = root element PHP5 $eir_dom = new DOMDocument; $eir_dom->loadXml($eir_padfile_content); // need equalant of: document_element(); PHP4 .... $nodes = $cur_root_node->child_nodes(); .... if ($test_node->node_name() == $next_node_name_to_find) { PHP5 // need equalant of: child_nodes(); node_name() PHP4 .... if ($node_child->node_type() == XML_TEXT_NODE) { $node_child->set_content($new_content); break; } PHP5 // need equalant of: set_content, node_type()
View Replies !
PHP4 Vs PHP5
I had php script that used to work with PHP 4.3.4 but stop working as soon as I use the PHP5RC1? Are there list differences that is deprecated/removefrom PHP4.3.4?
View Replies !
Php5 Or Php4 Sql
my previous php applicaiton written in php4 couldn't work. I see is a blank screen, example when i go to localhost/xyz/index.php.
View Replies !
PHP4 Or PHP5?
I'm having a bit of a dilemma, shall i update my software (which is increasing using OOP) to php5 and loose my RHEL compatability, or stick with php4?
View Replies !
Using PHP4 Or PHP5
As I mentioned earlier (in a posting to the PHP mailing list), I am putting a team together to create a web-based RPG, different from the one I am currently playing. Would it be better to use PHP4 with it's strong developer base, or the new PHP5 which is more object oriented an in my opinion would be easier to keep the game up to date?
View Replies !
PHP4 Or PHP5
I need to build a CMS and i have very little expierence with php. I know the main differences betweet php4 en 5, like better support for object oriented programing, exceptions, etc. But i wonder if i even need those things when building a cms.
View Replies !
PHP4 To PHP5
I've just been notified by my webhost (Pair) that my site will be moving from PHP4 (4.3.8) to PHP5 (5.2.3) and Apache 1.3.37 to 2.2.4. While I have been expecting this for a while, I'll put my hands-up and say that I've not taken the time to change anything. I now have until next week(!) to make sure everythings working *gulp* My site isn't huge but I have alot of visitors and make a little money through Adsense, so I really need to make sure everything is secure and working to keep my visitors happy and obviously prevent any loss of $.
View Replies !
PHP5 & MySQL5 Issues
I've upgraded to php5 and MySQL5, and I can't get the MySQL ext to load. I have no problems with PostgreSQL. I have uncommented extension=php_mysql.dll and placed the dll in the correct directory. My error when trying to restart Apache is: Warning Unknown(): (null): Unable to initialize module Module compiled with module API=20050922, debug=0, thread-safety=1 PHP compiled with module API=20020429, debug=0, thread-safety=1
View Replies !
PHP5 Stability Issues?
We are in the process of rewriting our internal management system (which was written in PHP4), and figured this would be a good time to migrate to PHP5 to get all the OO goodness it has to offer :) I am running php 5.0.3 on apache 1.3.something under slackware linux. Unfortunately I frequently get segfaults from php scripts, and they are not even scripts that do anything fancy or special. For example, in one script i got a segfault just in the middle of a HTML comment, which seems to make no sense whatsoever (unless hte crash came later and it hadn't gotten round to sending the rest of the output yet.. but whatever the case if i removed the html comment the code started working again). Another crash occurs when i assign a value to a variable, not any kind of special variable, just assigning a string value to a variable, and php5 segfaults. Naturally this makes very very unhappy as I very much want to move the new system to php5, because it looks like a much better language otherwise :) Has anyone else experienced problems like this? And more importantly, does anyone know how to get around these problems?
View Replies !
PHP5 Speed Issues
I figured out, that PHP5 runs faster when I do not inherit classes, I hope I use the right word. I mean the class sub_class extends main_class notation. As well I figured out, that I in most cases should references in foreach loops. like foreach($array as $key => &$value) { Lots of memory is saved by that....
View Replies !
Configure PHP5 Issues
I'm new to this forum and was wondering if anyone could be of assistance. I'm currently running a little linux box at home with Apache2, PHP 4 and mySQL 4. I was attempting to compile PHP 5 from source but when using ./configure I got the following error: #configure: error: libxml2 version 2.6.11 or greater required. I then downloaded and installed the libxml2 rpm but alas the ./cofigure still throws the same error. When I run #rpm -q libxml2 I get the responce: #libxml2-2.6.19-3tr so surely this means the package has been installed.
View Replies !
Howto: PHP4 Dom XML To PHP5 XML ?
Can anyone point me to a guide or something for conversion? I need to translate following code: PHP4 $eir_dom = domxml_open_mem($eir_padfile_content); $eir_root_node = $eir_dom->document_element(); // = root element PHP5 $eir_dom = new DOMDocument; $eir_dom->loadXml($eir_padfile_content); // need equalant of: document_element(); PHP4 .... $nodes = $cur_root_node->child_nodes(); .... if ($test_node->node_name() == $next_node_name_to_find) { PHP5 // need equalant of: child_nodes(); node_name() PHP4 .... if ($node_child->node_type() == XML_TEXT_NODE) { $node_child->set_content($new_content); break; } PHP5 // need equalant of: set_content, node_type()
View Replies !
PHP4 + PHP5 + ZendStudio
I've had setup on WinXP: Apache1.3 with PHP4 module and PHP5 installedas CGI for one vhost. This worked fine, till I installed Zend Studio 4 beta. I'm trying to make Zend Server use my existing configuration, but without success. If I point it to PHP4 php.ini, PHP cannot find (or rather refuses to load) modules. If I point it to PHP5 php.ini, I cannot enter server console, because my php lacks ZendOptimizer (even if I install ZendOptimizer). [Zend docs are brief, and googling finds only obvious answers, like "install mysql and uncomment mysql extension".] Do you have any suggestions how to get this trio working?=
View Replies !
PHP4 -> PHP5 Issue
I'm quite experienced in programming in PHP4, but I would like to make a step to PHP5. I created following class which works perfectly in PHP4: Code: ( text )
View Replies !
Install Php4 & Php5
Wanted to install php5 as well as php4 in a single system is this possible..Windows XP Please let me know and one more thing can u send me some easy and good link to install php 4 and php5 in windows XP environment.
View Replies !
XML Package For PHP4 And PHP5
I just released the new beta version of ActiveLink PHP XML Package that works in both PHP4 and PHP5. The package is not dependent on any other XML extensions or libraries and is completely written in PHP. If anyone is interested in testing the beta version, please do so. You can get the 0.4.0-beta version from: The package is freely redistributeable under the terms of LGPL.
View Replies !
PHP4 And PHP5 Installations?
I am currently learning PHP and MySQL with a book. This is a great book but I soon realised that my host uses PHP4 and the book is written for PHP5 so the scripts I am wanting to creat won't work for production. Is it possible to run PHP4 and PHP5 at the same time on my home system so I can develope for PHP4 but keep learning PHP5? I am running a windows system with Apache2 and MySQL 4.1.
View Replies !
Downgrading From Php5 To Php4
I've made a mistake and developed in php5 whereas our hosts only run php4 and have only worked through a book on php5. Is it ok to change this from version 5 code: $quoteid = $quote->quoteid; to this: $quoteid = quoteid($quote); so that i can run my scripts on a host running version 4 of php? I have been working through all my code, trying to replace anything that won't work in version 4. I've done loads and loads of it but i still can't get any results from the database and this is one of the things I can't seem to find an answer to elsewhere. I've been learning out of a book for too little time and the deadline is looming.
View Replies !
Phplib Sql, Php4 Vs Php5
who have noticed that the outputs aren't the same with PHP4 and PHP5? Seams like some sort of sessions isn't remaining and the SQL-object is resetted... Any clues?
View Replies !
PHP4, PHP5, PEAR
I need the following features for my web service:WSDL parsingDocument/Literal styleRPC/Literal style (optional)UDDI clientUDDI serverAttachments using MIMEAttachments using DIME (optional)I've searched for weeks through the Internet. The more I search the less I understand so forgive me. I've first installed PHP5 on a Gentoo Linux machine and saw Soap support was built-in PHP5. I read in PHP5 documentation that SOAP support was now built-in which includes in fact what was called PEAR-SOAP with PHP4 (if I've correctly understood). Now I've installed PHP4 on Windows and would like to give SOAP a try under Windows first before I port the whole thing under Linux. So I went to install php_soap.dll extension and saw PHP has to be version 5 or later. Now I wonder:Is PHP5 Soap PHP-SOAP or PEAR-SOAP?Can I use PEAR-SOAP with PHP5?Can I use PEAR-SOAP with PHP4?Is php_soap.dll from PECL actually a Windows port of PEAR-SOAP.
View Replies !
PHP4 & PHP5; Cohabitation: Is It Tough?
Here is what I need to better understand: I have what I always thought to be the greatest hosting Co. Lightning speed capability, very tight security, outstanding customer support. For example I recently needed SOAP to be installed 2 hours later got an email... Installed!. Until then everything was fine and dandy! I (Yesterday) asked about their PHP5 readiness. And was told that PHP5 will run by end of February. But they are still undecided on running BOTH PHP5 and PHP4. I have a couple of my own sites (recent one) that are OOP and PHP5 ready. However I have a bunch of sites done 2 or 3 years ago (Clients one) that are far from being ready for PHP5 (in a short time period). Further more I run three carts (configured for the most recent PHP4) but that will never work in PHP5 for they use a lot of the serialize() which does not do well in a PHP5 environment. And the cart’s programmers need a few more months to be 5 ready). Could you explain why running 4 & 5 seems to be such a hardship? Many other customers will be at risk to have broken sites. On another hand I have seen hosts that will allow running both at least for a year or two.
View Replies !
Php4 To Php5 Problems Summary?
My remote hosting service just upgraded to Php 5. I believe that this is the cause of one minor error that I have encountered. This line: <?= // isset($_SESSION['some_var'])?'Disable':'Enable' ?> now produces the following error: Parse error: parse error, unexpected '' in /home/abasama/public_html/demo_enable.php on line 114 [I know it's ugly, but I commented out that line in case I want to reuse it in the future.] I've also tried changing it to <?php echo // isset($_SESSION['abas_demo'])?'Disable':'Enable' ?> and I get the same error. I don't really care whether I can leave that line as it is or not, but it got me to wondering what other things might now be broken. Is there a summary of any sort that would help me know what I should be looking for as far as broken functionality after upgrading to Php5?
View Replies !
XML Parsing Of New Lines On PHP4 And PHP5
Say I have the following script: <?php $contents="<p>test test</p>"; $xml_parser = xml_parser_create('UTF-8'); // try xml_parser_create_ns, too. xml_set_character_data_handler($xml_parser,'handle r'); xml_parse($xml_parser, $contents); function handler($parser, $data) { static $count=1; echo "$count. $data<br />"; $count++; } ?> When ran on PHP4 (via the web, so new lines are seen as spaces) I get this: 1. test 2. 3. test When ran on PHP5 (via the web) I get this: 1. test test Why the difference? Is there any way to get PHP5 to simulate PHP4's behavior?
View Replies !
MySQL_connect() Working In PHP4 Not In PHP5?
I upgraded my development machine to PHP5. My pages with the subject function no longer work. I am able to do an ODBC connect to the data files from other programs. I get the error: Fatal error: Call to undefined function mysql_connect() in <file.php> on line 190. This is a W2K machine running IIS4, if that makes a difference... Still works on server running PHP4.
View Replies !
Should I Choose PHP4 Or PHP5 For My Testbed?
I'm setting up my computer again for developing websites. Logically it seems sensible to exactly mirror the version of PHP on the final web server, to help with testing. But it seems kind of nice to use PHP5 and I've already installed Xampp, which has PHP5. When writing my PHP code, how likely am I to write something that will work on PHP5 but not work properly when I transport it over (I'm not talking about involved OO stuff, I know that has changed).
View Replies !
Possible For Sessions To Work Under PHP5 And Not Under PHP4.
I'm writing an web application with PHP/MySQL. I used PHP5 but believed to use code that would work also under PHP4. However when I tried my application under PHP4 I got the warning that the headers are already sent and my session did not work. I do understand that I have to send the headers before anything else. But does anyone know what kind of difference between PHP4 and PHP5 makes it possible for sessions to work under PHP5 and not under PHP4.
View Replies !
PHP5 -> PHP4 -- Replacing Strripos
Ive been working on a page in PHP5 that uses the strripos function. Ive now been told to move to PHP4 and obvioulsy strripos does not work under that. Is there a PHP4 function that i can use instead? Or does anybody have any tips how to write a function to take in char and a string and return the last position of the char. Im not very good with string manipulation in PHP.
View Replies !
PHP4 Object Handling Vs PHP5
I've become a bitconfused about how PHP4 deals with objects after reading this description of PHP5: "PHP's handling of objects has been completely rewritten, allowing for better performance and more features. In previous versions of PHP, objects were handled like primitive types (for instance integers and strings). The drawback of this method was that semantically the whole object was copied when a variable was assigned, or pass as a parameter to a method. In the new approach, objects are referenced by handle, and not by value (one can think of a handle as an object's identifier)." I have always assumed that PHP4 uses a copy-on-write approach, so that when you pass an object to a function by value, PHP doesn't actually create a new copy of that object.
View Replies !
PHP4 Equivalent Of PHP5 DOMDocument->loadHTML()?
I have an HTML string that I receive from a variable. It's not well-formed but contains some elements, I need to manipulate. Basically, just adding and removing some elements. After reading about PHP5's beautiful DOMDocument->loadHTML(), I realized it could be done. However, our server is using php4 =(. Is there a PHP Class floating around that may do the trick? I almost do not want the solution to use PHP4's DOM functionalities bc I read that they don't translate well when you update PHP to version 5.
View Replies !
A Small Problem In Running PHP4 Under PHP5 - $row[fieldname]
I have just upgraded my php version form php4 to php5. and I met this problem, and don't know if you know the solution. My site was written in PHP4, and most parts can be running smoothly in PHP5, only that in old version, I can use $row[fieldname] to access the data in database directly, no need to put double quote around fieldname. BUT in PHP5, this is wrong, I got error message "undefined constant". I know this is because PHP5 see the fieldname without double quote as constant instead of name of field. I know the slowest solution is to add double quotes one by one, but this will take a lot time. So are there any solution to change configuration in php.ini and let PHP5 accept this kind of usage just like that in PHP4?
View Replies !
|