php5

Executing cmd commands in Windows from PHP Issue

Is it possible to execute cmd commands in Windows OS with PHP exec() function? I tried this: <?php try { echo exec( 'O:\test\pdftk.exe O:\test\outputs\OPP\out.pdf O:\test\outputs\OPP\out2.pdf cat output O:\test\123.pdf' ); } catch (Exception $e) { echo $e->getMessage(); } Basically, I'm trying to merge two pdf file...

live chat in php

how can i implement live chat in my web site using php? ...

Make sure Apache user is allowed to use shell

Hello, how can I make sure that Apache/web server user is allowed to execute shell commands? I would like to execute a shell command in PHP script but it doesn't work for some reason (it works when written manually in shell by hand, of course, so the command is surely correct). I believe the problem is that the user PHP is running under...

How can i convert this simple query to cakephp ?

Hi , actually i have 1 query but i am unable to convert it into cakephp query format. $result = "select * from esl_userresults,esl_lyrics where esl_userresults.esl_songID = esl_lyrics.id and esl_lyrics.song_name like '%".$esl_keyword."%'" ; when i convert this query into cakephp it gives error like esl_userresults.esl_songID unknown co...

What is a hook function?

Id like to know what excatly is a hook function. Explanation and example in php, c++, or java is fine. ...

PHP Database Dump Script - are there any issues?

Hey everyone, I found a PHP function to dump a mySQL database that someone else had written, and then cleaned it up and formatted it a bit. I wanted to know if I could get a critique of it. I have ran it, tested it on a Wordpress blog and the DB completely restores, but wanted to get some other eyes on the code. Specifically I am looki...

Is it possible to get the url of the customer who uses our Web Service SOAP

I'm new to SOAP, I work with PHP5 and I got my wsdl file with some functions in my .php file. I'm wondering if I can get the url from the customer who uses my Web Service. I want to validate the url in a php function server-side. ...

mvc approach for cms application

Hello I have been tasked with creating a fairly complex web application in php, it is to be a custom CMS that would be able to replicate the functionality and features provided by well known content management systems like WordPress, Joomla or Drupal. I am to try and integrate as much of the functionality that these well known and powerf...

Suggested design for submitting a table of data in PHP

Hi I'm looking for suggestions on how best to handle the submission of a database table. So far, I've generated the repeating rows data like so: <table border=1> <tr> <th>Phone Number</th> <th>Prefix CallerID with</th> <th>Seconds to ring before<br/>reaching voicemail</th> <th>Voice mailbox<br/>extension number</th> <th>Not...

How to turn off kohana's string sanitisation temporarily

I'm building a dynamic form in Kohana and notice that it is doing the following: echo "'"; results in &#039; in the output instead of a literal ' character. I suspect its xss_clean getting in the way which is normally a good thing, but if I want to avoid it I have to code differently when I need a literal ' output to the page. ...

PHP: "Call to undefined method" error when calling static method from parent

How is the correct way to call a child class method from a parent class if both are static? When I use static classes it returns the error "Call to undefined method A::multi()", however when I use non-static methods there is no problem, for example: //-------------- STATIC ------------------ class A { public static function calc($a...

Wordpress integration

Hi, The wordpress is such a great tool. I'm wondering if it will be a problem to start adding sections at some point, nothing to do with the blog, just sections for the site with different functionality ( say a database of searching stuff ) perhaps also incorporate and let user reistered through the word press database with the other fea...

Simultaneous connections on Apache

Hi, So, it seems that when a client makes more than 1 connection to the web server ( Windows + Apache 2.0.x + PHP 5.1.6 ) it dies. e.g. I put 1 phpthumb call - e.g. <img src="/library/classes/3rdparty/phpthumb/phpThumb.php?src=/media/images/gallery/cart1.jpg&w=100&h=100" /> That works. But if I put like 3 on the page, it just loa...

ffmpeg cannot install PHP extension module

Hi there, In the last step of installing FFmpeg-PHP, I had to type sudo make install. At this I get the following error, sudo make install Installing shared extensions: /usr/lib/php5/20060613/ cp: cannot stat `modules/*': No such file or directory make: *** [install-modules] Error 1 Now my extension directory is at /usr/local/...

[PHP] Using a Loop Inside a Function

Hello, I'm still learning functions and how they work. I know what I'm doing wrong just not how to fix it. I am writing a function to pull image data out of a database and return it onto the screen. It works but if there is more than one image it will return the last image only. I know the problem is that $project_image is only returni...

how to show value of one page to another page in php?

I have two pages like reg.php and profile.php. in reg.php have a field gender want to show on profile.php. i get gender field from reg.php on profile.php. ...

How can I call another site?

Hi How can I open another site from PHP in the Background? I try to use the bit.ly API. Thank you ...

USB device on website

Is it possible to use a USB device peripheral that I have created directly on a website. I am not sure how to start, but for example, on websites like connect.garmin.com they allow you to connect your Sat Nav and then transfer the data to the website after you have downloaded a application and restarted your browser. What do I need t...

PHP Object has values but when I try to use it in FOREACH() I am getting NULL value

I am writing a php app that interfaces with a companies SOAP API. I am making a call against one of the APIs functions and receiving an object back. However when I try to use a foreach on one of the objects variables I am receiving the error: Warning: Invalid argument supplied for foreach() in ... My code: // Make Call and get res...

utf8_encode or decode isn't doing what I expect...

Hi all, I am taking an XML file and reading it into various strings, before writing to a database, however I am having difficulty with German characters. The XML file starts off <?xml version="1.0" encoding="UTF-8"?> Then an example of where I am having problems is this part <name><![CDATA[PONS Großwörterbuch Deutsch als Fremdsprac...