Re: [PHP] error reporting php-5.0.4-10.4 on FC4

2005-10-24 Thread Jochem Maas
Bob Hartung wrote: Jasper If if make a file containing only ?php phpinfo() ; ? I get what I expected. take a good look at where php is reading its ini file from - it may not be where you expect If I make a file containing ?php phpinfo() ; // Now a simple class and a call to

[PHP] Problem reading SimpleXML array

2005-10-24 Thread George Pitcher
Hi, I'm having a problem reading an xml feed. This is my object: SimpleXMLElement Object ( [Header] = SimpleXMLElement Object ( [ID] = FX12GB [Test] = false [Name] = Foreign Exchange United Kingdom Pound Noon Rates

Re: [PHP] Function that convert national characters into ASCII

2005-10-24 Thread Robin Vickery
On 10/19/05, Wiktor [EMAIL PROTECTED] wrote: Hi, Is there a function that will convert any european special characters into standard ASCII letters eg. polish ogonki into a,e,o or german umlauts into ue,oe...? The recode functions are probably your best bet:

RE: [PHP] Abstract Classes?

2005-10-24 Thread Alan Lord
Ah ha !!! Thanks Colin, I think I'm getting it now. That makes obvious sense to think of the abstract class as truly abstract in what it represents... Only thing is, this where I find most of my thinking about OOP falls down! I seem to be able to think of hundreds of classes which would be

Re: [PHP] Re: php, expect and screen

2005-10-24 Thread Olivier Cant
Actually I have to run it interactively, I can get this to work with perl and the expect module (which creates a terminal and provides two handle to read from it and to write to it) I am just wondering if there is some similar moddule in PHP? Le 18-oct.-05 à 19:19, Ben a écrit : Olivier

[PHP] Php, Rails and ajax

2005-10-24 Thread Jacob Friis Saxberg
Hello again. Is it possible to use Php, Rails and ajax via some open source system? How do you do it? The most important for me is to use Php and ajax. Thanks, Jacob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Output files encoding

2005-10-24 Thread Yannick Warnier
Hi guys, For a reason that I don't really understand, my PHP install outputs file in UTF-8 by default. I would like to output files in ISO-8859-1 in certain cases. How do I do that? I have tried changing default_charset to iso-8859-1 with an ini_set() call, but it doesn't help. I also looked at

Re: [PHP] Abstract Classes?

2005-10-24 Thread Oliver Grätz
GamblerZG schrieb: But what benefit is there is having it as an explicitly abstract class? Why can't it just be a normal class definition which you inherit from? The idea is that a high-level language should prohobit you from doing things that do not make sence. Why they implemented it in

Re: [PHP] Output files encoding

2005-10-24 Thread Yannick Warnier
Le lundi 24 octobre 2005 à 14:37 +0100, Yannick Warnier a écrit : Hi guys, For a reason that I don't really understand, my PHP install outputs file in UTF-8 by default. I would like to output files in ISO-8859-1 in certain cases. How do I do that? I have tried changing default_charset

[PHP] cleanly written shop-system (php5, object-oriented)?

2005-10-24 Thread Phillip Oertel
hi, i want to create a shop server application. the shop client interface will be in flash (communication with php over xml, soap or amfphp), the administration interface will be html. most likely it will probably be a long-running application that will be extended in several steps, so we need a

[PHP] Re: Php, Rails and ajax

2005-10-24 Thread Phillip Oertel
hi, rails is written in the ruby programming language. which has nothing to do with php. ruby and php are different programming languages, that are used on the server-side of the web. normally you decide on one of them! ajax in contrast is a way of updating the web browser content without

[PHP] Re: Php, Rails and ajax

2005-10-24 Thread Phillip Oertel
hi, rails is written in the ruby programming language. which has nothing to do with php. ruby and php are different programming languages that are used on the server-side of the web. normally you decide on one of them! ajax in contrast is a way of updating the web browser content without

[PHP] Re: cleanly written shop-system (php5, object-oriented)?

2005-10-24 Thread James Benson
PHP5 has yet to see the maturity and stability PHP4 offers which is why most applications use it. Worst thing you can do is design a website in entirely flash :) Phillip Oertel wrote: hi, i want to create a shop server application. the shop client interface will be in flash

