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
3 answers

Typo3 installation on PHP4

Does anybody know if it's possible to install Typo3 on PHP4? I've looked up the packages-page, but i haven't found anything yet. Many thanks in regards!
amannn
  • 53
  • 4
0
votes
1 answer

Is there anyway to upgrade PHP4 mysql client?

I get the following error: Client does not support authentication protocol requested by server; consider upgrading MySQL client I know I can solve it with: SET PASSWORD FOR user@localhost = OLD_PASSWORD('password'); But I want to know if there is…
farinspace
  • 8,422
  • 6
  • 33
  • 46
0
votes
5 answers

I've some issues with an array $row fetched from MySQL

I've some issues with an array fetched from MySQL $result = mysql_query("SELECT id,email FROM people WHERE id = '42'"); mysql_fetch_row($result); echo $row[0]; // doesn't work echo $row[1]; // doesn't work but this work echo $row["FirstFieldName"]…
aneuryzm
  • 63,052
  • 100
  • 273
  • 488
0
votes
1 answer

session_start() in PHP 4

I always think that I am the unluckiest guy, because I have to maintain very horrible code written by some one else. But after going through some of the forums, I realized I am not alone. This code was written before I started working here, now I…
0
votes
0 answers

How to get the server current date in php4

I am using date("Y-m-d") its working fine in php5. But it displays wrong results in php4. How can I get today's date in php4?
n92
  • 7,424
  • 27
  • 93
  • 129
0
votes
2 answers

Hunting for PHP5 incompatibilities

Something in here is incompatible with PHP5, but I am totally lost as to what. I have an .htaccess file on my web server that has the line "AddHandler x-mapp-php5 .php", as it is required by just about everything else on the server and it defaults…
Stephen Belanger
  • 6,251
  • 11
  • 45
  • 49
0
votes
1 answer

Static Alternative in PHP for Parse error: syntax error, unexpected T_STATIC in

I was testing my PHP application on localhost with Xamppp and everything was just fine, but when I exported it to a real server, it does not work anymore. I found out that it is because my server does not support late static binding. My server has…
rlc
  • 5,809
  • 5
  • 38
  • 46
0
votes
0 answers

Convert pages from one PHP version to another PHP version

I work in a company, which has a product that runs in PHP 4.4. Now the product is gaining importance for the company and obviously we want to port it to one of the latest PHP versions available. In my young experience I've never had to migrate code…
Lorenzo97Ben
  • 85
  • 1
  • 9
0
votes
4 answers

PHP: Saving files with PHP to different root directory?

OK when I save uploaded files with PHP via move_uploaded_file() I cannot use an absolute URL I have to use a relative one. My site has 2 root directories one for the http side and one for the https side: httpdocs and httpsdocs respectively. So if my…
JD Isaacks
  • 56,088
  • 93
  • 276
  • 422
0
votes
3 answers

Highlighting Search Terms

I have a case where I'm returning database results and displaying them on a page based on a search term. This part is working fine, but I want to hightlight these search terms by wrapping them in span tags. I started to write a function that I…
Mike Cole
  • 14,474
  • 28
  • 114
  • 194
0
votes
3 answers

Can I login to a protected directory via a link?

I want to create links to pages and content that are in protected directories. I didn't program the protected directories I set them up from the host admin page. I want to be able to give links to user that will take them to page and login as…
JD Isaacks
  • 56,088
  • 93
  • 276
  • 422
0
votes
1 answer

How to replace global in php 4 function

I have a bunch of scripts that I have to port to php 5. They have global $name, $something...; defined in functions. These functions are not in classes. How can I keep those variables in the functions? An example function function myTest($str) …
jacobH
  • 1
0
votes
5 answers

PHP: Buy both and save $50?

OK my client wants to show a buy both feature in the cart, if they have 1 particular item type in the cart they want it to show up for another particular item type so if they buy both they can save $50 off the total. I am trying to wrap my head…
JD Isaacks
  • 56,088
  • 93
  • 276
  • 422
0
votes
2 answers

PHP4 session / object problem

I have a weird problem with PHP4 I have a class which assigns a $_SESSION variable. On the local dev server it works as: $_SESSION['foo'] = $this->foo; and I can access $_SESSION['foo'] as a string. on the live server $_SESSION['foo'] is not a…
bananarep
0
votes
5 answers

Shared data multiple sites

I have recently taken on a php web developer position for a large firm. They have multiple sites that share much of the same content (mainly news articles). All the sites although written in PHP, the content is static and manually edited on all the…
bananarepub