php

using htmlpurifier for input or output escaping/filtering

I am processing a user input from the public with a javascript WYSIWYG editor and I'm planning on using htmlpurifier to cleanse the text. I thought it would be enough to use htmlpurifier on the input, stored the cleaned input in the database,and then output it without further escaping/filtering. But I've heard other opinions that you s...

failed to load external entity error on SOAP

i am call a web service which is locate on https protocol. and i get "failed to load external entity" error while calling it. as i search on google it is because in PHP5, SOAP class will not parse WSDL file located on a secure HTTPS connection. what is the solution? i don't want to use http instead of https. ...

PHP DOM vs SimpleXML for Atom GData feed parsing

I'm building a library to access the Google Analytics Data Export API. All the data the library accesses is in Atom format and utilises numerous different namespaces throughout. My experiments with the API have used SimpleXML for parsing so far, especially as all I have been doing is accessing the data held within the feed. Now I'm comi...

preg_match , regexp , php , ignore white spaces and new lines

I'm trying to extract richard123 using php preg_replace but there are a lot of white spaces and new lines and I think because of that my regexp doesn't work . The html can be seen here : http://pastebin.com/embed_iframe.php?i=vuD3z9ij My current preg_match is : $find = "/< tr bgcolor=\"F0F0F0\" valign=\"middle\">< td align=\"left\">< ...

paypal ipn passing parameter

I wanted to get the userid from paypal after the user have made his payment. Pay.php <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="<?php echo $merchant_email ?>"> <input type="hidden" name="item_name" value="IPN test"> <in...

Echo items with value of three

I need to echo all items in my column that have the value of three. If a field has the value of three I then need to echo the 'name' and 'description' on that row. This is what I have so far $result = mysql_query($query1) or die(mysql_error()); while ($row = mysql_fetch_array($result)) { echo $row['status']; } I need to w...

Automated ETL / Database Migration Solution

I'm looking for an ETL solution that we can create a configure by hand and then deploy to run autonomously. This is basic transformation, it need not be feature heavy. Key points would be free or open source'ed software that could be tailored more to suit specific needs. In fact, this could be reduced to a simple DB migration tool that ...

Strange problem on some client's browsers

We are fighting a strange problem on the company that I work. We created a site of a promotion to a client where its consumers can register products barcodes to win prizes. The site was created using PHP and MySQL. The site uses SSL on every form. However, some consumers report to the client's call-center they was no able make a regist...

codeigniter broken link

I'm new in codeigniter. i have a project running perfectly in my localhost. when i deployed, my links seem to be broken. e.g. mysite.com displays the homepage without any error. now, i have a link let's say an about us link e.g. mysite.com/main/about where main is my controller and about is my function. the problem is the about us link i...

Seeking assistance with Escaping Data for MySQL queries

Please don't send me a link to php.net referencing mysql_real_escape_string as the only response. I have read through the page and while I understand the general concepts, I am having some trouble based on how my INSERT statement is currently built. Today, I am using the following: $sql = "INSERT INTO tablename VALUES ('', ...

On MYSQL Join, I'm getting un unknown column error.

Here is my query: select s.*, u.display_name from wp_wdify_sites s, wp_users u LEFT JOIN wp_wdify_sitesmeta m ON (s.sid = m.site_id) where milestones like '%dateSubmitted%' and milestones not like '%dateArchived%' and u.ID = s.cid and did IN (0) and m.meta_key = 'aboutSite'` The er...

sort array with special characters in php

I have an array I'm trying to asort using php. The problem is that the array has accented characters in it and needs to be sorted using "french" rules. cote < côte < coté < côté I've tried many things, like using php collators, but I get the following error : PHP Fatal error: Class 'Collator' not found I've also tried to set loca...

How to debug PHP?

Anyone's been trying himself at object oriented programming ? Most probably every developer I guess:D I for one have never studied OO design patterns thoroughly, and trying to put it all together now does prove at times thrilling, and many times frustrating also. Even more so when trying to do it in : PHP! All-in-all, my boss asked me t...

IE6 Not submitting POST Data?!

Hello all, I have just tested my site on an old IE6 browser on a windows server. The problem I have is when I submit a form, the POST data I get on the other page is empty. Array(). This site has worked on IE6 on a different windows server, it has worked on my laptop and works on all other major browsers (Firefox, Chrome, IE6,7,8, Saf...

Disable button until tabs have been read...

I have some tabs which have been created using Javascript and Mootools, my client wants the 'next button' at the bottom of the page to be disabled, until the tabs have been read(clicked). The page is dynamic (created with PHP and MySQL) and there could be two tabs or three, depending on the set-up. I am struggling today to think of the b...

How to run CakePHP app from subdirectory

Using CakePHP 1.3, I have the following layout: /srv/www/_cakephp13/ /app/ /cake/ /plugins/ /vendors/ etc... /srv/www/htdocs/ /cake_app/ /other-dir/ ... where htdocs is the public directory, and I have moved webroot of my app to be cake_app above... Which appears to be almost working. (After customizing...

How do I set a PHP session variable from a hyperlink?

My first stab at this so please don't laugh! I've created a session variable to allow users to switch between UK and US content on the same site (UK default). <?php session_start(); $_SESSION['territory'] = 'UK'; if (isset($_SESSION['territory'])){ echo 'Session is set to '.$_SESSION['territory']; } else{ echo 'Session not set y...

Reading value of cookie using curl in php

Possible Duplicates: how to get the cookies from a php curl into a variable Any way to keep curls cookies in memory and not on disk Hello, Im using Firefox 3.5.9. When i visit a url , it sets a cookie on my computer.I can see this cookie in Firefox by going to Tools->Options->Privacy,then clicking on 'Remove Individual Cook...

Is the Zend_Db_Table_Abstract->insert() function safe?

I am using the insert() function from Zend_Db_Table_Abstract. The data being inserted is user input, so naturally I am curious if ZF does the data cleansing for me, or if I should do it myself before I call the insert() function. ...

Configuration file for PHP server script

Right now I have a very high volume of requests coming to my webserver which execute a PHP CGI script. Every one of these scripts opens up a config file that I have created to load options of how the script should run. Doing a file I/O operation everytime a request comes in seems very resource intensive to me. I'm not too familiar with...