Questions tagged [php4]

For issues relating to development using PHP, version 4.

PHP is a widely-used, general-purpose scripting language designed specifically for web development, though it has since been extended to other applications too. PHP is the most popular language for web development, powering over 20 million websites.

Useful Third-party Code and Tools

In addition to the vast functionality provided in the PHP Core and through PEAR and PECL, there are a number of noteworthy 3rd party contributions to the PHP world, some of which are listed below.

Related tags

328 questions
0
votes
2 answers

Regex for html attributes in php

I am trying to parse a string of HTML tag attributes in php. There can be 3 cases: attribute="value" //inside the quotes there can be everything also other escaped quotes attribute //without the value attribute=value //without quotes so…
mck89
  • 17,869
  • 15
  • 83
  • 101
0
votes
1 answer

php: My regex can't validate simple phrases?

So I wrote this function: function validate_text($text,$min,$max,$include_spaces=true) { $match = array(); $regex = ($include_spaces)?"/[a-zA-Z0-9 .\-_]":"/[a-zA-Z0-9.\-_]"; if($max<=0) { $regex =…
jason dancks
  • 1,102
  • 3
  • 9
  • 25
0
votes
5 answers

How to resolve Warning "Cannot modify header information" in page redirect

Possible Duplicate: “Warning: Headers already sent” in PHP I have following piece of code to do the 301 redirect at the top without any spaces and nothing above this code, but its giving the error, Warning: Cannot modify header information -…
n92
  • 6,776
  • 26
  • 87
  • 127
0
votes
1 answer

PHP4: Wrong date

Apart from the discussion about old software, there's a problem with a PHP 4.3.10 instance in Apache 1.3.33. This is the server date: $ date Qua Nov 14 11:41:25 BRST 2012 The PHP date seems to be correct: echo '
vmassuchetto
  • 1,459
  • 18
  • 41
0
votes
1 answer

Does there exist Amazon EC2 AMI preconfigured with PHP4?

I'm having a very difficult time setting up a PHP4 LAMP stack on an EC2 instance. Does anyone know of any pre-configured AMI which supports PHP4? For the record, I do not have the option to develop in PHP5
rocketas
  • 1,569
  • 3
  • 16
  • 29
0
votes
2 answers

Deprecated warning only in some php5 environments?

We're moving from php4 to php5, and we get this warning on one of our developers machines, but not in our php5 test setup: Deprecated: Call-time pass-by-reference has been deprecated in C:\Workspace\Prelive\www\includes\filename etc.. The code seems…
Maarten
  • 4,503
  • 7
  • 35
  • 48
0
votes
1 answer

PHP 4 Variable losing value on scope change

echo $uid; // RETURNS INTEGER VALUE if (isset ( $_POST ['cashpaid'] )) { $queryfinal = "select * from " . $db_prefix . "customer_det where `id` = '$uid'"; // UID RETURNS NULL .... I've tried everything and every combination of…
smada
  • 217
  • 1
  • 6
  • 17
0
votes
2 answers

Getting error database not selected

code:
jason dancks
  • 1,102
  • 3
  • 9
  • 25
0
votes
1 answer

xml parsing in php4

I know that this might be way too much to ask, but I have been reading about xml parsing and I just do not understand it! I did not realize that my client had PHP 4 until I was done programming (a lesson well learned), but I need this to work in…
luv2code
  • 1,034
  • 5
  • 19
  • 39
0
votes
4 answers

how to resize bmp,tiff image using gd library ? and also mention about imagemagick which is good to use

i need to know which is better gd or imagemagick to resize an image
honest
0
votes
1 answer

Convert captcha generator from PHP4 to PHP5

I have an old image captcha generator written in PHP4 that i need to convert to PHP5 Any suggestions for what I need to change to get it to start working? The main error I'm getting reads "Resource interpreted as Image but transferred with MIME type…
J Grover
  • 859
  • 1
  • 8
  • 14
0
votes
4 answers

PHP 4 how to strip a specific variable from the URL

PHP 4 how to strip a specific variable from the URL in this case "?lang=en" /filename.php?lang=en
pwr
  • 1
  • 1
0
votes
2 answers

How to clear garbage in PHP 4

I have written an application. But there is an issue of memory overflowing. Is there a way to clear all garbage values in PHP 4?
lankitha
  • 263
  • 7
  • 15
0
votes
1 answer

php4 to php5 call of another file-php with input type is not working

After a change from PHP4 to PHP5 a problem occurred, I cant find it in the migration FAQ.
0
votes
5 answers

__construct() { issue for PHP4 and PHP5. maybe an another reason

I have weird issue with CodeIgniter, here is a start part of my controller class Home extends Controller { /** * Constructor */ public function __construct() { parent::Controller(); } ... everything is working fine…
designer-trying-coding
  • 5,636
  • 16
  • 66
  • 98