php

magento payment process.. how it works in general

hi everyone, got a question and I hope this is right place to ask :).. don’t quite understand how payment works in magento. client goes to checkout and lets say wants to pay as a guest, so provides address etc. and finally gets to payment methods. Then I want clients to pay thru credit card. Already have module installed for gateway (b...

Trying out Test-Driven Development

After reading this post I kinda felt in the same position as the guy who asked the question. I love technology and coming up with new ideas to solve real world problems just gets my neurons horny, but the other part of the equation - actually getting things done (fast) - is normally a pain in the ass to accomplish, specially when I'm doi...

How to delete all files under a specified directory with PHP?

I think the title is clear. ...

How can I use a query string in my crontab?

I need to have a query string in my crontab but it isn't working. Can someone please tell me how I can do this? Thanks ...

Which function will you prefer to execute system commands with PHP?

like func("rm -rf /usr/local/) Which 'func' will you use to do that? ...

How to fix failure of PHP code in windows:exec("rm -rf F:/tmpJob/*")

It's executed when browsing a PHP file(http://localhost/filename.php) on windows. The web server is Apache. I think it should be divided into 2 steps: 1.found user of Apache threads 2.give enough permissions to that user towards "F:/tmpJob/" I checked httpd.conf and found: User daemon Group daemon But there is no "daemon" user on...

php project deployment problem

i have done onw project in php. It works on my windows pc. I use xampp on my windows machine.But when i devlopy same on my linux machine it shows me some blank pages. Some pages are completely blank.some are half blank. whats the problem? ...

How to show a comparison of 2 html text blocks

I need to take two text blocks with html tags and render a comparison - merge the two text blocks and then highlight what was added or removed from one version to the next. I have used the PEAR Text_Diff class to successfully render comparisons of plain text, but when I try to throw text with html tags in it, it gets UGLY. Because of t...

Does CakePHP play nice with Oracle? How about other frameworks?

I'm just investigating some frameworks (CakePHP particularly) for a PHP project I'm about to start, and it must run on Oracle. A quick googling found that Cake doesn't come packaged with Oracle support, and that there is a driver someone wrote, but that was back in April 2007, so I don't know how valid the information still is. Has any...

Slider problem for buttons

I am using slider module for sliding the content page. I want change the "next" and "previous" button. When the slider page is loaded, I want to hide the "previous" button. When I click the "next" button, the "previous" button should display, and when I go to the last slide, the "next" button should hide. How can i do this? I am using ...

PHP - Need Help With Logic

Hello all, I'm currently working on a PHP/MySQL script that does the following, in this order: 1) Checks DB for any videos that need converting 2) Once determined that a video needs to be converted, it begins to convert *3) Notifies the "creator" of video that it's been created. *4) Notifies all users who are "receivers" of the video,...

how to cache based on many parameters

I am working on a search application that uses a form with 16 filter options that are either 1 (selected) or 0 (not selected). The result as JSON is retrieved via AJAX using a GET request. The query string then looks like this: filter_1=0&filter_2=1 ...omitted... &filter_16=1&page=20 Each searchresult has at least 2 pages which can b...

phing and phpUnderControl ... working together

Hi, Has anyone got these to work together seemlessly? I have tried, had some success using the plugin at http://phing.info/trac/wiki/Users/Documentation/CruiseControl, but have failed to: Get the metrics graphs working (nothing appears) Enable the "PMD" - project mess detection - reports Are there any other ant-specific commands tha...

Automatic logged out

I have a php page from where my users log-in to the application. It is working fine. Yesterday, all of a sudden the users were able to login but were forced out and redirected to the login page again. My database has logged in the user's login timings and this problem was automatically solved after about 2 hours. Why will like this hap...

mysql query error

This is very simple but I keep getting a error for some reason: MySQL view all error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''LIMIT 0,6'' at line 1 $max = 'LIMIT 0,6'; $data = mysql_query("SELECT * FROM `gallery` '$max'") or die( 'MySQL vie...

Possible to add data to the body of a HTTP request using cURL in PHP?

I would like to add some data to the body of a http request using cURL in PHP. Is this possible? How? I'm sending a HTTP request to a remote server. I have added all the headers I want, but now I need to add some more data to the HTTP body but I cant figure out how to do it. It is supposed to look something like this: Host: stacko...

How to 'insert if not exists' in MySQL?

I started by googling, and found this article which talks about mutex tables. I have a table with ~14 million records. If I want to add more data in the same format, is there a way to ensure the record I want to insert does not already exist without using a pair of queries (ie, one query to check and one to insert is the result set is e...

Automate printing & dealing with large HTML files

I wrote a simple PHP application to create salary cheques for the company employees. The interaction between db & app is nice, the data is cached & the performance is high enough. So, what's the problem? I need to provide the ability to print the whole cheques by just one click for the end-user. printing such a large HTML file is not ...

PHP Call different library at different place of an Application

Hello, In my application at some point, I have to call the Propel library version 1.2 ( which is located at directoryA), and at another point, I need to call the Propel library version 1.3 ( which is located at directoryB). How to do this? Edit: I need this because a component I use uses an older version of a library that I use as wel...

Get size of POST-request in PHP.

Is there any way to get size of POST-request body in PHP? ...