Re: [PHP] Socket error connecting to mySQL

2003-02-04 Thread Jason Wong
On Friday 21 February 2003 15:49, Bryan Lipscy wrote: > $db= @mysql_pconnect ( $DB_HOST , $DB_USER , $DB_PASS ); > @mysql_select_db ( $DB_DB ) or die ( "DATABASE ERROR!".mysql_error() ); > > Returns DATABASE ERROR!Can't connect to local MySQL server through > socket '/tmp/mysql.sock' (2) > > MySQL

Re: [PHP] Socket error connecting to mySQL

2003-02-04 Thread Nick Kordas -: Wildthing Communications
Hi I think that you mysql server on your Win box is set to only connect from localhost and not from an outside host which is what its trying to do. - Regards Nick Kordas BE(hons) Ph.D(usyd) Wildthing Communications PH: 07 5481 6064 Mob: 0421 556847 IC

[PHP] php3 + HTTP_POST_FILES

2003-02-04 Thread electroteque
is there a way to get this variable in php3 for some reason i cannot acess it ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] POST_with_PHP_--_please_help_!

2003-02-04 Thread Krzysztof Dziekiewicz
> That's right, but with curl it's not a true redirection: you just print the content >of the target page, you don't redirect to the page. > What I need is "automated forms", that send the same data as forms but without user >interaction. > I can't use javascript to automatically send a form.

[PHP] Re: Which link was selected?

2003-02-04 Thread Götz Lohmsnn
Karina S schrieb: > Hi, > > I put pictures from a database ont the page about my products. If the user > click on a picture I want to give a detailed description about the product. > But how can I get, which picture was selected? > > Thanks > > if your images are named like PicNr000.png, PicNr

Re: [PHP] Which link was selected?

2003-02-04 Thread Götz Lohmsnn
Leonard Burton schrieb: > Greetings, > > You ought to make your link something like > www.foo.com/products.php?autoid=105. and then make a query on your page > that displays the pics based on an autoincrement number in your table. > > You ought to be able to make the code something like: > > //

Re: [PHP] How to compare 2 strings

2003-02-04 Thread Krzysztof Dziekiewicz
> How to compare 2 strings in PHP > I hawe 2 array where I have only string values some values in both arrays > are same but if command don't send me a good result. > e.g > foreach ($array1 as $a1) { > foreach($array2 as $a2){ >if ($a1 == $a2) echo "good"; //never system send me a good res

[PHP] Re: Socket error connecting to mySQL

2003-02-04 Thread Götz Lohmsnn
Bryan Lipscy schrieb: > $db= @mysql_pconnect ( $DB_HOST , $DB_USER , $DB_PASS ); > @mysql_select_db ( $DB_DB ) or die ( "DATABASE ERROR!".mysql_error() ); > > Returns DATABASE ERROR!Can't connect to local MySQL server through > socket '/tmp/mysql.sock' (2) > > MySQL server exists on a Win2ksp3 b

Re: [PHP] safe mode problem

2003-02-04 Thread Marek Kilimajer
I recomend you use ftp functions to upload the script to your site (from the generating file). If you only use normal filesystem function, the newly created file will get the owner of the http server. gurvinder singh wrote: and how can i be root from a php script? i want chown from the script

Re: [PHP] Re: Etiquette

2003-02-04 Thread Götz Lohmsnn
Luke Woollard schrieb: > Chill out. It's only PHP programming. > :) > > > -Original Message- > From: Philip Olson [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, 4 February 2003 2:56 PM > To: Chris Shiflett > Cc: Sunfire; Todd Barr; [EMAIL PROTECTED] > Subject: [PHP] Re: Etiquette > > > On

[PHP] restricting acces to files

2003-02-04 Thread Shams
Hi, i've written a secure PHP login script which will allow users to login to a directory such as this: smezone.com/members/index.php however, how do I restrict people from accessing HTML files in that directory (which they can easily do so by typing the URL into their browser), such as: smezon

Re: [PHP] restricting acces to files

2003-02-04 Thread Jason Wong
On Saturday 01 February 2003 17:28, Shams wrote: > Hi, > > i've written a secure PHP login script which will allow users to login to a > directory such as this: > > smezone.com/members/index.php > > however, how do I restrict people from accessing HTML files in that > directory (which they can easi

[PHP] Re: Make an MDB File on the Fly