Re: [PHP] Re: cleanly written shop-system (php5, object-oriented)?

2005-10-24 Thread Jochem Maas
James Benson wrote: PHP5 has yet to see the maturity and stability PHP4 offers which is why most applications use it. Worst thing you can do is design a website in entirely flash :) no the worst thing you can do is spread FUD. which you have just done, unless you are capable of backing up

Re: [PHP] Output files encoding

2005-10-24 Thread Richard Lynch
On Mon, October 24, 2005 9:16 am, Yannick Warnier wrote: Le lundi 24 octobre 2005 à 14:37 +0100, Yannick Warnier a écrit : Hi guys, For a reason that I don't really understand, my PHP install outputs file in UTF-8 by default. I would like to output files in ISO-8859-1 in certain cases. How

Re: [PHP] Problem reading SimpleXML array

2005-10-24 Thread Richard Lynch
On Mon, October 24, 2005 3:50 am, George Pitcher wrote: Hi, I'm having a problem reading an xml feed. This is my object: SimpleXMLElement Object ( [Header] = SimpleXMLElement Object ( [ID] = FX12GB [Test] = false [Name] = Foreign Exchange

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-24 Thread Jay Blanchard
[snip] Also, lots of other good info on this topic at: http://www.php.net/manual/en/install.windows.php [/snip] ACCCK I have tried several things, now I am at my wits end. I finally rebooted the server (as suggested by someone one the PHP Windows list) and now

[PHP] Re: cleanly written shop-system (php5, object-oriented)?

