php

PHP ssh2_scp_send sometimes fails

Hi, I'm using ssh2_scp_send to send one file from server1 to server2. It works almost 80% of the times, but sometimes fails and I can't find any log message and i don't know why! the command only return one bool value saying if it was sucessfull. ssh2_scp_send Where can I find some log message or any of you had one similar problem? ...

Batch adding attribute to attribute sets

I have a Magento installation with around 60 attribute sets. I need to add a new attribute to each of the attribute sets. There doesn't seem to anyway of doing this in the admin control panel. I am sure I can work it out by manually entering the correct fields into the database, but is there a way of doing this through the API or thro...

How can I get Wordpress archives by author username?

I need to get archives of one author and exlude all others, Wordpress wp get archives() doesn't have that kind of filter. How can I fitler all other others except one author from archives? http://codex.wordpress.org/Template%5FTags/wp%5Fget%5Farchives <?php wp_get_archives('type=monthly'); ?> ...

PHP read console output

Ok, so here's the thing. I need to read the output (the one that you usually see in a linux console). My biggest problem is that I don't need to read the output of a linear execution, but something rather like wget http://ubuntu.com/jaunty.iso and show its ETA. Also, the work-flow is the following: S - webserver C1 - computer1 in S's ...

PHP: append to value if the key already exist, if not add the key.

Hello, I am looking for a succinct way of doing this in PHP: given an array, if I add one key=>value pair to it, the routine should check whether the key already exist. If it doesn't exist, add to the array with the key=>value pair. If it does, then the value should be append to the value of the array. So, for example, if the initial ...

$_FILES Empty When Uploading

When trying to access the $_FILES array, PHP returns the error "Undefined index: picture". In my php.ini file, File Uploads are turned on, and any user can write in the /tmp directory. In the HTML form, enctype is set to "multipart/form-data". Interestingly enough, the basename for the uploaded file prints so I believe that PHP has actua...

[PHP|HTML] - Problem with file uploads from China

Hi, I have a web app, part of which accepts user uploads of csv files. There is a prospective client in China trialing the site. They report that when they try to upload a file the page 'hangs' ie the 'Please wait etc...' graphic which shows while the file is uploading is staying on their page and the file doesn't get uploaded. I have...

How to close the popup in jquery

I created a Popup in jquery. When mail icon is clicked it will open a popup which contains Enter email - label Email -text box Send - Button close - button When another icon called print icon is clicked it will open another popup with confirmation message "Are you sure u want to print" with Yes, No button. When print icon is clicked...

WINDOWS CMD: Why do i recieve errors when typing php-v at the prompt?

Im on windows xp. I receive errors at the prompt when i run the php-v command. The first error i receive is: The procedure entry point OCILobRead2 could not be located in the dynamic link library OCI.dll and then after that a slew of .dll errors. Fact is that all my .dll's are in D:Program Files\PHP\ext so im quite sure this is a p...

Some ORM using PDO?

Hello everyone! I am looking for a good ORM (i.e. Active Record) which use php extension PDO as base.Any suggestions? ...

Value of variable changes once out of the click function in jQuery.

Hi, this is the continuation of my previous question. Since I just logged in that day without an Open Id, I don't know how to login to that account and edit further. So I created a new Open Id enabled account and posted this as a new question. Now I have the code like this. Inside the onclick event, the value is stored in the $selected...

Executing php from another file

Hi guys, i have 1 template-file, which is included into main file. some.template: ... <?php echo '!'; ?> ... in main file i read file into 1 variable and display it. Of course, php script doesn't run there. How can i do that, what i want? Thanks ...

Upload content to facebook without prompt

I am working on a PHP application that gets its input (image/text) from a mobile device and posts this to various social networks. Now, I'm having some problems figuring out how to post to facebook WITHOUT facebook prompting me for permission. I am the only user so I can add my username and password in the code or I can have facebook pr...

Zend and web hosting - subdirectory appearing as root

I have learned how to create a simple website with the Zend Framework. Now suppose I want to put it on some web hosting server. In my ZF project, I have a folder named public, which I want to appear as the root of the URL. I want my site to be visible and accessible as http://www.mysite.com while being served from a page like /public/i...

use off sms gateway third party api

Hello, I have a question about the use off the http api from the company clickatell. They actually have several api that you can use, amongst are xml and smtp also. Does anyone have any experience with those, especially with the http api. For the http api: Does this php code actually doing the work in the background? This line $re...

PHP in IE6 and other browsers, except Firefox, is slow

Hi, I am new to PHP. I have developed one application using Oracle DB as backend . The PHP contains the templates, CSS and normal queries to retrieve data and display using templates. In almost all browsers, the main page display seems to be very slow. Of course, there are quite none of the records it has to process. What's more it has ...

Problems with special characters in php soap client

Hi! I have a problem related to this question. I have a web service (also using php) that returns some names. When any of them contains Swedish characters (å, ä or ö) and probably others as well i get a soapfault (looks like we got no XML document). I can however see the full (correct afaik) response using $soapcalo->__getLastResponse()....

Parsing google calendar XML feed

Hi I've got XML feed from public google calendar. Looks like this: <?xml version='1.0' encoding='UTF-8'?> <feed xmlns='................' xmlns:gd='http://schemas.google.com/g/2005'&gt; <id>http://www.google.com/calendar/feeds/........./public/full&lt;/id&gt; <updated>2009-08-24T10:57:00.000Z</updated> <category schem...

Multiple Condition Bulk Update in SQL & PHP

If I want to update a column value base on a condition I can just use the below query for a simpel +1 -1 case (translate into proper PHP call or ORM equivalent, of course): UPDATE articles SET STATUS = 0 WHERE STATUS = 1; But now the issue is that I want, based on the original the status, infer a new value of status from a dictionary...

How to Enable curl in PHP

Could any body tell me How to Enable curl in PHP Thanks in Advance Fero ...