2003-02-04 Thread hboyce
I have recently been investigating exporting data from MySQL database to use with MS Word mail merge. The mail merge will accept a text file with separators of tab or comma - should be easy to produce using PHP. Hilary On 3 Feb 2003 at 12:49, Matt Babineau wrote: > I have a client that cur

[PHP] Security question with PHP on Unix / Linux.

2003-02-04 Thread Ananth Kesari
Hi, I am working on porting PHP onto NetWare. At this point of time, I am trying to understand the way security is implemented for PHP on Unix / Linux. I mean, how are the different users distinguished from Unix / Linux. Do they get to login into the Unix / Linux system? Do they have separate dat

[PHP] Re: restricting acces to files

2003-02-04 Thread Goetz Lohmann
Shams schrieb: > Hi, > > i've written a secure PHP login script which will allow users to login to a > directory such as this: > > smezone.com/members/index.php > > however, how do I restrict people from accessing HTML files in that > directory (which they can easily do so by typing the URL into

Re: [PHP] PHP Sessions Not Saving

2003-02-04 Thread Jonathan Wright
At around Tue, Feb 04, 2003 at 02:06:35PM +0800, Jason Wong constructed the following notation: > > > > > > Recompile, why? How about a link? > > > > > > ln -s /sbin/sendmail /usr/sbin/sendmail > > > > During the ./configure part of the installation, PHP checks for > > sendmail, but only in /sbin

[PHP] Re: How to check for refresh in PHP

2003-02-04 Thread Goetz Lohmann
Pag schrieb: > > Hi, > > I have a news site where i want to track how many "visits" or reads > each individual news has. I have a main list with all the titles, then > clicking on them shows the details of the specific news, only then the > counter for that particular news is increase

[PHP] Problem with include PHP 4.3.0

2003-02-04 Thread Jean-Pierre Gallou
Hi, I have problems with relative paths and 4.3.0. Include() do not seem to work the same way in 4.3.0 and 4.2.1. Consider this test: test/ |- testinclude.php |- inc/ |- inc1.php |- inc2.php OK With PHP 4.2.1, works OK. With 4.3.0, I get: Failed opening '/inc/inc2.

[PHP] Variable objects?

2003-02-04 Thread Leif K-Brooks
I'm planning to use variable objects in a new project I'm working on. The problem is, I can't find one page of documentation on them, so I can't be sure if I'm going to be using an accidential feature that will disappear. As an example of them working, the following outputs "In a_class.": cla

[PHP] Re: restricting acces to files

2003-02-04 Thread Goetz Lohmann
Goetz Lohmann schrieb: > Shams schrieb: > >>Hi, >> >>i've written a secure PHP login script which will allow users to login to a >>directory such as this: >> >>smezone.com/members/index.php >> >>however, how do I restrict people from accessing HTML files in that >>directory (which they can easily

[PHP] include_path problem on RH 8

2003-02-04 Thread Paul
Using RH 8, php 4.2.2, Apache 2.0, I'm getting (from phpinfo) a reported include path of .:/usr/share/pear no matter what I put in the include_path in php.ini. The info also says it's using /etc/php.ini as the config file. And, yes, I've restarted Apache many times. I've tried many variations on

[PHP] Converting links in strings

2003-02-04 Thread Randum Ian
Hi all, Please can someone direct me to the correct function that changes http://www.foo.com to http://www.foo.com";>http://www.foo.com for any occurence in a string. Cheers, Ian. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Problem with include PHP 4.3.0

2003-02-04 Thread Goetz Lohmann
Jean-Pierre Gallou schrieb: > Hi, > > I have problems with relative paths and 4.3.0. Include() do not seem to > work the same way in 4.3.0 and 4.2.1. Consider this test: > > test/ > |- testinclude.php > |- inc/ > |- inc1.php > |- inc2.php OK > > With PHP 4.2.1, wor

[PHP] Re: Variable objects?

2003-02-04 Thread Goetz Lohmann
Leif K-Brooks schrieb: > I'm planning to use variable objects in a new project I'm working on. > The problem is, I can't find one page of documentation on them, so I > can't be sure if I'm going to be using an accidential feature that will > disappear. As an example of them working, the following

[PHP] Re: Converting links in strings

2003-02-04 Thread Goetz Lohmann
Randum Ian schrieb: > Hi all, > > Please can someone direct me to the correct function that changes > http://www.foo.com to http://www.foo.com";>http://www.foo.com > for any occurence in a string. > > Cheers, Ian. > do you wish convert a string in a link ??? try: $string1"; ?> or a link in

