php

How many concurrent connection can MySQL+Php server take?

Can it support a small business? Do people recommend MySql + Php set up or a Java server to support a business with say 2000 editors accessing the data at the same time? ...

Object properties

Is the only way to assign $systime a value of a built-in-functions, is through a method? class Test{ private $systime; public function get_systime(){ $this->systime = time(); } } Right off i would think something like this right?: class Test{ private $systime = time(); public function get_systime(){ ...

AJAX (prototype/php) running 2 ajax process hangs until first one is finished

This question is a followup to my previous one: Previous Questions. So I setup my page to initiate an ajax call to initiate processing some records. And after each record it updates a row in another table to keep track of the status of this process. After that first ajax call is made, I have another start up. It's a Ajax.PeriodicalUpdat...

PHP constructor executes before arguments for nested variables can be supplied.

First things first, here is a little snippet code to help explain my problem: <?php class foo { public $title; __construct{ echo "<html>\n"; echo "<head>\n"; echo "<title>".$this->title."</title>\n"; echo "</head>\n"; echo "<body>\n"; } /** * * I get $title from index....

Forms in Cakephp

Hi, I m creating an application of creating forms.I m using the Form Helper of cakePhp.. In the views <?php echo $form->create('Form', array('action' => 'register'));?> <?php echo $form->input('Form.name',array('type'=>'textbox'));?> <?php echo $form->end(); ?> The form is not generated ...I m having the Forms_contro...

How to memcache this data ?

SELECT a.* b.* c.* FROM TOPIC a, BOARD b, MSGS c WHERE c.MessageID = 1 AND a.TopicID = c.MessageID AND b.BoardID = c.BoardID How to memcache this data? - set_cache("MY_WACKY_QUERY_1", data) note: 1 is the message id Now there are lots of places in the code which update these 3 tables (independantly of each other), so we need to del_cac...

preg_replace() help in PHP

Hi Consider this string hello awesome <a href="" rel="external" title="so awesome is cool"> stuff stuff What regex could I use to match any occurence of awesome which doesn't appear within the title attribute of the anchor? So far, this is what I've came up with (it doesn't work sadly) /[^."]*(awesome)[^."]*/i Edit I took Alan M...

Php file encryption methods. Does something simple exist?

It's seems that there isn't any pleasant way to encrypt a file in php. The built in methods of php, mcrypt, aren't very portable as most servers don't support them. Command line encryption tools are like ugly hacks. There's encryption for strings which is nice, but if we want to encrypt a file it doesn't help very much especially for ...

Calendar using Javascript/ PHP/ mySQL

for a current webapp i need a "outlook-like" calendar... Here are some requirements for the calendar: week-view for the appointments different appointment types direct display of the length and time of the date (like in googleCalendar) multiple appointments for the same time only using javascript, php and any DB We need the calendar ...

Using Mysqli bind_param with date and time columns?

How do you insert data into a MySQL date or time column using PHP mysqli and bind_param? ...

Get apache linux user from php

Hi folks, I'm on a foreign linux system and need to determine the user that apache runs on (and so does php). The aim: I need to get the owner of the script (this is no problem as I can use SplFileInfo) and compare it to the owner of the apache process. I'm open to any alternative proposals. Regards, Mario Edit: Additional info: T...

How to get url to send action form back?

i have form action file in another directory but some file send to this action file and how to get url to send action http://www.test.com -> action to http://www.123456.com/ac.php how to get http://www.test.com in http://www.123456.com/ac.php to goback http://www.test.com ...

FastCGI C++ vs. A Script Language (PHP/Python/Perl)

What are the ups and downs of using FastCGI C++ vs. PHP/Python/Perl to do the same job. Any performance or design pitfalls or using one over the other? Even your opinions are welcome. (Tell me why one or the other rocks, or one or the other sucks). ...

What's the best way to store PHP class attributes ?

Duplicate of: http://stackoverflow.com/questions/546403/whats-the-best-way-to-store-class-variables-in-php For some time I've been having this discussion with a co-worker on how should you store attributes within a PHP class. So which one do you think it should be used. Something like this: Class test{ public $attr1; publ...

cakePHP form errors

hi , I m creating just creating a register form in cakephp .. On using the follwing code in my view <?php echo $form->create('User', array('url' => array('action' => 'register'))); ?> <?php echo $form->input('User.name', array('type'=>'text')); ?> <?php echo $form->end(); ?> Will displays errors as $model = "Form"</pre><pre>sprin...

From a PHP Code Diff, can you tell which Classes and Functions have changed?

Background: PHPDoc ( http://www.phpdoc.org/ ) is a brilliant tool for extracting html documentation of your classes or methods from comments in your files. Adding PHPDoc comments also has other advantages - if you use an IDE like Zend or Netbeans, it will use the PHPDocs to show you autocompletion tips. Most Issue trackers have a featu...

Direct Print webpage in PDF file

In my site i m fetching my mysql data by using PHP. I want open that data in pdf file when i click pdf print button is it possible? ...

Drupal 6 won't send email, for account activation etc.

I'm running my own LAMP server locally. Something i need to setup? Should it be able to send email using php-mail, without havin to configure smtp. ...

cakephp contollers

There are two buttons in my cakephp page,one for registering new users and the other one for login. Can both the button's action be directed to the same function in the controller and have the same view.ctp file?? if yes,how can I do it? ...

How will i create batch file like Zend_tool or symfony.bin ?

I want to write batch file for my own php framework. for example i will use it to create controller or modul .If you have already used Zend or symfony you may know how to use .bin file of framework. I only know coding with php so i need clear description of how to write batch file .I looked symfony.bin's source code but code is very simp...