php

what does & do in php

I have this code $myNewClass->cars =& Orders_Car::GetRecords($myNewClass->searchString); ^ what is & doing there. thanks ...

header information showing instead of page

when loading query results into a page using jquery load() I recieve header information and funny characters on my page. What could be the cause of this? In addition to this Firefox and Chrome only show this error. IE8 is fine. When clicking around the site instead of opening pages, the download dialogue opens - which tries to download a...

PHP Magento SOAP-ERROR: Parsing WSDL: Couldn't load from urlpath

I am trying to create a soap client by passing a url that is hosted on my local machine, my dev environment and I keep getting this error. I use to be able to make this call and it worked just fine. Basically all I am doing is this $client = new SoapClient('http://virtual.website.com:81/api/?wsdl'); If I go to the url in a browser it...

Flat Files, Best Practices PHP to Actionscript 3 via XML

I'm writing a simple cms for a client and for the umpteenth time can't decide the best strategy going in. My options, as far as I can tell, are: 1) Store my XML data as a flat file that is referenced by my actionscript. I could manipulate this file with a php "back end". 2) Have my actionscript call a PHP script that would output the...

Pass Element value to $ajax->link in cakephp

I need to pass the value of an element to an $ajax->link without using a form/submit structure. (because I have a dynamically set number of clickable links through which I am triggering the action) I used to do this in Ruby using the Prototype javascript function $F like this: <%= link_to_remote "#{item.to_s}", :url => { :action...

How to make Eclipse Debug Output always show latest output lines

I'm debugging my PHP application, trying to see what HTML code is being generated while I trace through the code. Problem is, everytime the Debug Output window fills its window, it scrolls to the top, forcing me to scroll down to view the last few HTML lines generated. Is there a way to make Debug Output not scroll up ? The effect I'...

Is using AMP software like WAMP, MAMP, XAMPP a good idea?

I know that softwares like WAMP, XAMPP save a lot of difficult configuration time. But, besides this, Is this a good idea? I, on the other would like to stick to traditional method and install each component seperately and use them. ...

Send JSON from Flash to PHP

Hi, I'm trying to send array of data from Flash to PHP to sending e-mail. I'd like to do that because I must change the php page everytime my form site changes because of client's choice. My answer is, can I send an array of objects like this to php? var message:Array = new Array (); message.push ({field_name:"Name", value:"John Lennon...

cron file_get_contents() error

I have a php file which uses file_get_contents() It works fine in the browser, but fails with the following error when run as a cron job: Warning: file_get_contents(): URL file-access is disabled in the server configuration in /path/to/the/phpfile.php on line 22 This is what I'm using: /usr/bin/php5 -q /path/to/the/php...

PHP Callstack tool

Am working on a very large PHP application written by someone else. Does anyone know of any tool (free or commercial) that would allow me to diagram which PHP file includes / calls / needs which other PHP file ? I tried nWire for PHP and it doesn't accurately capture my include () calls. ...

How to mirror files between two ftps ?

I want to mirror only some files "Not directory". I know PHP ftp function and using them as well, just want to know if any way i can make server to server FXP working. i saw CLI tool lftp but it mirrors dir only. And if there is some other tool that can fxp the files. ...

Log SQL queries in production?

I'm having a dilemma on whether or not to log SQL queries in production as well. I don't know how slow writing files is in PHP. Probably some benchmarks could give some answers, but I wanted to see what you guys think before. What does or does not make the process slow? Or what things could it depend on? ...

Get specific content out of an URL read using CURL

How can I get specific content out of a URL fed into CURL? I'm unsure as to how to begin doing this, and haven't been able to Google for it properly since I don't know exactly what I'm looking for. ...

Is php capable of doing what I want?

Hey stack overflow, I'm working on a biology web based application and trying to figure out what language to use. The features I need to include are: Image viewing frame - This area will display the current image that the biologists wish to see. The application needs to take in a number of coordinates from a file and draw those point...

cron output options when using curl

when running a cron job like this: curl http://example.com/cronjob.php The output email contains this: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 52 0 52 0 0 81 0 --:--:-- --:--:-- --:--:-- 81...

How to Count Total Number of Records and Display?

$sql = "select count(userId) from tblUser"; $result=mysql_query($sql,$link)or die(mysql_error()); $row = mysql_fetch_array($result, MYSQL_NUM); echo $row[1]; print_r($row); is displaying no of records but whu echo is not working ...

Xcache var_size error

I am trying to use xcache with zend framework to cache the metadata from Zend_Db_Table_Abstract so that describe queries are only called once per table. When implementing xcache into my bootstrap and running the application, I am being presented with the following error: Warning: xcache_get() [function.xcache-get]: xcache.var_size is e...

CREATE VIEW for MYSQL for last 30 days

I know i am writing query's wrong and when we get a lot of traffic, our database gets hit HARD and the page slows to a grind... I think I need to write queries based on CREATE VIEW from the last 30 days from the CURDATE ?? But not sure where to begin or if this will be MORE efficient query for the database? Anyways, here is a sample qu...

How to populate() an entire Zend_Form minus one form element?

I have a simple content edit form (Zend_Form) that I populate() with an array generated from the Zend_Db_Table_Row_Abstract->toArray() method. It works quite well. The goal is to not populate one of the form elements with a value. I'm currently solving this by removing that specific key => value pair from the populating array. I'm curi...

Having a PHP script loop forever doing computing jobs from a queue system.

Currently I have a perl script that runs forever on my server, checking a SQS for data to compute. This script has been running for about 6 months with no problems what so ever. So, now I want to switch over to PHP'S CLI, and have the script loop there forever. Mostly because I'm more familiar with PHP. Basicly, $i="forever"; while($i...