php

Gaining application/module context from a symfony task

I have written a reporting suite, and I have a specific report that builds a CSV file. Serving this file via a browser on demand isn't an issue, but I need to be able to build this CSV file nightly, and email round a link to be able to download it. Essentially, I need to be able to replace a specific action with a symfony task, run via ...

Showing a image created with the GC lib

i have my test.php: <?php echo "Image:<br/>"; include('draw.php'); ?> and my draw.php: <?php $img = imagecreate(250,80); ... header("Content-type: image/jpeg"); imagejpeg($img); imagedestroy($img); ?> now, visiting test.php tells me that headers is already sent. How do i show the image in draw.php "realtime" (not by saving t...

Web apps which book for the common stuff? (security, scaliability,etc not basics like PHP/MySql)

I guess that the title says it all. I know PHP and am just beginning with MySql (but plan to use ODBC). I don't need any books explaining that. I am probably qualified to develop a simple web site, but aim at taking on quite ambitious apps. I imagine that almost all web apps have some commonality like security, scalability, etc (I have...

Web-apps : to framework or not to framework?

I know PHP and am just beginning with MySql (but plan to use ODBC). I don't need any books explaining that. I am probably qualified to develop a simple web site, but aim at taking on quite ambitious apps. I imagine that almost all web apps have some commonality like security, scalability, etc (I have absolutely no idea how to distribute...

Fast and flexible PDF generator on *NIX system

We are building a LAMP application that also needs to generate loads of complex PDF reports. I'm looking for a library that runs on our Debian server and allows us to generate these reports. The language isn't of great importance (java, python, php, perl, ...) as long as it's stable, flexible and supports Unicode. LTR and RTL writing s...

how to make a csv file from database in php?

i have a database table where i have store different information and i want to make a csv file from it how can i do this? ...

opening pdf file using php

hi, i wana open pdf file using php ,it works well but it prompt me for downloading that file in specified folder.. what i want to do is just by clicking a link pdf file get open without prompting for download.. anyone have idea about it?? thanx in advance.. below z the code php code: $mypdf = PDF_new(); PDF_open_file($mypdf, ""); PDF_b...

Retrieving PDF stored in blob field please

please can any one help with a PHP/Mysql script that can enable the download of PDF stored in a blob when a link 'DOWNLOAD NOW' is clicked. i have tried but no result. kindly help Thanks ...

Face Recognition with PHP?

Howdy, iam playing around with OPEN CV from Intel with the associated PHP Extensions. Works like a charm. But does someone knows as way to do Face Recognition instead of only Face Detection with PHP? Iam not sure if someone has tryed it so far, or if it is impossible? ...

How to set a PHP variable using AJAX ?

Hi I'm currently working on a project involving a form generator. The user can switch on different databases and add some information from these databases in the form he is building. I'm working using AJAX, at anytime the user can choose the database using a select, and on change, it refreshes the list of the database's tables. Wh...

php database connection?

I want to connect php to Access without using ODBC connection like MySQL. Please give me solution. and also tell how to connect with SQL Oracle and other databases. ...

Memory leak in PHP with Symfony + Doctrine

I'm using PHP with the Symfony framework (with Doctrine as my ORM) to build a spider that crawls some sites. My problem is that the following code generates a memory leak: $q = $this -> createQuery('Product p'); if($store) { $q -> andWhere('p.store_id = ?', $store -> getId()) -> limit(1); } $q -> andWhere('p.name ...

PHP Error: mysql_fetch_array() expects parameter 1 to be resource, boolean given

Hi I am trying to select data from table but get this error message: mysql_fetch_array() expects parameter 1 to be resource, boolean given.. This is my code: $username = $_POST['username']; $password = $_POST['password']; $result = mysql_query('SELECT * FROM Users WHERE UserName LIKE $username'); while($row = mysql_fetch_array($re...

mysql error: could not start the service mysql on local computer error 193: oxc1

I was going thru the charset change to utf8 on my local MySQL(5.1) databases, had done some changes only via phpmyadmin to the dbs and straight to my.ini - file. When I booted my pc (win xp pro sp 3), MySQL server is not starting up at all and I can't figure out why. I changed the ini-file back as it was, but no. If I'd re-install the wh...

Question regarding mysql_insert_id() application in my code..

I have a page in which there is an if...else loop for processing of input data, this page is reverted two times when submitted, that is when a button called "Continue" is clicked and and second time "Add to cart".... Now in this case when Button "Continue" is clicked then the if loop is executed in which data is inserted in the Database,...

show result into html table from database

hi all...i have textfield inside html table..i want after i type something like "name" in another cell can show all information or description about people who have that name...that information are take from "member_table"... <tr> <td> <td> <td><input type="text"........></td> </td> </td> </tr> <tr> <td> //i...

Regexp: how to match everythings that is not into a pattern?

I want to match everything in a string that does not match a given pattern; for example [a-z]. Given the string abc4jkf8 4à3in, I need to match 48 4à3. I've tried with ([a-z])+(?![a-z]) but this matches exactly the opposite of what I need. With the string above, this regexp matches abcjkfin. Any ideas? ...

Jquery ajax call and charset windows-1252

Dear stackoveflow, I have this problem. I'm working with an old version of mssql (2000) that has all the tables encoded in windows 1252 (and that's it). I can write and read succesfully with php using this line: <?php header('Content-Type: text/html; charset=windows-1252'); ?> If I make a normal post everything works as expected, If I...

change error_message in Zend_Validate_EmailAddress

I need change all standart error message on my message in Zend_Element_Text when i use validator('EmailAddress') this validator trows several differnt message. Value is required and can't be empty '' is no valid email address in the basic format local-part@hostname When i set options setErrorMessage('some my error text') it string sh...

Regular SQL/php error

I have been creating a new website and am new to all this. Every so often, I get the following error and after a while, it goes away and the website comes back? Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11) in /home/gamepla3/public_html/include/d...