[PHP] XSLT and DocBook

2007-06-06 Thread Larry Garfield
Hi all. I have a DocBook source[1] that I am processing into XHTML using the DocBook XSL[2] toolchain. That is, XSLT. I'm not doing a huge amount of customization on top of the default setup, either. Right now, I'm using the standard XSLT Java toolchain; Xalan, Xerces, XIncluder, and all of

Re: [PHP] Re: More include issues

2007-06-06 Thread Jared Farrish
On 6/6/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Wed, 2007-06-06 at 20:26 -0500, Jared Farrish wrote: > On 6/6/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > > On Wed, 2007-06-06 at 17:21 -0500, Jared Farrish wrote: > > > I feel ya brotha! I think Stut might be having a bad day...

[PHP] register_globals and magic_quotes_gpc (again)

2007-06-06 Thread Afan Pasalic
hi, this question is already posted thousand times. but, after I tried for 2 hours to figure it out, I gave up and posted the question here. I'm rebuilding one site. php 4.4.4 as usual, register_globals on, as well as magic_quotes. I tried to turn it off using .htaccess but what ever I change in

Re: [PHP] Re: More include issues

2007-06-06 Thread Robert Cummings
On Wed, 2007-06-06 at 20:26 -0500, Jared Farrish wrote: > On 6/6/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > > On Wed, 2007-06-06 at 17:21 -0500, Jared Farrish wrote: > > > I feel ya brotha! I think Stut might be having a bad day... > > > > Bad day?? Did you read the same posts I read? >

Re: [PHP] Re: More include issues

2007-06-06 Thread Jared Farrish
On 6/6/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Wed, 2007-06-06 at 17:21 -0500, Jared Farrish wrote: > I feel ya brotha! I think Stut might be having a bad day... Bad day?? Did you read the same posts I read? Cheers, Rob. Sure I did. Let's not take this too seriously, ok? -- Jared

Re: [PHP] Re: More include issues

2007-06-06 Thread Robert Cummings
On Wed, 2007-06-06 at 17:21 -0500, Jared Farrish wrote: > > > > I try not to bother the list and figure things out by myself as much as I > > can, but it's hard when I was "volunteered" to become the guinea pig to > > convert some of our apps from ColdFusion to PHP...especially when nobody I > > wo

RE: [PHP] Parse domain from URL

