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
1 answer

PHP4 `aggregate` function in php5 Godaddy server

I've been tasked to migrate an old PHP4.3 site (using CVS version control) to a more modern 5.2 install (lower version number for compatibility issues) on a shared GoDaddy server. I've gotten through most of the issues, but this particular one is a…
Jason
  • 11,263
  • 21
  • 87
  • 181
0
votes
1 answer

How to make a singleton in PHP4?

How do I make a singleton in PHP4? Is static available in PHP4?
Joshua Nagger
0
votes
2 answers

PHP: include file relative to calling file NOT root file?

OK say I have a file called fileA.php in the same directory I have another file called fileB.php so inside fileA there is this require_once('fileB.php') notice I did not specify a file path because both files are in the same directory. Now if fileA…
JD Isaacks
  • 56,088
  • 93
  • 276
  • 422
0
votes
1 answer

PHP: Call a method on a returned class

I have a method which returns a class and want to call a method on it. Instead of $theClass = $this->getClass(); $theClass->foo(); I would like to write $this->getClass()->foo(); Is there a syntax for this as of PHP4? This…
blinry
  • 4,746
  • 4
  • 26
  • 31
0
votes
1 answer

ajax style page reload with $_SERVER["PHP_SELF"] and a switch statement

I'm helping out a friend with her web page and I can't seem to make sense of the routing. So this webpage was written years ago in php. Essentially, there is stuff like this:
  • Marc HPunkt
    • 439
    • 3
    • 14
  • 0
    votes
    1 answer

    how to remove wild characters from mysql

    somehow wild characters has cropped up in my mysql table while storing UNC path in my table. and all the \r onces are showing up a square in the fields. Can anyone tell me how to fix these please? Thanks.
    JPro
    • 6,292
    • 13
    • 57
    • 83
    0
    votes
    4 answers

    How to make a class property private in PHP4?

    in PHP4 there is no public,private,etc. So I am wondering if there is some sort of work-around so that I can make a class's property private and only accessible via getter/setter Thanks!!
    JD Isaacks
    • 56,088
    • 93
    • 276
    • 422
    0
    votes
    2 answers

    Issues with Searchable Behavior and PHP 4.x.x

    I am trying to use Searchable Behaviour hosted here: http://code.google.com/p/searchable-behaviour-for-cakephp/ To initialize the search_index table with existing data, I have used this:…
    Mayank
    • 308
    • 1
    • 2
    • 15
    0
    votes
    1 answer

    sqlsrv_query missing first result in while loop

    Hi I have the following code function dropDownMenuMobile($parentId,$siteId,$root=false) { $menu = ""; $sql = "EXEC spGenerateDropdownMenuMobile ".$parentId.",".$siteId; $stmt = sqlsrv_query($GLOBALS['conn'],$sql); …
    andrew slaughter
    • 1,069
    • 5
    • 19
    • 34
    0
    votes
    1 answer

    Only allow certain (dynamic) IP's to visit website director

    OK I have 4 dynamic ips, in order to get those IP's I need run a gethostbyname('domain_name.com'); on 4 domain names I have that alwasy resolve to the only 4 IP's that are allowed to access this directory. This is very easy for me to do on a PHP…
    JD Isaacks
    • 56,088
    • 93
    • 276
    • 422
    0
    votes
    1 answer

    Filter/parse/modify emails and hrefs from html content in PHP4

    I'm not validating emails. What I want to do is find (and then change) 3 separate types of "email" content in a (html) string: a plain email: eg user@test.com a mailto href: eg user@test.com an aliased href: eg
    starmonkey
    • 3,147
    • 2
    • 20
    • 15
    0
    votes
    1 answer

    php HTTP_REFERER header, how to turn off or leave blank

    I'm using the following simple PHP proxy script but am getting a sporadic message at the destination site. I'm thinking that perhaps it may have something to do with the HTTP_REFERER header, although I'm not explicitly defining it. Can anyone tell…
    Bachalo
    • 6,965
    • 27
    • 95
    • 189
    0
    votes
    4 answers

    POST to different page depending on SELECTvalue?

    I have a form, depending on the selected value of my