[PHP] Getting key of value added to array with []?

2003-02-04 Thread Leif K-Brooks
Is there any way to get the key of an element added to an array with []? I need to use this for a reference to it. The only idea I can think of is to foreach through the array and use the last key looped through, but that seems very dirty. -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: include_path problem on RH 8

2003-02-04 Thread Goetz Lohmann
Paul schrieb: > Using RH 8, php 4.2.2, Apache 2.0, I'm getting (from phpinfo) a reported include >path of .:/usr/share/pear no matter what I put in the include_path in php.ini. The >info also says it's using /etc/php.ini as the config file. > > And, yes, I've restarted Apache many times. I've tr

[PHP] mail function

2003-02-04 Thread Dale
I am trying to configure the php.ini file so that I can use the mail function in my code. The problem I am facing is that I get the following error message when I try to run my code: Warning: mail() [function.mail]: SMTP server response: 550 Relaying is prohibited Any suggestions? Thanks, Dale

[PHP] Re: include_path problem on RH 8

2003-02-04 Thread Paul
Thanks for the info. But I notice that I didn't really state the essence of my problem, which is that I can't get PHP to locate any include directory I put in the php.ini, thus no files I want to include get included. Paul schrieb: >> Using RH 8, php 4.2.2, Apache 2.0, I'm getting (from phpinfo

[PHP] Re: Getting key of value added to array with []?

2003-02-04 Thread Goetz Lohmann
Leif K-Brooks schrieb: > Is there any way to get the key of an element added to an array with []? > I need to use this for a reference to it. The only idea I can think of > is to foreach through the array and use the last key looped through, but > that seems very dirty. > $foo[]='bar'; will ins

[PHP] Re: mail function

2003-02-04 Thread Goetz Lohmann
Dale schrieb: > I am trying to configure the php.ini file so that I can use the mail > function in my code. The problem I am facing is that I get the following > error message when I try to run my code: > > Warning: mail() [function.mail]: SMTP server response: 550 Relaying is > prohibited > thi

[PHP] Re: Problem with include PHP 4.3.0

2003-02-04 Thread Jean-Pierre Gallou
Thank you for your reply. Goetz Lohmann wrote : Failed opening '/inc/inc2.php' Yes, I don't understand the reason of the leading slash in the error message. ... maybe try something like include('./inc/inc1.php'); ^^ same thing: Failed opening './inc/inc2.php' for inclusion -- PH

Re: [PHP] tracking bulk email

2003-02-04 Thread Lowell Allen
> From: "Kevin Stone" <[EMAIL PROTECTED]> > > - Original Message - > From: "Lowell Allen" <[EMAIL PROTECTED]> > >> I've added an email feature to a content management system that will send >> plain text email to about 1400 contact addresses. Each contact is sent a >> separate email with t

Re: [PHP] Getting key of value added to array with []?

2003-02-04 Thread 1LT John W. Holmes
> Is there any way to get the key of an element added to an array with []? > I need to use this for a reference to it. The only idea I can think of > is to foreach through the array and use the last key looped through, but > that seems very dirty. If elements are only being added with [], then y

[PHP] Re: include_path problem on RH 8

2003-02-04 Thread Goetz Lohmann
Paul schrieb: > Thanks for the info. But I notice that I didn't really state the essence of my >problem, which is that I can't get PHP to locate any include directory I put in the >php.ini, thus no files I want to include get included. > > Paul schrieb: > > >>>Using RH 8, php 4.2.2, Apache 2.0

[PHP] Re: Problem with include PHP 4.3.0

2003-02-04 Thread Goetz Lohmann
Jean-Pierre Gallou schrieb: > Thank you for your reply. Goetz Lohmann wrote : > >> Failed opening '/inc/inc2.php' > > > Yes, I don't understand the reason of the leading slash in the error > message. > >> ... maybe try something like >> >> include('./inc/inc1.php'); >> ^^ > > > same

Re: [PHP] authentication

2003-02-04 Thread ed
I don't think the process is an extra step at all. In fact, it's just a trade off using one or the other. You can either login using php and a database backend or just authenticate using .htaccess directives. In my case (a few months back) what I was trying to do was offer up a single login page

Re: [PHP] Bi-weekly pay period

