Re: [PHP] PHP want not write in Database

2011-05-16 Thread Ashley Sheridan
On Mon, 2011-05-16 at 02:55 +0200, Silvio Siefke wrote: Hello, i have a Blog Script for my private Website. Normal i write new Articles direct with phpmyadmin, but this is not comfortable. I has no errors in Log for the script and the mysql query log write the correct insert SQL code, but

Re: [PHP] PHP want not write in Database

2011-05-16 Thread Silvio Siefke
Hello, On Mon, 16 May 2011 07:13:19 +0100 Ashley Sheridan wrote: What is your code in the included db.html? You do realise that unless you've told the server especially that it won't know to parse your HTML files for PHP code as well. HTML is embedded in PHP, not the other way around. If you

Re: [PHP] PHP want not write in Database

2011-05-16 Thread Silvio Siefke
Hello, On Mon, 16 May 2011 09:57:23 +0800 xianhua zhou wrote: VALUES(:autor, :title, :teaser, :teaser, :content, :category, :bild) There are 2 :teaser, try remove one. Yes thats it. Now it work well done! Thank you, im sorry sure was to long at the pc yesterday. Silvio -- PHP General

Re: [PHP] PHP want not write in Database

2011-05-16 Thread Stuart Dallas
On Mon, May 16, 2011 at 10:30 AM, Silvio Siefke li...@silvio-siefke.dewrote: Hello, On Mon, 16 May 2011 09:57:23 +0800 xianhua zhou wrote: VALUES(:autor, :title, :teaser, :teaser, :content, :category, :bild) There are 2 :teaser, try remove one. Yes thats it. Now it work well done!

Re: [PHP] PHP want not write in Database

2011-05-16 Thread Silvio Siefke
Hello, On Mon, 16 May 2011 11:06:17 +0100 Stuart Dallas wrote: In order to avoid this problem in future I encourage you to check the return value of every function call you make that might fail, i.e. every single one! Had you done that here, and then pulled out the last error message from PDO

Re: [PHP] PHP want not write in Database

2011-05-16 Thread Stuart Dallas
On Mon, May 16, 2011 at 11:40 AM, Silvio Siefke li...@silvio-siefke.dewrote: Hello, On Mon, 16 May 2011 11:06:17 +0100 Stuart Dallas wrote: In order to avoid this problem in future I encourage you to check the return value of every function call you make that might fail, i.e. every single

Re: [PHP] PHP want not write in Database

2011-05-16 Thread Silvio Siefke
Hello, On Mon, 16 May 2011 12:07:37 +0100 Stuart Dallas wrote: Not all functions raise PHP errors when they fail, in fact most don't. Most will return an error value, and a few throw exceptions. As the manual states, the execute method you're using will return true if it succeeded or false

[PHP] mysql insert internal server error 500

2011-05-16 Thread Grega Leskovšek
$ime=$_COOKIE['user']; $dolgF=filesize($filename) INSERT INTO `friendlyCMS`.`log` (`imepriimek`, `clock`, `action`, `onfile`, `filesize`) VALUES ( $ime, CURRENT_TIMESTAMP, 'saved',$filename, $dolgF); What is wrong with this? PS First column of the log table is idlog primary key autoincrement not

Re: [PHP] mysql insert internal server error 500

2011-05-16 Thread Bálint Horváth
I think it's not the best place to send it but: $dolgF is not closed with ; ...and the insert is not in a variable! (And also I think it's not a good way using COOKIE in PHP because we have sessions) So the answer is: the all.. :D -or what's the full part you use for insert int this source!?

[PHP] Wierd cookie behaviour

2011-05-16 Thread Geoff Lane
Hi All, I'm scratching my head a bit here. I have a form handling script that branches dependent on whether a user has admin privileges over the application. Here's the function that tests this: function isAdmin($user){ global $chan; $query = SELECT isadmin FROM csw_user WHERE username =

Re: [PHP] Functions/methods aliases in PHp 5.2

2011-05-16 Thread David Harkness
On Sun, May 15, 2011 at 3:15 PM, Richard Quadling rquadl...@gmail.comwrote: Personally, I would recommend using 1 naming convention and sticking with it. I wholeheartedly agree. Multiple method names is not flexibility--it's confusion and an open invitation for bugs. Plus, even with two

Re: [PHP] Error recovery - fatal errors

2011-05-16 Thread David Harkness
You can register a shutdown function that gets called even in the case of a fatal error. We use something like this: public function init() { register_shutdown_function(array('Bootstrap', 'fatalErrorCatcher')); ... } public function fatalErrorCatcher() {

Re: Re: [PHP] Error recovery - fatal errors

2011-05-16 Thread Tim Streater
On 14 May 2011 at 15:05, Peter Lind peter.e.l...@gmail.com wrote: On 14 May 2011 12:33, Tim Streater t...@clothears.org.uk wrote: I would like, in my app, to recover from as many run-time errors as possible, so that I can tidy up. And unsolicited output generated by the standard error system

Re: Re: [PHP] Error recovery - fatal errors

2011-05-16 Thread Peter Lind
On 16 May 2011 22:14, Tim Streater t...@clothears.org.uk wrote: On 14 May 2011 at 15:05, Peter Lind peter.e.l...@gmail.com wrote: On 14 May 2011 12:33, Tim Streater t...@clothears.org.uk wrote: I would like, in my app, to recover from as many run-time errors as possible, so that I can tidy

Re: [PHP] Error recovery - fatal errors

2011-05-16 Thread Tim Streater
On 16 May 2011 at 21:34, Peter Lind peter.e.l...@gmail.com wrote: You were trying to call a method on a non-object - how do you expect PHP to handle that if not with a fatal error? Anyway, good to hear you solved the issue - I misunderstood what you wanted to do (shut down in a proper

[PHP] Consistent Class Renaming (Simple Refactoring)

2011-05-16 Thread Tony Mak
Hi there, i have following problem: Assume we have a cron.php which is called every hour by a cron job. This cron.php should then be used to execute other php-scripts script1.php, script2.php. For a pitty our server has Safe-Mode activated so we arent able to shell_exec / exec those files.

[PHP] Consistent Class Renaming (Simple Refactoring)

2011-05-16 Thread Tony Mak
Hi there, i have following problem: Assume we have a cron.php which is called every hour by a cron job. This cron.php should then be used to execute other php-scripts script1.php, script2.php. For a pitty our server has Safe-Mode activated so we arent able to shell_exec / exec those files.

Re: [PHP] Consistent Class Renaming (Simple Refactoring)

2011-05-16 Thread Richard Quadling
On 16 May 2011 23:12, Tony Mak duranis2...@hotmail.com wrote: Hi there, i have following problem: Assume we have a cron.php which is called every hour by a cron job. This cron.php should then be used to execute other php-scripts script1.php, script2.php. For a pitty our server has

Re: [PHP] Consistent Class Renaming (Simple Refactoring)

2011-05-16 Thread Paul M Foster
On Mon, May 16, 2011 at 11:05:07PM +0200, Tony Mak wrote: Hi there, i have following problem: Assume we have a cron.php which is called every hour by a cron job. This cron.php should then be used to execute other php-scripts script1.php, script2.php. For a pitty our server has