php4

Can MYSQL support databases with sizes around 4 GB? Will I have any performance issues?

I am planning to have a database of size more than 12 million records all of them in a single table and no other joins etc, used for search, filtered based on field names of the table, approximately 4 GB size in MYSQL backend and php frontend. Question is can MYSQL support databases with sizes around 4 GB, Will I have any performance is...

Best charts for reporting with flash for php code

Any libraries for a basic chart reporting with flash and php code based on parameters we pass, I know there is open flash chart, seems to be a slightly difficult to get that going. Do you have any other alternative flash charts to suggest for a php code ...

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 script on a page, but I am confused as how I can do it to a directory? Thanks!! ...

PHP: Loop thru all months in date range?

if I have a start date, say 2009-02-01 and an end date say 2010-01-01. How can I create a loop to go through all the dates (months) in the range? Thanks!! ...

Resize and Save an image in PHP4

I have been working on a script that uploads an image to a server and add a reference to that Image in a database. The server runs a PHP4 version on apache ( and there is no chance to upgrade ) So I wanna modify the following upload script to resize the image automatically <?php include_once('CheckLogin.php');...

PHP: Warning: array_merge_recursive(): recursion detected

I have a list of arrays (unknown amount), I need to merge all of them recursively. So what I did what create an array of all of those arrays and pass them into this function: function mergeMonth($array) { foreach($array as $date_string => $inner_array) { if(isset($temp_inner_array)) { $temp_inner_arr...

export mysql database to excel by php

Hi I want to export my database to an excel file by php,I need a source code in php to do this ...

Issues with Searchable Behavior and PHP 4.x.x

Hi, 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: http://code.google.com/p/searchable-behaviour-for-cakephp/issues/detail?id=1&amp;q=controller Reply No. 2 which creates the class SearchController. ...

to run sphinx on php

what should be done to make sphinx run on php after successful installation and configuration of sphinx on console. ...

to make 2 different indexer for different sphnix.conf

is it possible to make 2 indexers in 2 different location using 2 different sphinx.conf ??? ...

Problem with searchd protocol error in sphinx

I am getting the error ERROR: expected searchd protocol version 1+, got version '0'. Does anyone knows why is it coming so when i run test2.php of sphinx api(ver 0.9.9-win32). ...

how i can this log in system with yahoo,twitter,facebook etc

in many sites i can see how i can do that is must tell every company or what? ...

PHP: Inject iframe right after body tag

I would like to place an iframe right below the start of the body tag. This has some issues since the body tag can have various attributes and odd whitespace. My guess is this will will require regular expressions to do correctly. EDIT: This solution has to work with php 4 & performance is a concern of mine. It's for this http://drupal....

What's wrong with this PHP4 class to do AES encryption?

When I decrypt something encrypted with this function, the decrypted version doesn't equal the original. class AES256encryption { var $secret = ''; var $cipher_key = ''; function AES256encryption($secret='') { if (empty($secret)) { global $secret; if (empty($secret)) { ...

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!! ...

finding image of the remopte url using preg_split

Hi All, i want the content inside of the "img" tag from the string. for ex:- if str="< img src="/files/thumbnails/001.simonhiggins_comm games_thumb.jpg" title="Commonwealth Games" alt="showreel" class="clear-right-margin" />" then i want to o/p using preg_split as follows:- src="/files/thumbnails/001.simonhiggins_comm games_thumb.jpg...

Why is the php assignment operator acting as an assignment by reference in this case?

I have some code that appears to behave differently between php4 and php5. This code below: class CFoo { var $arr; function CFoo() { $this->arr = array(); } function AddToArray($i) { $this->arr[] = $i; } function DoStuffOnFoo() { for ($i = 0; $i < 10; ++$i) { ...

how to remove wild characters from mysql

Hi, 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. ...

PHP: Get class name of passed var?

I have a function that gets a class passed to it as a parameter. I would like to get the class name of the passed class as a string. I tried putting this method in the passed class: function getClassName() { return __CLASS__; } but if the class is extended I assumed this would return the name of the subclass but it st...

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 works: $this->{$this->getClassName()}->foo(); But I would like to manipulate the class beforehand (I do th...