2003-02-04 Thread bob parker
On Tue, 4 Feb 2003 11:17, Sarah Heffron wrote: > I'm writing a quick little thing to act as a time clock since people are > writing out by hand and it's not so accurate. It's basically click a button > to clock in and click a button to clock out. > > What I also want to do is create a report (well

php-general Digest 4 Feb 2003 13:44:09 -0000 Issue 1863

2003-02-04 Thread php-general-digest-help
php-general Digest 4 Feb 2003 13:44:09 - Issue 1863 Topics (messages 134199 through 134258): list files in a dictory and its subdirectories 134199 by: Tomas Vorobjov 134202 by: Jason Sheets Re: Help with classes (oop) 134200 by: Maxim Maletsky Re: Bi-weekly pay peri

Re: [PHP] Getting key of value added to array with []?

2003-02-04 Thread Adam Voigt
foreach($counter = 0; $counter < 10; $counter++) { $array[] = $counter; } $lastkey = (count($array)-1); On Tue, 2003-02-04 at 06:43, Leif K-Brooks wrote: Is there any way to get the key of an element added to an array with []? I need to use this for a reference

Re: [PHP] authentication

2003-02-04 Thread Goetz Lohmann
[EMAIL PROTECTED] schrieb: > I don't think the process is an extra step at all. In fact, it's just a > trade off using one or the other. You can either login using php and a > database backend or just authenticate using .htaccess directives. > > On Mon, 3 Feb 2003, Chris Shiflett wrote: > > >

[PHP] Re: restricting acces to files

2003-02-04 Thread Goetz Lohmann
Goetz Lohmann schrieb: > Shams schrieb: > >>Hi, >> >>i've written a secure PHP login script which will allow users to login to a >>directory such as this: >> >>smezone.com/members/index.php >> >>however, how do I restrict people from accessing HTML files in that >>directory (which they can easily

Re: [PHP] exec

2003-02-04 Thread Jason Sheets
Hi Nick, PHP's execution commands like exec will execute the program as the user your web server is running as (generally someone like nobody or www), in order to get it to execute as someone else the program needs to be setuid. Running programs as Root setuid is generally considered dangerous an

Re: [PHP] authentication

2003-02-04 Thread Goetz Lohmann
Goetz Lohmann schrieb: > [EMAIL PROTECTED] schrieb: > >>I don't think the process is an extra step at all. In fact, it's just a >>trade off using one or the other. You can either login using php and a >>database backend or just authenticate using .htaccess directives. >> > > > > >>On Mon, 3 Fe

[PHP] Re: restricting acces to files

2003-02-04 Thread Goetz Lohmann
Goetz Lohmann schrieb: > Goetz Lohmann schrieb: > >>Shams schrieb: >> >> >>>Hi, >>> >>>i've written a secure PHP login script which will allow users to login to a >>>directory such as this: >>> >>>smezone.com/members/index.php >>> >>>however, how do I restrict people from accessing HTML files in t

RE: [PHP] Which link was selected?

2003-02-04 Thread Leonard Burton
Good Catch, Be just as an advisement besure to escape those quotes with a backslash \" Leonard. -Original Message- From: Götz Lohmsnn [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 4:09 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Which link was selected? Leonard Burton sch

RE: [PHP] tracking bulk email

2003-02-04 Thread Leonard Burton
What about making the log a .txt file and not a database? Wouldnt that be quicker? Leonard. -Original Message- From: Lowell Allen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 7:27 AM To: PHP Subject: Re: [PHP] tracking bulk email > From: "Kevin Stone" <[EMAIL PROTECTED]>

[PHP] GET HEADLINES FROM ANOTHER SITE

2003-02-04 Thread The New Source
I´d like to know how to get certain headlines from another site. I already got the permission from the site owner, but I'm short on the programing. It would be something like, get the source code from the url: www.url.com and then remove all the html, and get only the part that I need. Does anyb

[PHP] Security question with PHP on Unix / Linux.

2003-02-04 Thread Ananth Kesari
Hi, I mailed this earlier, but got no response. Maybe it went unnoticed. So, resending it again. Please read below. Your help in this is appreciated. Thanks, Ananth. Hi, I am working on porting PHP onto NetWare. I am newbie to Unix / Linux systems and at this point of time, I am trying to un

RE: [PHP] tracking bulk email

2003-02-04 Thread Matt Schroebel
> -Original Message- > From: Lowell Allen [mailto:[EMAIL PROTECTED]] > Sent: Monday, February 03, 2003 12:38 PM > To: PHP > Subject: [PHP] tracking bulk email > (1) My client is nervous about the script failing mid-list > and not being > able to determine which contacts were sent mail. I