2007-06-06 Thread Stefan Wixfort
> From: Brad Fuller [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 06, 2007 5:44 PM > Subject: [PHP] Parse domain from URL > > Hey guys, > > I'm faced with an interesting problem, and wondering if there's an easy > solution. > > I need to strip out a domain name from a URL, and ignore subdom

Re: [PHP] cannot make directory at remote host

2007-06-06 Thread Chris
blueboy wrote: This work localy but not on my remote host. How can I debug it? if(!(is_dir('images/$customer_id'))) { mkdir("images/$customer_id", 0700); } The file is in the main public_html folder and there is a images folder. First tip - always use full paths instead of local ones so you

Re: [PHP] php-cli vs python

2007-06-06 Thread Chris
Abdullah Ramazanoglu wrote: Hello, I'm already (going to) use php for web based development. Shell scripting and compiled languages have their own places, but there's also a place for a high level scripting language. While people usually use python (for higher level and perl for lower level task

[PHP] Re: More include issues

2007-06-06 Thread Jared Farrish
I try not to bother the list and figure things out by myself as much as I can, but it's hard when I was "volunteered" to become the guinea pig to convert some of our apps from ColdFusion to PHP...especially when nobody I work with has ever touched PHP before. I have nobody to turn to except goog

[PHP] php-cli vs python

2007-06-06 Thread Abdullah Ramazanoglu
Hello, I'm already (going to) use php for web based development. Shell scripting and compiled languages have their own places, but there's also a place for a high level scripting language. While people usually use python (for higher level and perl for lower level tasks) for this, I really wonder w

Re: [PHP] ownership and permissions

2007-06-06 Thread Daniel Brown
On 6/6/07, blueboy <[EMAIL PROTECTED]> wrote: t: 0131 553 3935 | m:07816 996 930 | [EMAIL PROTECTED] | http://www:blue-fly.co.uk I cannot delete a couple of folders on the server as the have the owner 'nobody'. All I am doing is making the folders with mkdir($customer_id, 0755); Now is ther

[PHP] ownership and permissions

2007-06-06 Thread blueboy
t: 0131 553 3935 | m:07816 996 930 | [EMAIL PROTECTED] | http://www:blue-fly.co.uk I cannot delete a couple of folders on the server as the have the owner 'nobody'. All I am doing is making the folders with mkdir($customer_id, 0755); Now is there a way to set the ownership when I created th

[PHP] help with soapvar and xml list

2007-06-06 Thread Nathan Wheeler
I'm trying to create a request with a list. Here is what the request should be: http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> http://ws.oag.com";> string string string

Re: [PHP] More include issues

2007-06-06 Thread Dan Shirah
Sorry Stut, I am fairly newb and don't know all the in's and out's of all the functionality. I thought I had a good grasp on th edatabase connection part, but obviously was having a major oversight. Sorry for the confusion and THANK YOU for sticking with me to get this issue resolved. I try not

Re: [PHP] More include issues

2007-06-06 Thread Stut
Dan Shirah wrote: It seems that PHP is getting confused unless I post the $database = mssql_select_db("database", $connection) or die ('DB selection failed'); before the query. This is probably due to the fact that I am pulling information from multiple databases (Two MSSQL and One Informix)

Re: [PHP] More include issues

2007-06-06 Thread Richard Lynch
Use two different $connection variables, say, $mssql and $informix and pass them in as the optional arg to _query or whatever, and then you can avoid flip-flopping like that. On Wed, June 6, 2007 3:53 pm, Dan Shirah wrote: > It seems that PHP is getting confused unless I post the $database = > mss

Re: [PHP] More include issues

2007-06-06 Thread Dan Shirah
It seems that PHP is getting confused unless I post the $database = mssql_select_db("database", $connection) or die ('DB selection failed'); before the query. This is probably due to the fact that I am pulling information from multiple databases (Two MSSQL and One Informix) So if my query just

Re: [PHP] More include issues

2007-06-06 Thread Stut
Dan Shirah wrote: I thought that if you made a connection at the beginning of a page, that you could use that connection throughout the page without having to type it over again as long as you did not explicitly put in code to close the connection?? Which is why I only inserted the include fil

Re: [PHP] More include issues

2007-06-06 Thread Dan Shirah
I thought that if you made a connection at the beginning of a page, that you could use that connection throughout the page without having to type it over again as long as you did not explicitly put in code to close the connection?? Which is why I only inserted the include fil at the beginning of

Re: [PHP] More include issues

2007-06-06 Thread Richard Lynch
On Wed, June 6, 2007 3:24 pm, Dan Shirah wrote: > Yes, I have error_reporting = E_ALL and show_warnings = On. Use phpinfo to confirm that, because... > Here's something interesting...if I put the include directly above the > code > for the dropdown it workslike below: > and then the code sto

Re: [PHP] More include issues

2007-06-06 Thread Stut
Dan Shirah wrote: Yes, I have error_reporting = E_ALL and show_warnings = On. Here's something interesting...if I put the include directly above the code for the dropdown it workslike below: and then the code stops again at the next area of my page where it needs to connect to the dat

Re: [PHP] More include issues

2007-06-06 Thread Dan Shirah
Yes, I have error_reporting = E_ALL and show_warnings = On. Here's something interesting...if I put the include directly above the code for the dropdown it workslike below: '.print_r($credit_card_type_code)); foreach ($credit_card_type_desc as $c) { if ($c['credit_card_type_code'] ==

Re: [PHP] More include issues

2007-06-06 Thread Stut
Dan Shirah wrote: I only added those echo's since we have been trying to figure this out, so I could see how far it was getting before it stopped. When I select "VIew Source", the last line of code is: Do you have display_errors on and error_reporting to show at least errors and warnings

RE: [PHP] customer ids

2007-06-06 Thread WeberSites LTD
Check out some of the Password Generators on the list http://www.php-code-search.com/?q=password%20generator berber -Original Message- From: blueboy [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 06, 2007 4:40 PM To: php-general@lists.php.net Subject: [PHP] customer ids Hi, I want

Re: [PHP] More include issues

2007-06-06 Thread Dan Shirah
I only added those echo's since we have been trying to figure this out, so I could see how far it was getting before it stopped. When I select "VIew Source", the last line of code is: On 6/6/07, Stut <[EMAIL PROTECTED]> wrote: Dan Shirah wrote: > > * *** This is the query that uses the

Re: [PHP] More include issues

2007-06-06 Thread Stut
Dan Shirah wrote: * *** This is the query that uses the inlude file database connection info that is currently returning no results * // Query the credit_card_type table and load all of the records // into an array. echo "Pre-SQL"; This does not echo out* $sql = "SELECT * FROM c

Re: [PHP] More include issues

2007-06-06 Thread Dan Shirah
If something was being displayed in there, then we wouldn't be getting to the blank dropdown box. But just for you I put something in there and it doesn't get echo'd out. On 6/6/07, Stut <[EMAIL PROTECTED]> wrote: Dan Shirah wrote: > if(!empty($_POST['max_id'])) { For this test, max_id

Re: [PHP] More include issues

2007-06-06 Thread Stut
Dan Shirah wrote: For sh*ts and giggles, echo something in there - I'm betting it'll get displayed. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] More include issues

2007-06-06 Thread Dan Shirah
Okay, here's the entire thing: Submit a New Payment. Credit Card Information Is it a debit card? Yes No Credit

Re: [PHP] Image Information

2007-06-06 Thread zerof
Stut escreveu: zerof wrote: Steve Marquez escreveu: Greetings, I am trying to get information (width, height, file size) from an image before it is uploaded. Is there a way to do that? Thank you, -- Steve Marquez array getimagesize ( string file_image_name ) http://www.educar.pro.br/en/a/

Re: [PHP] More include issues

2007-06-06 Thread Stut
You can't rely on everyone seeing the different colours in your text. Please lay out your replies so they can be read in plain text. Dan Shirah wrote: Ok, I can't see anything wrong with that. Me either Are you absolutely sure it works when you replace the include line with the contents of the

Re: [PHP] More include issues

2007-06-06 Thread Dan Shirah
Using required() it still echoes the text I put in the include file for testing. On 6/6/07, Jim Moseby <[EMAIL PROTECTED]> wrote: > > I have error_reporting set to E_ALL and display_errors is set to On. > > And no errors are displayed As a troubleshooting step, use require() instead if includ

Re: [PHP] More include issues

2007-06-06 Thread Dan Shirah
../../Conn/prpr_mssql.php or ../../Connections/connection.php These are the same file, I was just changing the name to Connections/connection.php for a little added security of my info being on the web is all. On 6/6/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Stut wrote: > Dan Shirah wrote: >

RE: [PHP] More include issues

2007-06-06 Thread Jim Moseby
> > I have error_reporting set to E_ALL and display_errors is set to On. > > And no errors are displayed As a troubleshooting step, use require() instead if include(). It will return an error message if error_reporting() allows it to. JM -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Image Information

2007-06-06 Thread Jim Lucas
zerof wrote: Steve Marquez escreveu: Greetings, I am trying to get information (width, height, file size) from an image before it is uploaded. Is there a way to do that? Thank you, -- Steve Marquez array getimagesize ( string file_image_name ) http://www.educar.pro.br/en/a/gdlib/index.php?

Re: [PHP] More include issues

2007-06-06 Thread Dan Shirah
Ok, I can't see anything wrong with that. Me either Are you absolutely sure it works when you replace the include line with the contents of the include file? Are you sure you're replacing it exactly? Yes, because when I originally made the form I had the connection info hard coded. I "cut" the in

RE: [PHP] customer ids using UUID, MD5, reverse logic, error 1062

2007-06-06 Thread Daevid Vincent
Have you thought of using a UUID: http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#func tion_uuid While not real pretty, it would save you the extra "SELECT". You could also just MD5(UUID()) to make it a bit 'smaller', or some other mechanizm. Even something as simple as MD5(UN

Re: [PHP] More include issues

2007-06-06 Thread Jim Lucas
Stut wrote: Dan Shirah wrote: Ask and you shall recieve!! :) // My include statement at the beginning of the body **Various plain HTML form data here** // My dropdown box that is not getting populated $sql = "SELECT * FROM credit_card_code_types ORDER BY credit_card_type_desc"; $r

Re: [PHP] Image Information

2007-06-06 Thread Stut
zerof wrote: Steve Marquez escreveu: Greetings, I am trying to get information (width, height, file size) from an image before it is uploaded. Is there a way to do that? Thank you, -- Steve Marquez array getimagesize ( string file_image_name ) http://www.educar.pro.br/en/a/gdlib/index.php?

Re: [PHP] More include issues

2007-06-06 Thread Stut
Dan Shirah wrote: Ask and you shall recieve!! :) // My include statement at the beginning of the body **Various plain HTML form data here** // My dropdown box that is not getting populated $sql = "SELECT * FROM credit_card_code_types ORDER BY credit_card_type_desc"; $res = mssql_qu