2005-10-24 Thread Phillip Oertel
hello james, 1) i have been working with php5 for almost a year now, and the biggest project i have yet worked on (a complex intranet banking application) is running perfectly on it; no problems. on the contrary, since the zend engine has been rewritten to properly handle objects (as references

[PHP] Re: Email Validation built-in? RFC

2005-10-24 Thread Ben Litton
You could certainly write an extension to do so. That's what I did (mostly I was writing one for another purpose and added a function I stole from O'Reilly. You can find the C code I used here: http://www.oreillynet.com/pub/a/network/excerpt/spcookbook_chap03/index3.html. It's pretty

Re: [PHP] php Slow with Mac OS X 10.4

2005-10-24 Thread Nicolas Ross
Just a little follow-up to my own post. From the latest expriments I've done with a fresh install of OS X 10.4 (with the latest 10.4.3 beta update), it seems to point to an IO problem. My test site uses mambo as a CMS, and I've inclued collecting of microseconds timestamps at key points of

Re: [PHP] Re: Email Validation built-in? RFC

2005-10-24 Thread Manuel Lemos
Hello, on 10/23/2005 07:21 PM Robin Vickery said the following: Checking MX records is not reliable at all. I agree that it is less useful today, but it still help catches many domain name typos. ... would it not make sense for there to be a BUILT-IN PHP function of a TRUE email syntactic

[PHP] moving website from windows to linux hosting

2005-10-24 Thread pedro mpa
Hi! I have to move my website from Windows hosting to a linux hosting machine. Does anyone have special tips, procedures I should consider? (Like changing directory paths from \ to / ). It's a classifieds posting website and it's in final testing stage. Pedro. Apologies for my bad English. --

[PHP] Why this doesn't work ?

2005-10-24 Thread Mário Gamito
Hi, Why this doesn't work ? --- $query = SELECT COUNT (login) FROM WHERE login = '$login'; $result = mysql_query($query); mysql_fetch_row($result); --- It gives me Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /var/www/html/registar_action.php on line

Re: [PHP] Why this doesn't work ?

2005-10-24 Thread Colin Shreffler
It looks to me like you forgot to specify the table in your query: SELECT COUNT (login) FROM TABLENAME GOES HERE WHERE login = '$login' Hi, Why this doesn't work ? --- $query = SELECT COUNT (login) FROM WHERE login = '$login'; $result = mysql_query($query); mysql_fetch_row($result); ---

Re: [PHP] Why this doesn't work ?

2005-10-24 Thread Mário Gamito
Hi, Sorry, i do have the table name. It just passed me while transcripting. The code is: --- $query = SELECT COUNT (login) FROM formacao WHERE login = '$login'; $result = mysql_query($query); mysql_fetch_row($result); --- It works perfectly on MySQL prompt. Regards, Mário Gamito Colin

RE: [PHP] Why this doesn't work ?

2005-10-24 Thread Jay Blanchard
[snip] --- $query = SELECT COUNT (login) FROM formacao WHERE login = '$login'; $result = mysql_query($query); mysql_fetch_row($result); --- [/snip] mysql_query() requires a connections resource $result = mysql_query($query, $myConnection); -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Why this doesn't work ?

2005-10-24 Thread Jim Moseby
[snip] --- $query = SELECT COUNT (login) FROM formacao WHERE login = '$login'; $result = mysql_query($query); mysql_fetch_row($result); --- [/snip] mysql_query() requires a connections resource $result = mysql_query($query, $myConnection); The connection resource is optional. It

[PHP] Why this doesn't work ?

2005-10-24 Thread Scott Noyes
$query = SELECT COUNT (login) FROM formacao WHERE login = '$login'; $result = mysql_query($query); Make this line instead $result = mysql_query($query) or die(mysql_error() . with the query $query; and you'll likely see the error. -- Scott Noyes [EMAIL PROTECTED] -- PHP General Mailing List

RE: [PHP] Why this doesn't work ?

2005-10-24 Thread Jay Blanchard
[snip] $query = SELECT COUNT (login) FROM formacao WHERE login = '$login'; $result = mysql_query($query); mysql_fetch_row($result); The connection resource is optional. It will use the most recent connection if not specified. [/snip] Then try this $query = SELECT COUNT (login) FROM

Re: [PHP] Why this doesn't work ?

2005-10-24 Thread Mário Gamito
Hi, Make this line instead $result = mysql_query($query) or die(mysql_error() . with the query $query; and you'll likely see the error. Here it goes: 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

[PHP] Re: Why this doesn't work ?

2005-10-24 Thread Phillip Oertel
hi mario, first of all, make sure that your query works from the mysql console or phpmyadmin or some other tool (copy-paste the query from the code and replace $loging with something reasonable). then try the following: $query = SELECT COUNT (login) FROM formacao WHERE login = '$login'; //

[PHP] Re: moving website from windows to linux hosting

2005-10-24 Thread Ben
pedro mpa said the following on 10/24/05 10:13: Hi! I have to move my website from Windows hosting to a linux hosting machine. Does anyone have special tips, procedures I should consider? (Like changing directory paths from \ to / ). It's a classifieds posting website and it's in final testing

Re: [PHP] Why this doesn't work ?

2005-10-24 Thread Jordan Miller
why don't you just echo your $query to see if it is coming out correctly, before even trying to mess with mysql_query()? I think you should be able to see the problem from there. Jordan On Oct 24, 2005, at 12:44 PM, Mário Gamito wrote: Hi, Make this line instead $result =

RE: [PHP] Why this doesn't work ?

2005-10-24 Thread Jim Moseby
Hi, Make this line instead $result = mysql_query($query) or die(mysql_error() . with the query $query; and you'll likely see the error. Here it goes: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to

Re: [PHP] Why this doesn't work ?

2005-10-24 Thread Phillip Oertel
ah! remove the whitespace between the COUNT and () : COUNT(login) instead of COUNT () ... Hi, Make this line instead $result = mysql_query($query) or die(mysql_error() . with the query $query; and you'll likely see the error. Here it goes: You have an error in your SQL syntax;

Re: [PHP] Php, Rails and ajax

2005-10-24 Thread Paul Waring
On Mon, Oct 24, 2005 at 03:34:23PM +0200, Jacob Friis Saxberg wrote: Is it possible to use Php, Rails and ajax via some open source system? How do you do it? I don't know what exactly you mean by rails, as it seems to be a buzzword for half a dozen different things at the moment. However, I did

[PHP] Re: Temp table doesn't seem to work

2005-10-24 Thread Brian Dunning
On Oct 24, 2005, at 10:58 AM, [EMAIL PROTECTED] wrote: Temp tables and user variables are connection specific. They will be there until you explicitly get rid of them OR your connection closes. And since I'm not using mysql_pconnect in PHP, that connection is closed at the end of each

RE: [PHP] Ugh, w32 anything is making me want to drink! - SOLVED

2005-10-24 Thread Jay Blanchard
[snip] ..a lot of good suggestions and some comedy materials... [/snip] Installed Apache, took 15 minutes including PHP configuration. All of the extensions loaded. whew. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PDF printing under windows.

2005-10-24 Thread Dave Lists
I'm generating PDFs under windows using PDFlib and all is easy. What I am wondering though, and google reveals nothing usefull, can I print the PDF to a network printer from windows? I'm presuming to print the file I would ahve to use COM and open it under Acrobat? Anyone done this before and

Re: [PHP] php Slow with Mac OS X 10.4

2005-10-24 Thread Brent Baisley
I haven't had any problems with slowdowns on 10.4. Usually when there are slowdowns on the Mac like you indicate, it has something to do with DNS lookups being performed. Apple seems to be having a hard time getting this right. You could problem find a ton of posts on very slow ssh on the

Re: [PHP] moving website from windows to linux hosting

2005-10-24 Thread Brent Baisley
Find out if the linux box is using a case sensitive file system. If it is, you need to make sure all your calls to other files use the right case. This was an extremely common problem in the beginning of the .com boom. On Oct 24, 2005, at 1:13 PM, pedro mpa wrote: Hi! I have to move my

[PHP] How to protect a php script that sends variables to itself

2005-10-24 Thread Graham Anderson
the below is the curl'd output of the php script: curl -l -i http://www.myserver/scripts/makeMoviePlaylist.php; Content-Length: 263 Content-Type: video/quicktime ?xml version=1.0? ?quicktime type=application/x-quicktime-media-link? embed autoplay=true cache=true kioskmode=true

Re: [PHP] php Slow with Mac OS X 10.4

2005-10-24 Thread Atelier Fabien
I'm no fs_usage expert, so I have no idea on how to profile IO with it. I do know/see very high CPU usage when running PHP. The httpd process takes up to 70% of CPU capacity. This 'peak' can take about 4 to 8 seconds for example. So I'm tempted to rule out DNS issues. Also because static

Re: [PHP] How to protect a php script that sends variables to itself

2005-10-24 Thread Jochem Maas
... Problem: if the users does this: curl -l -i http://www.myserver/scripts/makeMoviePlaylist.php? cmd=makesmil From the above curl'd output, entering the below url into a browser will get the movie: http://www.myserver/scripts/makeMoviePlaylist.php?

Re: [PHP] Problem reading SimpleXML array

2005-10-24 Thread Jochem Maas
Richard, I'm guessing you haven't played with simpleXML ... (apologies inadvance for any/all mistakes :-) chances are the var_dump() pointer you gave (which under normal circumstances would be spot on) will probably lead to more confusion. to put it lightly SimpleXML doesn't lend itself to

Re: [PHP] Abstract Classes?

2005-10-24 Thread Jochem Maas
nicely put. Oliver Grätz wrote: GamblerZG schrieb: But what benefit is there is having it as an explicitly abstract class? Why can't it just be a normal class definition which you inherit from? The idea is that a high-level language should prohobit you from doing things that do not make

Re: [PHP] php Slow with Mac OS X 10.4

2005-10-24 Thread Nicolas Ross
As stated before in this thread, in my case it's nothing about dns. On 2 machines I have, both were 10.3, one was upgraded to 10.4, the other not. Nothing else has changed. On the 10.4, it's slow, on the 10.3, it's fast. All dns lookup is off in all apache config... I did an iostat when I

Re: [PHP] php Slow with Mac OS X 10.4

2005-10-24 Thread Nicolas Ross
I must point out also, that during this time, the httpd thread that servers my request is taking 100% of cpu for the whole 8 or 10 seconds... Thanks, Nicolas - Original Message - From: Brent Baisley [EMAIL PROTECTED] To: Nicolas Ross [EMAIL PROTECTED] Cc: php-general@lists.php.net;

Re: [PHP] How to protect a php script that sends variables to itself

2005-10-24 Thread Graham Anderson
actually all sarcasm is appreciated ;) at least, I got a laugh. I am learning/experimenting with ways to add DRM to movies. Why: My script, makeMoviePlaylist.php, is calling the script, brain.php, to build the movies to send to QuickTime I wanted to prevent the user from directly accessing

[PHP] Re: PDF printing under windows.

2005-10-24 Thread Dan Baker
Dave Lists [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm generating PDFs under windows using PDFlib and all is easy. What I am wondering though, and google reveals nothing usefull, can I print the PDF to a network printer from windows? I'm presuming to print the file I would

Re: [PHP] Re: cleanly written shop-system (php5, object-oriented)?

2005-10-24 Thread James Benson
Bad choice of words. I was comparing PHP4 to PHP5 and how long PHP4 has been around compared to PHP5, it's bound to be more stable aint it? I was not trying to say PHP5 is not stable because im sure it is very much so. Or am I not allowed to say anything like that in this forum? Ill just

Re: [PHP] Calling PostgreSQL MySQL Stored Procedures - SOLVED

2005-10-24 Thread Colin Shreffler
After further investigation I found that using the 'mysqli' object and corresponding extension library will allow you to execute MySQL stored procedures from PHP. documentation can be found at: http://www.php.net/manual/en/ref.mysqli.php cheers -c On Sat, October 22, 2005 12:55 pm, Colin

[PHP] Help with a regular expression for 0,1 or 2 decimal places

2005-10-24 Thread Shaun
Hi, I am trying to create a regular expression for a width of a room, the value can be a whole integer (up to 999) with up to 2 decimal places -when it is stored in the database mysql will pad the value accordingly. /^[0-9]{1,3}.?[0-9]{0,2}?$/ The only problem I have found with above is that

Re: [PHP] php Slow with Mac OS X 10.4

2005-10-24 Thread Brent Baisley
You certainly wouldn't want to do just fs_usage. Typing something like fs_usage httpd will show you just what the httpd process is accessing. Read the man pages for other options that may be helpful. I've got a few things running on OSX 10.4, although none that handle lots of traffic.

Re: [PHP] Abstract Classes?

2005-10-24 Thread GamblerZG
Oliver Grätz wrote: GamblerZG schrieb: But what benefit is there is having it as an explicitly abstract class? Why can't it just be a normal class definition which you inherit from? The idea is that a high-level language should prohobit you from doing things that do not make sence. Why they

[PHP] how to display GD graphic in web page

2005-10-24 Thread Chris
I don't understand what is going on with a simple example I created to understand how GD graphics are presented in a web page. First I created the following simple script (in a file named graphic.php): // file: graphic.php ?php $image = imagecreatefrompng(my_graphic.png); imagepng($image); ? I

[PHP] Re: Help with a regular expression for 0,1 or 2 decimal places

2005-10-24 Thread Al
Shaun wrote: Hi, I am trying to create a regular expression for a width of a room, the value can be a whole integer (up to 999) with up to 2 decimal places -when it is stored in the database mysql will pad the value accordingly. /^[0-9]{1,3}.?[0-9]{0,2}?$/ The only problem I have found

[PHP] function 'another_mail' with authentication

2005-10-24 Thread Etienne Finet
Can anyone give me a clue on how to change this script so it can be used with basic SMTP authentication? TNX, Etienne ? function another_mail($to,$subject,$headers,$message) { // Could get this from the php ini? $from=[EMAIL PROTECTED]; list($me,$mydomain) = split(@,$from); // Now look up the

Re: [PHP] how to display GD graphic in web page

2005-10-24 Thread Jasper Bryant-Greene
On Mon, 2005-10-24 at 20:14 -0400, Chris wrote: I don't understand what is going on with a simple example I created to understand how GD graphics are presented in a web page. [[snip]] However if I replace: img src=graphic.php with img src=?php $image =

[PHP] Re: function 'another_mail' with authentication

2005-10-24 Thread Manuel Lemos
Hello, on 10/24/2005 10:57 PM Etienne Finet said the following: Can anyone give me a clue on how to change this script so it can be used with basic SMTP authentication? SMTP authentication is not that simple. There are several authentication methods and you need to establish an

Re: [PHP] how to display GD graphic in web page

2005-10-24 Thread Richard Lynch
On Mon, October 24, 2005 7:14 pm, Chris wrote: I don't understand what is going on with a simple example I created to understand how GD graphics are presented in a web page. Basically, you were right the first time. Think of it this way: HTML pages generally have, well, HTML in them.

Re: [PHP] Help with a regular expression for 0, 1 or 2 decimal places

2005-10-24 Thread Richard Lynch
On Mon, October 24, 2005 3:59 pm, Shaun wrote: I am trying to create a regular expression for a width of a room, the value can be a whole integer (up to 999) with up to 2 decimal places -when it is stored in the database mysql will pad the value accordingly. /^[0-9]{1,3}.?[0-9]{0,2}?$/

Re: [PHP] How to protect a php script that sends variables to itself

2005-10-24 Thread Richard Lynch
On Mon, October 24, 2005 2:23 pm, Graham Anderson wrote: is this possible to prevent ? Or is there a better approach? This stuff is making my head spin a bit... I am learning aspects of security so any help is appreciated. You can change makeMoviePlaylist.php to do whatever you want it to. So

Re: [PHP] How to protect a php script that sends variables to itself

2005-10-24 Thread Richard Lynch
The script , makeMoviePlaylist.php, is calling itself on the server with makeMoviePlaylist.php?cmd=getmoviepath=encrypted_path_to_the_movie The script, makeMoviePlaylist.php, accepts the request because it originated from ITSELF on the server... How do you *KNOW* it originated from ITSELF?

Re: [PHP] Re: Email Validation built-in? RFC

2005-10-24 Thread Mark Charette
Ben Litton wrote: You could certainly write an extension to do so. That's what I did (mostly I was writing one for another purpose and added a function I stole from O'Reilly. As you stated in your article, it isn't rfc822 compliant (it isn't even close). Richard was pretty specific in

Re: [PHP] PDF printing under windows.

2005-10-24 Thread Richard Lynch
On Mon, October 24, 2005 1:48 pm, Dave Lists wrote: I'm generating PDFs under windows using PDFlib and all is easy. What I am wondering though, and google reveals nothing usefull, can I print the PDF to a network printer from windows? I'm presuming to print the file I would ahve to use COM

Re: [PHP] Why this doesn't work ?

2005-10-24 Thread Richard Lynch
On Mon, October 24, 2005 12:25 pm, Mário Gamito wrote: --- $query = SELECT COUNT (login) FROM WHERE login = '$login'; $result = mysql_query($query); mysql_fetch_row($result); --- It gives me Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in

Re: [PHP] php Slow with Mac OS X 10.4

2005-10-24 Thread Richard Lynch
On Mon, October 24, 2005 3:21 pm, Nicolas Ross wrote: As stated before in this thread, in my case it's nothing about dns. You've pointed to 2 potential problems so far. 1 is mysql_connect() 2 is include ''; Can you run a quick test to find out which one is WORSE, and focus on that first? If

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-24 Thread Richard Lynch
On Mon, October 24, 2005 11:06 am, Jay Blanchard wrote: [snip] Also, lots of other good info on this topic at: http://www.php.net/manual/en/install.windows.php [/snip] ACCCK I have tried several things, now I am at my wits end. I finally rebooted the

Re: [PHP] JPG Slide show

2005-10-24 Thread John Taylor-Johnston
I remember trying this. It required GD version 2 or higher, not mentioned on their requirements page. Most of these galleries do. I'm waiting to get my sysadmin to install GD 2.x +. I have 1.6.x and only PHP Version 4.1.2 It also requires changing disable_functions in the php.ini file, which

Re: [PHP] JPG Slide show

2005-10-24 Thread Richard Lynch
On Mon, October 24, 2005 9:58 pm, John Taylor-Johnston wrote: I remember trying this. It required GD version 2 or higher, not mentioned on their requirements page. Most of these galleries do. I'm waiting to get my sysadmin to install GD 2.x +. I have 1.6.x and only PHP Version 4.1.2 It also