Re: [PHP] php3 + HTTP_POST_FILES

2003-02-04 Thread Maxim Maletsky
No, PHP3 does not support it. http://www.php.net/manual/en/features.file-upload.php";> Note: In PHP versions prior 4.1.0 this was named $HTTP_POST_FILES and it's not an autoglobal variable like $_FILES is. PHP 3 does not support $HTTP_POST_FILES. -- Maxim Maletsky [E

[PHP] Is my syntax wrong?

2003-02-04 Thread Brian Dunning
Hi, The following code is giving me a "parse error, unexpected T_STRING." $inc_current_ad = WrapMySQLDatabaseResults("macasap", "update ads where ad_id = '.$current_ad->Value("ad_id").' set rotate='.$current_ad->Value("rotate")+1.'", "block=0","inc_current_ad"); It's supposed to increment th

Re: [PHP] tracking bulk email

2003-02-04 Thread Lowell Allen
> From: "Leonard Burton" <[EMAIL PROTECTED]> > > What about making the log a .txt file and not a database? Wouldnt that be > quicker? [snip] >> Thanks, Kevin. I've put a counter in place within my mail loop. It seems to >> slow the process, but perhaps not too much. And thanks to Mark McCulligh

Re: [PHP] Security question with PHP on Unix / Linux.

2003-02-04 Thread Maxim Maletsky
"Ananth Kesari" <[EMAIL PROTECTED]> wrote... : > I am working on porting PHP onto NetWare. What exactly do you mean? > I am newbie to Unix / Linux systems and at this point of time, I am > trying to understand the way security is implemented for PHP on Unix / > Linux. I mean, how are the diffe

Re: [PHP] Is my syntax wrong?

2003-02-04 Thread 1LT John W. Holmes
>The following code is giving me a "parse error, unexpected T_STRING." > >$inc_current_ad = WrapMySQLDatabaseResults("macasap", "update ads where >ad_id = '.$current_ad->Value("ad_id").' set >rotate='.$current_ad->Value("rotate")+1.'", >"block=0","inc_current_ad"); > >It's supposed to increment the

Re: [PHP] Security question with PHP on Unix / Linux.

2003-02-04 Thread Miles Thompson
Ananth, For starters, you are probably on the wrong list - the PHP developers list is probably where you should be asking this question. Second, PHP runs through the web server, so the user is the same user the web server, usually "nobody", although that depends on the how the web server is in

RE: [PHP] tracking bulk email

2003-02-04 Thread Miles Thompson
Do the database updates, it's what db's are for!Q M. At 09:40 AM 2/4/2003 -0500, Leonard Burton wrote: What about making the log a .txt file and not a database? Wouldnt that be quicker? Leonard. -Original Message- From: Lowell Allen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04

Re: [PHP] tracking bulk email

2003-02-04 Thread Lowell Allen
> From: "Matt Schroebel" <[EMAIL PROTECTED]> > >> -Original Message- >> From: Lowell Allen [mailto:[EMAIL PROTECTED]] >> Sent: Monday, February 03, 2003 12:38 PM >> To: PHP >> Subject: [PHP] tracking bulk email >> (1) My client is nervous about the script failing mid-list >> and not being

[PHP] Re: Problem with include PHP 4.3.0

2003-02-04 Thread Jean-Pierre Gallou
Goetz Lohmann wrote : wich means that "testinclude.php" includes "inc/inc1.php" and "inc/inc1.php" includes "inc/inc2.php" ? Right. I'm sorry, I didn't modify testinclude.php as you suggested, but inc1.php. With a modified testinclude.php: I get: Failed opening './inc/inc1.php' for inclus

Re: [PHP] Converting links in strings

2003-02-04 Thread Chris Shiflett
--- Randum Ian <[EMAIL PROTECTED]> wrote: > Please can someone direct me to the correct function > that changes http://www.foo.com to href="http://www.foo.com";>http://www.foo.com > for any occurence in a string. Sure http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&q=PHP+makin

Re: [PHP] Security question with PHP on Unix / Linux.

2003-02-04 Thread Chris Shiflett
--- Miles Thompson <[EMAIL PROTECTED]> wrote: > Ananth, > > For starters, you are probably on the wrong list - > the PHP developers list is probably where you should > be asking this question. Please do not go around saying this. We have enough problems with these types of posts winding up on php