Re: [PHP] Image Information

2007-06-06 Thread zerof
Steve Marquez escreveu: Greetings, I am trying to get information (width, height, file size) from an image before it is uploaded. Is there a way to do that? Thank you, -- Steve Marquez array getimagesize ( string file_image_name ) http://www.educar.pro.br/en/a/gdlib/index.php?pn=22&tr=97 --

Re: [PHP] More include issues

2007-06-06 Thread Dan Shirah
Ask and you shall recieve!! :) // My include statement at the beginning of the body **Various plain HTML form data here** // My dropdown box that is not getting populated '.print_r($credit_card_type_code)); foreach ($credit_card_type_desc as $c) { if ($c['credit_card_type_code'] == $_POS

Re: [PHP] Image Information

2007-06-06 Thread Stut
Steve Marquez wrote: I am trying to get information (width, height, file size) from an image before it is uploaded. Is there a way to do that? Not without using a client-side technology. PHP can't help you on the client-side. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] More include issues

2007-06-06 Thread Stut
Dan Shirah wrote: If I put an echo into my included file, the echo displays on the screen. But no results are returned. However, if I copy the data from my include file and paste it directly into my page, I get the results. Ok, so that's confirmed that the include file is being included p

[PHP] Image Information

2007-06-06 Thread Steve Marquez
Greetings, I am trying to get information (width, height, file size) from an image before it is uploaded. Is there a way to do that? Thank you, -- Steve Marquez

