php

Values not showing up during debugging in eclipse PDT

I am trying to debug this simplepie.inc (called from index.php )which is dumping me with error during parsing one of the feed. After stepping through the line $utf8_data = 'UTF-8'; which I hardcoded in to test things out, the value of the variable remains <Uninitialized> as shown in the screenshot below. Why is that so? Variables and...

Wordpress Widgets ampersand Problem

I have a problem with Wordpress. I want to create a text widget with title as Support & FAQ But since I want to validate XHTML, I am writing it as Support &amp; FAQ The problem is when I save the widget in iBlogpro Theme, amp is changed to simple & by Wordpress. ...

how two website share same category and subcategory in magento

i have created a addom domain(website) on a primary domai now i want to my addon domai share all the category and subcategory in magento 1.4 please any body tell me or provide some link which help me to solve this problem..how both domain share same products category..thanks.. ...

PHP: I get a completely blank page, I don't know how to debug this in PHP

hi, I'm having some issues to debug this in php. When I include this line: require_once("http://" . $_SERVER["HTTP_HOST"] . "/dompdf/dompdf_config.inc.php"); what I get is just a blank page, I don't get any html code as response. Maybe the error messages are hidden ? ...

SMTP Server for MAC - Any suggestions?

I'm doing PHP development on my MacBook and have reached the email functionality of the book I'm using. Are there any good SMTP servers for Mac? Cheers, Billy ...

How does Smarty work when I define my Cache Function Handler?

I am trying to use my Smarty Cache Handler Function. At the beginning, I use the same example function that is posted in the Smarty manual. function mysql_cache_handler($action, &$smarty_obj, &$cache_content, $tpl_file=null, $cache_id=null, $compile_id=null, $exp_time=null); The problem is that, when I try to do $sma...

Set Defaults in a Webpage--> Conceptual Problem

I have both php and javascript in my code. There are links which change javascript variables which are then passed to php via $get. To change the values I'm pretty sure I would have to refresh the page. Where could I put default values such that they load the first time the page does but not on every successive refresh as they would over...

php beginner safe input

Hi, i need some help here. I have this query: $order = isset($_GET['order']) ? mysql_real_escape_string($_GET['order']) : 'title'; $query = mysql_query("SELECT * FROM entry ORDER BY $order ASC"); You can either order by title, date or author. But if someone gives $order something else it goes: Warning: mysql_fetch_assoc() expects p...

Dompdf library: can I store files to hard disk ?

Hi, i'm using dompdf library to render some html content into pdf files. I actually don't need to send the file back to the client but just to store it in the hard disk or even better to send an email with it as attachment. I've searched in the documentation but I could only find the stream method: http://www.digitaljunkies.ca/dompdf/...

Should PHP_EOL be used in emails?

I see a lot of PHP email implementations using "\r\n", but I have also seen some of them using the PHP_EOL constant. Which one is better? Thanks for any helpMetropolis ...

dompdf: loading html files to render, doesn't work

hi, dompdf is not able to generate a pdf from a page of my website. However, I've saved the page and uploaded it as simple static html file, and it worked! So, I dunno if the issue is with the url, or something else.. this is the error I get: Warning: require_once(/home/o110334/public_html/dompdf/include/firephp.cls.php) [function.req...

Is there a html-only templates system for php?

I have started coding in clojure, and I'm really impressed by Enlive. One thing that I really like about it is that Enlive uses html-only templates. So a template is a file with html in it, ending in .html, simple as that. It gets parsed into a dom tree and then that dom tree is manipulated by clojure/enlive, combined, made dynamic, e...

PHP stream security

Why is not secure allow to access to resources with URIs like "http://example.com/badcode.txt"? What means non-file-based? i'm reading this PHP security check list: http://www.sk89q.com/2009/08/definitive-php-security-checklist/ thx ^_^ ...

Read a file without storing on the server?

Hi, I have created a program that decrypts whats stored in a export file from a certain program, at the moment people need to open the file and copy and paste into a text feild, i know that i can use the form type "file" but to read the contents of what has been POSTED it needs to be saved to the server if i am correct? Is there no wa...

Sending email attachment through HTML form using PHP

I created "uploads" folder on the server, and a file uploaded by a user on the HTML form, gets into that folder fine. Next, I try to retrieve it from that folder and attach it to an email, but this part doesn't work. Here is my PHP: <?php $name = $_POST['name']; $email = $_POST['email']; $form_subject = $_POST['form_subject']; $mess...

Export mysql database to Microsoft Access (.mdb)

I'm looking for some tips on how to export a mysql database into a .mdb file that is readable by Microsoft Access 2007+ (and editable too!). It needs to be a script that can run on a Linux server (maybe using PHP?). I can't seem to find out anything anywhere. Any ideas? Cheers! ...

Adding form elements to a form powered by Zend_Form

I have a huge and complex form, and I have build it using Zend_Form. There are multiple places in the form where the user can add elements on click. Currently, if the user submits the form, and the validation fails - the elements added by the user are not retained - as they were not a part of the form. Is there a natural way to add them ...

How to handle 404's with Regex-based routing?

Please consider the following very rudimentary "controllers" (functions in this case, for simplicity): function Index() { var_dump(__FUNCTION__); // show the "Index" page } function Send($n) { var_dump(__FUNCTION__, func_get_args()); // placeholder controller } function Receive($n) { var_dump(__FUNCTION__, func_get_args())...

Selective Forbidden error

Hi, I am experiencing a weird problem. I have a contact form written in php, in several computers the page works without any problems, but in two specific computers, as i send the form i get a 403 error. even weirder is, if the form isn't filled correctly, it doesn't give me the 403. I gave every folder and file that might be related...

JS/CSS caching problem

Hello, To reduce http requests, as well as make the rollout process easier for js/css files, I've setup my php app to do concatenation of js and css files. All included files are sequentially combined into one large file using 2 letter codes for each file (ex. home.js code = "AA"). To generate the names I combine all the codes in the or...