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

323 questions
0
votes
2 answers

code for fetching an email from the Gmail inbox

I am trying to develop a program for fetching email from the inbox of gmail. Can you help me for doing... If the code can automatically fetch the email, it is very good.. I am preferring php code.....
saif
  • 1
  • 1
0
votes
1 answer

Debian aptitude install: 'find' not found in PATH or not executable

When I try to install any package such as php5, it gives me this error. I did update and upgrade all libraries. root@host:~# apt-get install apache2-mpm-prefork libapache2-mod-php5 Reading package lists... Done Building dependency tree …
Kriesel
  • 3
  • 1
  • 2
0
votes
1 answer

How to restore local system time with PHP4

I have some PHP4 code in which I need to restore the system time after some code execution. I am looking for a simple statement with which I can store the current date/time, and restore it afterwards: $oTime = function1(); ... do something…
Alex
  • 41,580
  • 88
  • 260
  • 469
0
votes
0 answers

enable FTP in PHP

I need to move some files to FTP using PHP4. I tried with ftp_connect(). When I run the PHP page with this method, I got this error Fatal error: Call to undefined function: ftp_connect() After google, I found that, FTP should be enabled while…
user2314387
  • 265
  • 2
  • 4
  • 10
0
votes
1 answer

compiling php4 headers instead of php5

I'm compiling certain extensions for PHP on dreamhost PS server. I got an error and found that it happens when php4 headers are used instead of php5 headers. running phpinfo shows the server runs php5. however php-v on the command line gives…
Nir
  • 24,619
  • 25
  • 81
  • 117
0
votes
1 answer

can't get Nusoap server working with cakephp

I am trying to get nusoap server working with cakephp, the problem I am assuming is that the code is within a class (controller) and nusoap is trying to execute 'function()' instead of '$this->function()'. Does anybody know of a simple workaround…
brndnmg
  • 257
  • 6
  • 21
0
votes
1 answer

Solve PHP4 to PHP5 ugrade error

I have a client who have recently upgraded to PHP5. he have an error that says Parse error: syntax error, unexpected T_CLONE, expecting T_STRING in ms/kernel/object.php on line 528 I am looking at the code but can't figure out why this is…
Gautam Arya
  • 723
  • 14
  • 40
0
votes
2 answers

How should I store a date in PHP for use with javascript?

What I want to do is make a script on the server read a text file, sort it, then output it to a javascript object (probably via JSON). The text file in question looks something like this: 13/09/2009,17/09/2009,Arbitrary…
Eric
  • 95,302
  • 53
  • 242
  • 374
0
votes
1 answer

date gets converted to 1969 while using the php date function

Why do I get 1969 when I convert the following date to Y-m-d format. $date1="01/02/2012"; echo date('Y-m-d',$date1); NOTE: This is php4.
Micheal
  • 2,272
  • 10
  • 49
  • 93
0
votes
2 answers

PHP: Pass a variable to a file you are including?

I am wondering if there is a way to pass a variable to a file you are including via include()? I tried this but got an error: include("header_alt.php?img=hey"); Is there a way to do that? Thanks!
JD Isaacks
  • 56,088
  • 93
  • 276
  • 422
0
votes
1 answer

php: script updates fields prematurely?

I'm making an auction type website that as you can imagine is supposed to delist products as they expire. the expiration is simply stored as MySQL datatype DATE. so check_items.php:
jason dancks
  • 1,152
  • 3
  • 9
  • 29
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
  • 18,918
  • 16
  • 89
  • 106
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,152
  • 3
  • 9
  • 29
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
  • 7,424
  • 27
  • 93
  • 129
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,529
  • 1
  • 20
  • 44