Re: [PHP] GET HEADLINES FROM ANOTHER SITE

2003-02-04 Thread Chris Shiflett
--- The New Source <[EMAIL PROTECTED]> wrote: > I´d like to know how to get certain headlines from > another site. Research RSS. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Is there a way to retrieve an entire source code from a php file?

2003-02-04 Thread The New Source
What I want to know is if it is possible to retrieve a source code from a url, with a php file. Something like this: There is a php file that retrieve the source code from the url www.url.com and this source is treated and you get content from this file and show it on the response page. Is thi

Re: [PHP] Is there a way to retrieve an entire source code from aphp file?

2003-02-04 Thread Adam Voigt
$f = fopen("http://www.download.com/index.html","r"); $data = "" fclose($f); echo $data; On Tue, 2003-02-04 at 11:57, The New Source wrote: What I want to know is if it is possible to retrieve a source code from a url, with a php file. Something like this:

Re: [PHP] Is there a way to retrieve an entire source code from a php file?

2003-02-04 Thread 1LT John W. Holmes
No, you can only get the output of the PHP script, not it's source code. ---John Holmes... - Original Message - From: "The New Source" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 04, 2003 11:57 AM Subject: [PHP] Is there a way to retrieve an entire source code from

Re: [PHP] Which link was selected?

2003-02-04 Thread Goetz Lohmann
Leonard Burton schrieb: > Good Catch, > > Be just as an advisement besure to escape those quotes with a backslash \" > > Leonard. > > yes, you are right, but I also prefer the way of instead of "; echo ""; // do something here ?> cause its easyer to change HTML code afterwards wit

Re: [PHP] Is my syntax wrong?

2003-02-04 Thread 1LT John W. Holmes
>Something is still not right. Now I'm getting unexpected >T_CONSTANT_ENCAPSED_STRING when using: > >$inc_current_ad = WrapMySQLDatabaseResults("macasap", "update ads where >ad_id = ".$current_ad->Value("ad_id")." set >rotate=".$current_ad->Value("rotate")+1."", >"block=0","inc_current_ad"); The p

Re: [PHP] Is there a way to retrieve an entire source code from aphp file?

2003-02-04 Thread Adam Voigt
I believe he meant the HTML source of an HTML page. On Tue, 2003-02-04 at 11:02, 1LT John W. Holmes wrote: No, you can only get the output of the PHP script, not it's source code. ---John Holmes... - Original Message - From: "Th

[PHP] iframes and php