Re: [PHP] More include issues

2007-06-06 Thread Dan Shirah
If I put an echo into my included file, the echo displays on the screen. But no results are returned. However, if I copy the data from my include file and paste it directly into my page, I get the results. On 6/6/07, Stut <[EMAIL PROTECTED]> wrote: Dan Shirah wrote: > I have error_reporting

Re: [PHP] More include issues

2007-06-06 Thread Stut
Dan Shirah wrote: I have error_reporting set to E_ALL and display_errors is set to On. And no errors are displayed My code run through as it should...passes my include statement...displays part of the form, but when it gets to a dropdown box that is populated by the database (Which the connecti

Re: [PHP] More include issues

2007-06-06 Thread Dan Shirah
I have error_reporting set to E_ALL and display_errors is set to On. And no errors are displayed My code run through as it should...passes my include statement...displays part of the form, but when it gets to a dropdown box that is populated by the database (Which the connection is set in the in

[PHP] cannot make directory at remote host

2007-06-06 Thread blueboy
This work localy but not on my remote host. How can I debug it? if(!(is_dir('images/$customer_id'))) { mkdir("images/$customer_id", 0700); } The file is in the main public_html folder and there is a images folder. What should the permissions be? Thanks -- PHP General Mailing List (http://ww

Re: [PHP] Re: second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Jochem Maas
Greg Beaver wrote: > Eric Butera wrote: > >> My work machine is a OS X iMac that has Apple's php4 standard, plus I >> have a php4 and php5 custom compiled myself. I've been able to issue >> sudo /path/to/php4/bin/pear or /path/to/php5/bin/pear and that >> installs the packages correctly for each

Re: [PHP] Re: second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Greg Beaver
Eric Butera wrote: > My work machine is a OS X iMac that has Apple's php4 standard, plus I > have a php4 and php5 custom compiled myself. I've been able to issue > sudo /path/to/php4/bin/pear or /path/to/php5/bin/pear and that > installs the packages correctly for each version that I want. > Appa

Re: [PHP] More include issues

2007-06-06 Thread Jim Lucas
Dan Shirah wrote: Okay, I'm stumped!!! I have all of my database connection info in a file: connection.php This info is stored in a folder: Connections Example of connection.php: I am trying to include the connection.php file in all of my pages so I don't have to hard code the info into ever

Re: [PHP] Re: second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Eric Butera
On 6/6/07, Greg Beaver <[EMAIL PROTECTED]> wrote: Jochem Maas wrote: > I have a [gentoo] server with 2 apache installations ... > > the std distro apache runs with php4 which includes an installation > of PEAR and PECL. > > the second apache is compiled by hand and runs with php5 (also compiled >

Re: [PHP] More include issues

2007-06-06 Thread Robert Cummings
On Wed, 2007-06-06 at 13:42 -0400, Dan Shirah wrote: > Okay, I'm stumped!!! > > I have all of my database connection info in a file: connection.php > This info is stored in a folder: Connections > Example of connection.php: > $connection = mssql_pconnect('SERVER','user','password') or die ('serve

[PHP] Re: second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Jochem Maas
hi Greg, thanks so much for taking the time to give such a detailed run down (and a complete solution) ... Greg Beaver wrote: > Jochem Maas wrote: ... > > Hi Jochem, > > If you're having PEAR questions, ask on the pear-general list. It's > pure luck that I happened upon your message, and nob

Re: [PHP] Re: second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Daniel Brown
On 6/6/07, Greg Beaver <[EMAIL PROTECTED]> wrote: Jochem Maas wrote: > I have a [gentoo] server with 2 apache installations ... > > the std distro apache runs with php4 which includes an installation > of PEAR and PECL. > > the second apache is compiled by hand and runs with php5 (also compiled >

[PHP] More include issues

2007-06-06 Thread Dan Shirah
Okay, I'm stumped!!! I have all of my database connection info in a file: connection.php This info is stored in a folder: Connections Example of connection.php: I am trying to include the connection.php file in all of my pages so I don't have to hard code the info into every page. But, my data

Re: [PHP] export to csv

2007-06-06 Thread Haig Dedeyan
Jim Lucas <[EMAIL PROTECTED]> wrote: Haig (Home) wrote: > Hi everyone, I have a small problem when exporting mysql into csv format. > > > > The export works fine. The problem is, if the mysql table has a carriage > return, opening the csv file in excel will display a square box where the > ca

[PHP] Re: second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Greg Beaver
Jochem Maas wrote: > I have a [gentoo] server with 2 apache installations ... > > the std distro apache runs with php4 which includes an installation > of PEAR and PECL. > > the second apache is compiled by hand and runs with php5 (also compiled > by hand) - obviously both of these are installed

Re: [PHP] explode string at new line

2007-06-06 Thread Davi
Em Quarta 06 Junho 2007 13:20, Jim Lucas escreveu: > Davi wrote: > > Em Quarta 06 Junho 2007 10:54, Davi escreveu: > >> But... Why does it happen: > >> > >> [code] > >> > >> $object=mysql_fetch_object($result); > >> > >> $texto = $object->texto; > >> > >> $texto=preg_replace("/\r|\n/","",stripslash

Re: [PHP] Re: customer ids

2007-06-06 Thread Burn
Richard Davey ha scritto: Hi Burn, Wednesday, June 6, 2007, 4:39:05 PM, you wrote: Worst thing that can happen is having mysql throw an error while trying to insert an ID that's already present in the database. It gets more complicated and unpredictable if the field isn't required to be uniqu

Re[2]: [PHP] Parse domain from URL

2007-06-06 Thread Richard Davey
Hi Brad, Wednesday, June 6, 2007, 5:04:41 PM, you wrote: > Yes, that's basically what my code already does. > The problem is that what if the url is "http://yahoo.co.uk/"; (note the lack > of a subdomain) > Your script thinks that the domain is "co.uk". Just like my existing code > does. > So

Re: [PHP] explode string at new line

2007-06-06 Thread Jim Lucas
Davi wrote: Em Quarta 06 Junho 2007 10:54, Davi escreveu: But... Why does it happen: [code] $object=mysql_fetch_object($result); $texto = $object->texto; $texto=preg_replace("/\r|\n/","",stripslashes($texto)); echo $texto; [/code] [output] Teste \r\nde formatação! \r\nTudo funcionando...

Re: [PHP] second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Jochem Maas
Daniel Brown wrote: > On 6/6/07, Jochem Maas <[EMAIL PROTECTED]> wrote: >> Daniel Brown wrote: >> > On 6/6/07, Jochem Maas <[EMAIL PROTECTED]> wrote: >> >> ... >> >> > >> >Yeah, my truck, too. I do computer forensics primarily, so I'm on >> > the road all the time. I have a laptop in the fron

RE: [PHP] Parse domain from URL

2007-06-06 Thread Brad Fuller
Daniel Brown wrote: > On 6/6/07, Brad Fuller <[EMAIL PROTECTED]> wrote: >> Hey guys, >> >> I'm faced with an interesting problem, and wondering if there's an >> easy solution. >> >> I need to strip out a domain name from a URL, and ignore subdomains >> (like www) >> >> I can use parse_url to ge

Re: [PHP] checking the aspect ratio of an images

2007-06-06 Thread Crayon Shin Chan
On Wednesday 06 June 2007 21:33, Robert Cummings wrote: > You certainly can be "approximate" when coding. It's called heuristics > and it's an absolute necessity in many areas of software development. But you still have to define _precisely_ how "approximate" you want to be. -- Crayon -- PHP

Re: [PHP] Parse domain from URL

2007-06-06 Thread Daniel Brown
On 6/6/07, Brad Fuller <[EMAIL PROTECTED]> wrote: Hey guys, I'm faced with an interesting problem, and wondering if there's an easy solution. I need to strip out a domain name from a URL, and ignore subdomains (like www) I can use parse_url to get the hostname. And my first thought was to take

Re: [PHP] Parse domain from URL

2007-06-06 Thread Robert Cummings
On Wed, 2007-06-06 at 11:43 -0400, Brad Fuller wrote: > Hey guys, > > I'm faced with an interesting problem, and wondering if there's an easy > solution. > > I need to strip out a domain name from a URL, and ignore subdomains (like > www) > > I can use parse_url to get the hostname. And my first

Re[2]: [PHP] Re: customer ids

2007-06-06 Thread Richard Davey
Hi Burn, Wednesday, June 6, 2007, 4:39:05 PM, you wrote: > Worst thing that can happen is having mysql throw an error while trying > to insert an ID that's already present in the database. It gets more > complicated and unpredictable if the field isn't required to be unique > at database design

Re: [PHP] second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Daniel Brown
On 6/6/07, Jochem Maas <[EMAIL PROTECTED]> wrote: Daniel Brown wrote: > On 6/6/07, Jochem Maas <[EMAIL PROTECTED]> wrote: ... > >Yeah, my truck, too. I do computer forensics primarily, so I'm on > the road all the time. I have a laptop in the front between the > driver and passenger seats

[PHP] Parse domain from URL

2007-06-06 Thread Brad Fuller
Hey guys, I'm faced with an interesting problem, and wondering if there's an easy solution. I need to strip out a domain name from a URL, and ignore subdomains (like www) I can use parse_url to get the hostname. And my first thought was to take the last 2 segments of the hostname to get the doma

Re: [PHP] Re: customer ids

2007-06-06 Thread Burn
Richard Davey ha scritto: Hi Burn, Wednesday, June 6, 2007, 3:55:21 PM, you wrote: Here's how I do it, for 1 single table though.. you'll have to write yourself the mod to check on more tables. If you plan to have > 10 millions records make sure the maxrand is higher. When the "do" loop ex

Re: [PHP] second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Jochem Maas
Daniel Brown wrote: > On 6/6/07, Jochem Maas <[EMAIL PROTECTED]> wrote: ... > >Yeah, my truck, too. I do computer forensics primarily, so I'm on > the road all the time. I have a laptop in the front between the > driver and passenger seats with a system in the back hardwired through > an i

Re: [PHP] second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Jochem Maas
Daniel Brown wrote: > On 6/6/07, Austin C <[EMAIL PROTECTED]> wrote: >> Why do you have 2 apaches on the same computer? I didnt even know you >> could >> do that without causing problems. >> I need to run php4 and php5 sites on the same box and I can't upgrade php4 to php5 for 2 reasons ... 1. up

Re: [PHP] second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Daniel Brown
On 6/6/07, Jochem Maas <[EMAIL PROTECTED]> wrote: Daniel Brown wrote: > On 6/6/07, Jochem Maas <[EMAIL PROTECTED]> wrote: >> I have a [gentoo] server with 2 apache installations ... >> >> the std distro apache runs with php4 which includes an installation >> of PEAR and PECL. >> >> the second apa

Re: [PHP] Re: customer ids

2007-06-06 Thread Richard Davey
Hi Burn, Wednesday, June 6, 2007, 3:55:21 PM, you wrote: > Here's how I do it, for 1 single table though.. you'll have to write > yourself the mod to check on more tables. If you plan to have > 10 > millions records make sure the maxrand is higher. > When the "do" loop exits you have a unique i

Re: [PHP] second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Jochem Maas
Daniel Brown wrote: > On 6/6/07, Jochem Maas <[EMAIL PROTECTED]> wrote: >> I have a [gentoo] server with 2 apache installations ... >> >> the std distro apache runs with php4 which includes an installation >> of PEAR and PECL. >> >> the second apache is compiled by hand and runs with php5 (also com

[PHP] Re: customer ids

2007-06-06 Thread Burn
blueboy ha scritto: Hi, I want to create random customer ids. I have an auto incremented coulumn but I would rather have a 6-8 digit/letter id randomly generated that can be used as a unique identifier across 3 tables. Does anyone have a algorithm to generate such a string and can you give t

Re: [PHP] customer ids

2007-06-06 Thread Zoltán Németh
have you looked at the archives??? I don't think so. try this link: http://marc.info/?l=php-general&w=2&r=1&s=random+unique+id&q=b greets Zoltán Németh 2007. 06. 6, szerda keltezéssel 15.40-kor blueboy ezt írta: > Hi, > > I want to create random customer ids. I have an auto incremented coulumn

Re: [PHP] second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Daniel Brown
On 6/6/07, Austin C <[EMAIL PROTECTED]> wrote: Why do you have 2 apaches on the same computer? I didnt even know you could do that without causing problems. On 6/6/07, Daniel Brown <[EMAIL PROTECTED]> wrote: > On 6/6/07, Jochem Maas <[EMAIL PROTECTED]> wrote: > > I have a [gentoo] server with

[PHP] customer ids

2007-06-06 Thread blueboy
Hi, I want to create random customer ids. I have an auto incremented coulumn but I would rather have a 6-8 digit/letter id randomly generated that can be used as a unique identifier across 3 tables. Does anyone have a algorithm to generate such a string and can you give the odds against 2 dupl

Re: [PHP] second/custom PEAR/PECL installation. possible? how?

2007-06-06 Thread Daniel Brown
On 6/6/07, Jochem Maas <[EMAIL PROTECTED]> wrote: I have a [gentoo] server with 2 apache installations ... the std distro apache runs with php4 which includes an installation of PEAR and PECL. the second apache is compiled by hand and runs with php5 (also compiled by hand) - obviously both of t

Re: [PHP] explode string at new line

2007-06-06 Thread Davi
Em Quarta 06 Junho 2007 10:54, Davi escreveu: > But... Why does it happen: > > [code] > > $object=mysql_fetch_object($result); > > $texto = $object->texto; > > $texto=preg_replace("/\r|\n/","",stripslashes($texto)); > echo $texto; > > [/code] > > [output] > > Teste > \r\nde formatação! > \r\nTudo f

RE: [PHP] Anyone scripted Crossover?

2007-06-06 Thread Edward Kay
> -Original Message- > From: George Pitcher [mailto:[EMAIL PROTECTED] > Sent: 06 June 2007 14:34 > To: php-general@lists.php.net > Subject: RE: [PHP] Anyone scripted Crossover? > > > Tijnema, > > > > Nothing found in the archive, so asking the question: has > > anyone done any > > > scrip

Re: [PHP] explode string at new line

2007-06-06 Thread Davi
Em Quarta 06 Junho 2007 02:50, Jim Lucas escreveu: > Chris wrote: > > Davi wrote: > >> Em Terça 05 Junho 2007 23:52, [EMAIL PROTECTED] escreveu: > >>> That's exactly correct. Except I /think/ you should use "\n" instead of > >>> '\n'. > >> > >> array explode ( string $delimiter, string $string [, i

Re: [PHP] Anyone scripted Crossover?

2007-06-06 Thread Tijnema
On 6/6/07, George Pitcher <[EMAIL PROTECTED]> wrote: Tijnema, > > Nothing found in the archive, so asking the question: has > anyone done any > > scripting of Crossover to control MS Office applications on Linux? > > > > I would love to move to Linux, but have some apps that create > MS Word doc

[PHP] file_get_contents() can't fetch files via HTTP from localhost's vhosts

2007-06-06 Thread Burn
Hello all, I have a dynamically generated javascript library that I want to minigy with a PHP port of JSMin, in order to do that I need to first fetch the parsed PHP script that generates the JS (complete with comments and everything), and then minify it. The idea is to fetch the file via f

RE: [PHP] Anyone scripted Crossover?

2007-06-06 Thread George Pitcher
Tijnema, > > Nothing found in the archive, so asking the question: has > anyone done any > > scripting of Crossover to control MS Office applications on Linux? > > > > I would love to move to Linux, but have some apps that create > MS Word docs > > and some doing Excel parsing. > > > > Cheers > >

Re: [PHP] checking the aspect ratio of an images

2007-06-06 Thread Robert Cummings
On Wed, 2007-06-06 at 12:01 +0100, Richard Davey wrote: > Hi, > > Wednesday, June 6, 2007, 11:41:19 AM, you wrote: > > > I want to force users to insert landscape rather portrait images. I don't > > want to be too pedantic about it but they do need to have an approximate 4x3 > > aspect ratio. >

Re: [PHP] Anyone scripted Crossover?

2007-06-06 Thread Tijnema
On 6/6/07, George Pitcher <[EMAIL PROTECTED]> wrote: Hi, Nothing found in the archive, so asking the question: has anyone done any scripting of Crossover to control MS Office applications on Linux? I would love to move to Linux, but have some apps that create MS Word docs and some doing Excel p

[PHP] Anyone scripted Crossover?

2007-06-06 Thread George Pitcher
Hi, Nothing found in the archive, so asking the question: has anyone done any scripting of Crossover to control MS Office applications on Linux? I would love to move to Linux, but have some apps that create MS Word docs and some doing Excel parsing. Cheers George in Edinburgh/Oxford

Re: [PHP] Double checking - I should turn off "magic quotes"

2007-06-06 Thread David Robley
Dave M G wrote: > Robert , PHP General, > > Thank you for replying and explaining the situation clearly. >> Neither! It means using mysql_real_escape_string(): >> http://www.php.net/manual/en/function.mysql-real-escape-string.php > > I have now made it so each and every queries to the database p

Re: [PHP] Draw function diagram

2007-06-06 Thread Jochem Maas
Khorosh Irani wrote: > Hi > I worked alittle with gd > It is my code for y(x)=sin(x)+cos(x): > >function Graph($rangeLow, $rangeHigh, $step) >{ >$img = ImageCreate($this->width, $this->height); >$background_color = imagecolorallocate($img, 0, 0, 0); >$white = ImageC

Re: [PHP] works in 4.4.2 - breaks in 5.2.1

2007-06-06 Thread Jim Berkey
You are probably right. An attempted new post writes a totally empty file. I was hoping it was just a syntax change in v5, but I discover that the code I was using isn't terribly good, so I'm spending some time on php.net and will try to create a new guestbook model using a mysql table, and hop

Re: [PHP] Double checking - I should turn off "magic quotes"

2007-06-06 Thread Jochem Maas
Richard Lynch wrote: > On Mon, June 4, 2007 9:02 am, Dave M G wrote: >> I've read on the manual that it's "preferred to code with magic quotes >> off and to instead escape the data at runtime, as needed": >> >> Recently, while configuring my PHP so as to install the GD libraries, >> that the defaul

Re: [PHP] checking the aspect ratio of an images

2007-06-06 Thread Robin Vickery
On 06/06/07, blueboy <[EMAIL PROTECTED]> wrote: I want to force users to insert landscape rather portrait images. I don't want to be too pedantic about it but they do need to have an approximate 4x3 aspect ratio. This is my code so far. $max_height = "500"; // This is in pixels $max_width = "50

RE: [PHP] checking the aspect ratio of an images

2007-06-06 Thread Edward Kay
> -Original Message- > From: blueboy [mailto:[EMAIL PROTECTED] > Sent: 06 June 2007 11:41 > To: php-general@lists.php.net > Subject: [PHP] checking the aspect ratio of an images > > > I want to force users to insert landscape rather portrait images. I don't > want to be too pedantic about

Re: [PHP] checking the aspect ratio of an images

2007-06-06 Thread Richard Davey
Hi, Wednesday, June 6, 2007, 11:41:19 AM, you wrote: > I want to force users to insert landscape rather portrait images. I don't > want to be too pedantic about it but they do need to have an approximate 4x3 > aspect ratio. You can't really be 'approximate' when coding. You need to set some hard

Re: [PHP] Strings

2007-06-06 Thread itoctopus
I noticed that too :) -- itoctopus - http://www.itoctopus.com "Robert Cummings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Tue, 2007-06-05 at 19:57 +0200, Jochem Maas wrote: >> do you notice the totally weird string delimiters in your original post? >> using either single q

  1   2   >