2003-02-04 Thread Edward Peloke
there is a php page that uses an iframe...when I view the page at home, I see all of the contents of the iframe...when I view it at work some of the contents are wrapped...both of my screen resolutions are the same. Why would this be? Thanks, Eddie -- PHP General Mailing List (http://www.php.n

Re: [PHP] Is there a way to retrieve an entire source code from aphp file?

2003-02-04 Thread Philip Olson
On 4 Feb 2003, Adam Voigt wrote: > I believe he meant the HTML source of an HTML page. An example in the manual does exactly this: http://www.php.net/file Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Problem with include PHP 4.3.0

2003-02-04 Thread Goetz Lohmann
Jean-Pierre Gallou schrieb: > Goetz Lohmann wrote : > >> wich means that "testinclude.php" includes "inc/inc1.php" >> and "inc/inc1.php" includes "inc/inc2.php" ? > > > Right. I'm sorry, I didn't modify testinclude.php as you suggested, but > inc1.php. With a modified testinclude.php: > > I g

[PHP] Re: Is there a way to retrieve an entire source code from a php file?

2003-02-04 Thread Goetz Lohmann
The New Source schrieb: > What I want to know is if it is possible to retrieve a source code from a url, with >a php file. > > Something like this: > > There is a php file that retrieve the source code from the url www.url.com and this >source is treated and you get content from this file and s

[PHP] Re: iframes and php

2003-02-04 Thread Goetz Lohmann
Edward Peloke schrieb: > there is a php page that uses an iframe...when I view the page at home, I > see all of the contents of the iframe...when I view it at work some of the > contents are wrapped...both of my screen resolutions are the same. Why > would this be? > > Thanks, > Eddie > this de

[PHP] Help Needed

2003-02-04 Thread Pushpinder Singh Garcha
Hello All: My question is related to authentication. I have made a login system using PHP Sessions and MySQL. Once the user gets authenticated on the website I want to be able to allow him to see some html pages on the website. Only users who have logged in are able to see such a files. I have

[PHP] HTML if no PHP

2003-02-04 Thread Bob Lockie
I want to display an HTML page if PHP can't load an include file or otherwise has an error or just doesn't work. How do I do this? -- Sent from Mozilla and GNU/Linux. Powered by an AMD processor. -- PHP General Mailing List (http://www.php.net/) To uns

RE: [PHP] HTML if no PHP

2003-02-04 Thread Jon Haworth
Hi Bob, > I want to display an HTML page if PHP can't load an > include file or otherwise has an error or just doesn't work. > How do I do this? Not sure you can, especially not for the "just doesn't work" scenario. FWIW, you can test for the existence of a file before including it: if (file_e

[PHP] Re: HTML if no PHP

2003-02-04 Thread Goetz Lohmann
Bob Lockie schrieb: > > I want to display an HTML page if PHP can't load an include file or > otherwise has an error or just doesn't work. > How do I do this? if you using apache you could do this with an ErrorDocument line which also is usefull to prevent the 404 error page. take a look at: h

Re: [PHP] Help Needed

2003-02-04 Thread Philip Olson
[snip] > How should I display the page ... the page has a lot of html code and > trying to write echo " blah blah blah . "; > will not be a an option. Please suggest a way out . Use includes: http://www.php.net/include And write HTML as HTML: Greetings Hello , we hope you enjoy thi

Re: [PHP] HTML if no PHP

2003-02-04 Thread V Dub
Quoting Bob Lockie <[EMAIL PROTECTED]>: ### ### I want to display an HTML page if PHP can't load an include file or ### otherwise has an error or just doesn't work. ### How do I do this? ### if (!$variable){print('your html stuff');} Kinda basic, but it might help. Cheers! VW ### ### --

Re: [PHP] Is my syntax wrong?

2003-02-04 Thread Brian Dunning
I think we are almost there. This code is not producing an error, but it is also not incrementing the database. The value stays at zero. Any idea what could be wrong? $inc_current_ad = WrapMySQLDatabaseResults("macasap", "update ads where ad_id = ".$current_ad->Value("ad_id")." set rotate=".($

[PHP] Re: Help Needed

2003-02-04 Thread Goetz Lohmann
Pushpinder Singh Garcha schrieb: > Hello All: > > My question is related to authentication. I have made a login system > using PHP Sessions and MySQL. Once the user gets authenticated on the > website I want to be able to allow him to see some html pages on the > website. Only users who have logge

Re: [PHP] HTML if no PHP

2003-02-04 Thread John Nichel
if ( !@include ( "myfile.php" ) ) { // do this if file cannot be included ...code... ...code... } Bob Lockie wrote: I want to display an HTML page if PHP can't load an include file or otherwise has an error or just doesn't work. How do I do this? -- PHP General Mailing List (h

Re: [PHP] HTML if no PHP

2003-02-04 Thread Philip Olson
> I want to display an HTML page if PHP can't load an include > file or otherwise has an error or just doesn't work. > How do I do this? include returns false on failure and here's a hack to demonstrate. Once you implement your own error handling, be sure to set error_reporting accordingly or

[PHP] Can I see when a file was created?

2003-02-04 Thread Øystein Håland
When last modified, yes. How about when it was created? By using php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How to get a certain line from a file

2003-02-04 Thread The New Source
How can I get a certain line from a file? If I get a file in this way: $f = fopen("http://www.url.com/index.htm","r";); How can I get a certain line of the file index.htm? I would need to get the line number 232, or lines from 232 to 238. How can I get this content? Thanx. Rodrigo

[PHP] include

2003-02-04 Thread Bob Lockie
I don't appear to be able to use this variable in an include directive because the variable is empty: include "$_SERVER['DOCUMENT_ROOT'] Do I have the syntax incorrect? -- Sent from Mozilla and GNU/Linux. Powered by an AMD processor. -- PHP General Mai

Re: [PHP] How to get a certain line from a file

2003-02-04 Thread Philip Olson
On Tue, 4 Feb 2003, The New Source wrote: > How can I get a certain line from a file? > > If I get a file in this way: > > $f = fopen("http://www.url.com/index.htm","r";); > > How can I get a certain line of the file index.htm? > > I would need to get the line number 232, or lines from 232 to

Re: [PHP] Re: Help Needed

2003-02-04 Thread Pushpinder Singh Garcha
Hello All: Thanks again... I tried to use this and it is working fine for me. Please comment: Many Thanks -Pushpinder On Tuesday, February 4, 2003, at 12:32 PM, Goetz Lohmann wrote: Pushpinder Singh Garcha schrieb: Hello All: My question is related to authentication. I have made a login

Re: [PHP] How to get a certain line from a file

2003-02-04 Thread Adam Voigt
Real easy. Assuming you've read the data of the page into $data: $data = "" $line = $data[36]; Just replace 36 with whatever line number you want. On Tue, 2003-02-04 at 13:50, The New Source wrote: How can I get a certain line from a file? If I get a file i

Re: [PHP] include

2003-02-04 Thread Philip Olson
On Tue, 4 Feb 2003, Bob Lockie wrote: > I don't appear to be able to use this variable in an include directive > because the variable is empty: > include "$_SERVER['DOCUMENT_ROOT'] > > Do I have the syntax incorrect? Please post the exact syntax as you did not as the above will provide a seriou

Re: [PHP] Is my syntax wrong?

2003-02-04 Thread Jason Wong
On Wednesday 05 February 2003 01:30, Brian Dunning wrote: > I think we are almost there. This code is not producing an error, but > it is also not incrementing the database. The value stays at zero. Any > idea what could be wrong? > > $inc_current_ad = WrapMySQLDatabaseResults("macasap", "update ad

[PHP] How to remove the html Tags?

2003-02-04 Thread The New Source
Hi guys, is there a function that will remove all the Html tags from a file? How should I do it? Thanks for any clues, Rodrigo

Re: [PHP] How to remove the html Tags?

2003-02-04 Thread John Nichel
SearchGooglethe PHP manual http://www.php.net/manual/en/function.strip-tags.php The New Source wrote: Hi guys, is there a function that will remove all the Html tags from a file? How should I do it? Thanks for any clues, Rodrigo -- PHP General Mailing List (http://www.php.net

[PHP] testing if a query was successful

2003-02-04 Thread Sunfire
hi.. how would you use an if..else statement to test a query in mysql to see if it was successfull or not? would it be something like: $query=(query here...); if($query){ statements if successfull?? }else{ statements if not true?? } or would it be something else.. tnx --- Outgoing mail is cert

Re: [PHP] testing if a query was successful

2003-02-04 Thread Chris Shiflett
--- Sunfire <[EMAIL PROTECTED]> wrote: > how would you use an if..else statement to test a > query in mysql to see if it was successfull or not? Depends on what database server you are using. Here it is in MySQL: if (mysql_query($sql)) { echo "Success"; } else { echo "Failure"; } Chris --

Fw: [PHP] Can I see when a file was created?

2003-02-04 Thread Kevin Stone
Hmm... I seem to recall reading that Unix does not store the file creation date and this is the reason that PHP does not have such a function. The only option is to store that information in a database when you create the file on the server. -Kevin - Original Message - From: "Øystein Håla

RE: [PHP] php3 + HTTP_POST_FILES

2003-02-04 Thread Dan Rossi
i looked there i'm sure i didnt see that :| what a pain , another reason to get them to upgrade ;) what information can i get out of the file then ? -Original Message- From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 2:06 AM To: electroteque Cc: [EMAIL PRO

Re: [PHP] include

2003-02-04 Thread Bob Lockie
On 02/04/03 13:16 Philip Olson spoke thusly On Tue, 4 Feb 2003, Bob Lockie wrote: I don't appear to be able to use this variable in an include directive because the variable is empty: include "$_SERVER['DOCUMENT_ROOT'] Do I have the syntax incorrect? Please post the exact syntax as you did

Re: [PHP] testing if a query was successful

2003-02-04 Thread Kevin Stone
As quoted from the manual: "A non-FALSE return value means that the query was legal and could be executed by the server. It does not indicate anything about the number of rows affected or returned. It is perfectly possible for a query to succeed but affect no rows or return no rows." Always test

Re: [PHP] HTML if no PHP

2003-02-04 Thread Ernest E Vogelsinger
1) Include file not found: if (file_exists($incfile)) include($incfile); else include ($error_html_file); 2) Error in file: global $php_errormsg; $php_errormsg = null; @include($incfile); $err = $php_errormsg; if ($err) echo "The include file $incfile has an error: $err"; The trick is

  1   2   >