[PHP] mod_rewrite & open_basedir & pear
Hi Can anyone please help me with a following problem. There's a script which uses PEAR library (namely, DB class) getMessage()); var_dump($db); ?> When i execute it everything is ok. BUT when i access this script via redirect by mod_rewrite it throws an error that open_basedir settings don't allow this require to be made .htaccess: RewriteEngine on RewriteRule test2.php /~xaxa/test/test3.php [L] test2.php,test3.php contain the code that i quoted above error: Warning: open_basedir restriction in effect. File is in wrong directory in /home/xaxa/public_html/test/test3.php on line 4 Fatal error: Failed opening required 'DB.php' (include_path='.:/usr/local/lib/php') in /home/xaxa/public_html/test/test/test3.php on line 4 Is there any way to overcome this problem? mod_rewrite is used to _hide_ urls from users and to _extend_ url with additional params. Alexei -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: [PHP] Full-Duplex communication
Hi Miguel, I can go in for a php based listener, yes, but this system is already in a production environment and there will be major changes required to get it done. If I get a chance to redevelop this, that is probably what I'll go in for. Tx, Vinod. -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 10:18 PM To: Vinod Panicker Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Re: [PHP] Full-Duplex communication So still there is nothing in your requirements that doesn't suggest you'll do fine with a PHP-based listener. Of course you have the memory overhead of the PHP interpreter's RAM infrastructure multiplied by the number of simultaneous connections, but that would be the same with Apache (at least on Unix). miguel On 24 May 2002, Vinod Panicker wrote: > Let me explain my project more in detail. > > This system is an Instant messaging system, with the backed > running on apache / php / mysql. The front end client is a COM > component that communicates with the backend, and interfaces with > an MFC app. > > Now since Instant messaging requires that the server should be > able to send asynchronous messages to the client (Presence, IM's, > notifications, etc), and HTTP does not allow asynchronous > communication, the only solution is to have the client poll the > server for messages. > > Now i know that apache / php is not a good solution for an instant > messaging server, but we needed it to be ready in a months time, > and php is so amazing that we could get it up and running so fast. > But it meant that we have to live with latency between messages > because of the polling. > > So i was thinking if there was some way in which i could avoid the > polling and send data asynchronously to the client (Pls refer to > my previous posts). Thats why i was looking at a way in which i > could get hold of the socket to the client, so i could use it to > send data directly. > > Tx, > Vinod. > > On Fri, 24 May 2002 Miguel Cruz wrote : > >Not to be argumentative, but what you're trying to do is just so > >amazingly > >much more complicated than any of my suggestions. Maybe I > >haven't > >communicated it well, it maybe there's some requirement to your > >project > >that I don't understand. > > > >Why not just write a listener in PHP and redirect to it? It's > >basically no > >work. > > > >Handcrafting packets for this purpose is like building a car out > >of paper > >clips and cat hair because the car that's freely available to you > >is red - > >and you don't like the color red because your old girlfriend used > >to wear > >it a lot. > > > >miguel > > > >On 23 May 2002, Vinod Panicker wrote: > > > What you said did make sense, and complements my knowledge > >of > > > sockets. > > > > > > But what i'm not sure of is this - if i construct my own > >packet > > > and send it across, presuming that i do have the ip address > >and > > > port number of the client on which it is reading, will the > >client > > > accept it as a legitimate packet? > > > > > > I suspect that since the packets would be having some kind > >of > > > session identifier / sequence number. > > > > > > Getting the ip address and port number is no problem. I > >already > > > have that getting stored on the server. But from what i know > >of > > > sockets, i'm sceptical if the client will accept the packet. > > > > > > Guess the only way to go ahead is to try this out. > > > > > > Would someone pls pls pls write a PHP interface to libnet?? > > > > > > Tx, > > > Vinod. > > > > > > On Thu, 23 May 2002 Evan Nemerson wrote : > > > >You're right- this is getting interesting ;) > > > > > > > >http://www.packetfactory.net/libnet/manual/4.html#s4.1.5 > > > > > > > >Unless I'm mistaken, you don't need to actually hijack the > > > >socket- you merely > > > >need to write to the network. Check out section 3.1 of RFC > >793. > > > >There is > > > >source and destination port- that is how they are routed. > >Okay > > > >anyone PLEASE > > > >correct me if i'm wrong... > > > > > > > >My understanding is a socket is an interface to the kernel. > >So > > > >basically, you > > > >talk to a socket, which the kernel associates with source > >and > > > >destination > > > >ports, and destination IP address. Thats why you can just > >write > > > >to a socket > > > >instead of explicitly stating all the information. The > >kernel > > > >then sends out > > > >then creates the packet and send it to the destination IP. > > > > > > > >libnet would allow you to bypass the socket phase, and > >manually > > > >create a > > > >socket. Think of a socket as a GUI for the network, and > >libnet is > > > >like a > > > >console ;) > > > > > > > >Hope that helps, and once again anyone PLEASE correct any > > > >inaccuracies, since I want to know. > > > > > > > > > > > > > > > > > > > >On Tuesday 21 May 2002 23:53 pm, Vinod Panicker wrote: > > > > > Thanks for the reply Miguel, but here i'm not t
[PHP] Mailing Archieve
Hello, Can anyone please tell me how to create a mailing archieve list Thanks in advance Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 4.1.2 ignores ini-set on max_upload_filesize
On Tuesday 28 May 2002 07:33, DevilKin wrote: > On Monday 27 May 2002 22:59, Rasmus Lerdorf wrote: > > You cannot change the upload limit in your script because the file upload > > happens before your script is executed. You need to set it in your > > php.ini, httpd.conf or .htaccess > > Aha. How do i set this from .htaccess anyway? > And this might be worthy of notification in the manual that ppl like me > don't end up searching for hours to find something trivial like this... > Nevermind, found it already :oP Thanks for the hint tho! http://www.php.net/manual/en/configuration.php This explains it all :-) And it works, too :oPP DK -- You will lose your present job and have to become a door to door mayonnaise salesman. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 4.1.2 ignores ini-set on max_upload_filesize
On Monday 27 May 2002 22:59, Rasmus Lerdorf wrote: > You cannot change the upload limit in your script because the file upload > happens before your script is executed. You need to set it in your > php.ini, httpd.conf or .htaccess Aha. How do i set this from .htaccess anyway? And this might be worthy of notification in the manual that ppl like me don't end up searching for hours to find something trivial like this... Thanks! DK -- Dentist, n.: A Prestidigitator who, putting metal in one's mouth, pulls coins out of one's pockets. -- Ambrose Bierce, "The Devil's Dictionary" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php's variables & javascript
Or something easier... width = $size; HTML; ?> Just make sure the "HTML;" bit is all the way on the left margin, regardless of tabstops in your code. cheers, Brad Boyan Nedkov wrote: >Try something like that: > >//$size = GetImageSize ("images/$resim"); >$size = 222; >echo ""; > echo "width="; echo $size; echo ";"; >echo ""; >?> > >Cheers, boyan > >-- >Boyan Nedkov >[EMAIL PROTECTED] > > > > >>-Original Message- >>From: burak delice [mailto:[EMAIL PROTECTED]] >>Sent: Monday, May 27, 2002 11:59 PM >>To: [EMAIL PROTECTED] >>Subject: [PHP] php's variables & javascript >> >> >>hi everyone, >> >>I want to make a php that include javascript that use a php >>variable. Code is below: >> >>>$size = GetImageSize ("images/$resim"); >>echo " >> wdth=";$size;echo";"; >> echo ""; >>?> >> >>(I am calling that php file as below) >>http://localhost/Aksu/web/getimage.php?> resim=K00.jpg >> >>But >>explore gives me an javascript error that >>syntax error. Why? and how can do my purpose? >> >>thanks >>burak delice >> >> >> >> >> >>-- >>PHP General Mailing List (http://www.php.net/) >>To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Missing functions??
Hello again all, I'm using the Mac OS X binary of PHP 4.2.1 provided by Mark Liyanage (http://www.entropy.ch/software/macosx/php/), and I am starting to notice some oddities, I was wondering if anyone else had seen these errors in other ports. I'm getting some base php functions that seem to be missing, such as: bindtextdomain textdomain And it doesn't seem to like the _() references in array declarations. I would appreciate any guidance on these... Thanks, Wes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Setting PHP Authentication manually?
> I DO NOT want to prompt the user for username and password with header > calls to the browser. I don't want the authenticate dialog box to pop up > on the client browser; I want to collect the username and password on a > PHP or HTML page--I need to collect more data than just username and > password. But when the user submits the login data, I want to set > authentication credentials that work just as though the user entered > data in the pop up. How can I do this with PHP? Impossible. HTTP simply does not support you setting these credentials in the remote browser directly. The best you can do is emulate it using cookies and/or sessions. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Variable vs Constant
what harm will it make if i declear a value as VARIABLE where i should make it as CONSTANT actually?? how about if i declear 100 values as VARIABLEs where all are CONSTANTs actually? thx HPS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Setting PHP Authentication manually?
Two way's I can see 1. Use session variables 2. Use client side cookies Martin -Original Message- From: Laura Harley [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 2:02 PM To: [EMAIL PROTECTED] Subject: [PHP] Setting PHP Authentication manually? I am trying to build a login page for client project review site. I DO NOT want to prompt the user for username and password with header calls to the browser. I don't want the authenticate dialog box to pop up on the client browser; I want to collect the username and password on a PHP or HTML page--I need to collect more data than just username and password. But when the user submits the login data, I want to set authentication credentials that work just as though the user entered data in the pop up. How can I do this with PHP? Can I set $PHP_AUTH_USER and $PHP_AUTH_PW manually? If so, does this set the Web server's authentication values for user name and password? If not, how can I use PHP to set authentication credentials that the Web server recognizes? Also, if I don't prompt the user with header( ) calls, how do I get the authentication cache on the client browser to store the auth data? Any ideas? Please help. Thanks. -- --- Laura Harley Sr Web Architect and Principal Manager Design Interactive, LLC PO Box 17356 Alexandria, VA 22302 Tel: 703-578-1544 Website: http://www.designinteractive.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Setting PHP Authentication manually?
I am trying to build a login page for client project review site. I DO NOT want to prompt the user for username and password with header calls to the browser. I don't want the authenticate dialog box to pop up on the client browser; I want to collect the username and password on a PHP or HTML page--I need to collect more data than just username and password. But when the user submits the login data, I want to set authentication credentials that work just as though the user entered data in the pop up. How can I do this with PHP? Can I set $PHP_AUTH_USER and $PHP_AUTH_PW manually? If so, does this set the Web server's authentication values for user name and password? If not, how can I use PHP to set authentication credentials that the Web server recognizes? Also, if I don't prompt the user with header( ) calls, how do I get the authentication cache on the client browser to store the auth data? Any ideas? Please help. Thanks. -- --- Laura Harley Sr Web Architect and Principal Manager Design Interactive, LLC PO Box 17356 Alexandria, VA 22302 Tel: 703-578-1544 Website: http://www.designinteractive.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parse Error(Newbie)
Another thing you may want to try is the following line: $query = "select * from news WHERE id = '" . $_get['id'] . "'"; Matt On Mon, 27 May 2002 [EMAIL PROTECTED] wrote: > I know it is probably something obvious but the following gives me a parse error and >as a newbie I am having trouble locating it. > > $query = "select * from news WHERE id = "$_get['id']""; > > JJ Harrison > [EMAIL PROTECTED] > www.tececo.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parse Error(Newbie)
try this: $query = "select * from news WHERE id = '$_get['id']'"; the double quote right before the $ is ending the string, from that point on everything is an error. Matt On Mon, 27 May 2002 [EMAIL PROTECTED] wrote: > I know it is probably something obvious but the following gives me a parse error and >as a newbie I am having trouble locating it. > > $query = "select * from news WHERE id = "$_get['id']""; > > JJ Harrison > [EMAIL PROTECTED] > www.tececo.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A bit confused PART 2
No, you should be fine with leaving off the MyISAM. It is the default in 3.23 anyways. On Tuesday 28 May 2002 06:04 am, r wrote: > Greetings All, > Thank you for guiding me in the last doubt and special thanks to Juan Pablo > for the link. > > Just one question, since I have taken out that MyISAM bit when i made the > table/s, so will it be missing anything? > > Com on guys, just on this list I get a load of emails I cant join the MySql > list too, my mailbox will DI, and anyway this code was in a PHP > book > > Cheers, > -Ryan. -- Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for. Socrates -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Session's is slowing the page ??
Hello J, I try to change the gc probability in the .htaccess (php_value session.gc_probability = 10) but it didnt work :-( Is there any other ideas ? maybe it a bug in PHP ? THANKS, Dima. "J Smith" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > It might have something to do with the way the session extension in PHP > performs garbage collection. There's a setting in php.ini that basically > controls how often garbage collection is performed. The value is a > percentage, and determines how often the GC should be done over a random > number of session_start() requests. > > If GC is invoked, the garbage collector will start to delete all of the > expired session files in your session directory. If there's a lot of them, > it might take longer to load the page that the garbage collection was > started on. Since the garbage collector is called at random based on the > aforementioned setting, not every page will be affected. > > The problem could probably be cut down by increasing the value of the GC > setting, as fewer files would need to be deleted with each GC sweep, as > more GC sweeps will be called overall. > > That's just a guess, though. > > J > > > Dima Dubin wrote: > > > Hello, > > I have very wierd problem : > > I use session to manage users and I have this structure of the page : > > - > > include("db.php"); > > include("header.php"); > > bla bla > > include("footer.php"); > > - > > > > in the db.php I have : > > > > > > session_start(); > > #some mysql connect stuff > > > > > > I use session with the $_SESSION array (cheking if > > registered[isset($_S...)] and registering...) > > and all work fine > > but sometimes the page loading is very very very slow (and its a really > > really fast host) and when I removing session_start(); from the top of the > > page, the page load normaly. > > > > the PHP version is 4.1.1, someone have an idea ? > > thanks in advance, > > Dima. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP script and external C program
exec wont work if you need to use stdin and read from stdout. You can try php.net/pcntl but that is disabled by default, and probably wont be enabled oun your host. I don't even know if it existed in 4.0.6... -- If there is no higher reason--and there is none--then my own reason must be the supreme judge of my life. Leo Nikolaevich Tolstoy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is this a bug?
see this page: http://www.php.net/manual/en/language.types.integer.php Jule On Monday 27 May 2002 22:52, Jule wrote: > ps: sorry for all the typos... > > Jule > > On Monday 27 May 2002 22:51, Jule wrote: > > Dunno if it's a bug, but it's 2147483648 to max for an integer? doesn't > > bigint support higher numbers than that? > > i'm not sure but i think that's why your number gor cut down. > > > > Jule > > > > On Monday 27 May 2002 22:36, zhaoxd wrote: > > > Hello all: > > > > > > > > > > > > Not long ago I wrote some php code in my computer which had a > > > apache > > > > > > server,and my php version is 4.0.5.The code as followed: > > > > > > > > > > > > $num = 2886732778; > > > > > > settype($num, integer); > > > > > > echo $num; > > > > > > > > > > > > And I found the num is -2147483648.attention,please:the version of > > > > > > php is 4.0.5. > > > > > > > > > > > > When I installed php-4.2.0 in my computer,however,I found the > > > output > > > > > > of result is -1408234499. > > > > > > > > > > > > Why did the difference between the two version php happen?Is this a > > > > > > bug??? > > > > > > > > > > > > Any help is appreciated! > > > > > > zhaoxd -- |\/\__/\/| | Jule Slootbeek | | [EMAIL PROTECTED]| | http://blindtheory.cjb.net | | __ | |/\/ \/\| -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PhP, mysql and pictures
*** REPLY SEPARATOR *** On 27/05/2002 at 9:00 PM Ragnar [EMAIL PROTECTED] [gregausit/phplist] wrote: >Is it possible to display images in a browser that are stored as a blob >column in a mysql table? Or is it better to store images in a direcotory >and >display them "from" there? > I am no expert, but why load the SQL server up if not required ? i.e serve from a directory :) Regards Greg Wright -- IT Consultant Sydney Australia PH 0418 292020 -- Int. +61 418 292020 Available for Global Contracts US Fax -- 801 740 2874 Web http://www.ausit.comE-mail Greg AT AusIT.com Trading As - AAA Computers -- providers of IT services. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is this a bug?
ps: sorry for all the typos... Jule On Monday 27 May 2002 22:51, Jule wrote: > Dunno if it's a bug, but it's 2147483648 to max for an integer? doesn't > bigint support higher numbers than that? > i'm not sure but i think that's why your number gor cut down. > > Jule > > On Monday 27 May 2002 22:36, zhaoxd wrote: > > Hello all: > > > > > > > > Not long ago I wrote some php code in my computer which had a apache > > > > server,and my php version is 4.0.5.The code as followed: > > > > > > > > $num = 2886732778; > > > > settype($num, integer); > > > > echo $num; > > > > > > > > And I found the num is -2147483648.attention,please:the version of > > > > php is 4.0.5. > > > > > > > > When I installed php-4.2.0 in my computer,however,I found the output > > > > of result is -1408234499. > > > > > > > > Why did the difference between the two version php happen?Is this a > > > > bug??? > > > > > > > > Any help is appreciated! > > > > zhaoxd -- |\/\__/\/| | Jule Slootbeek | | [EMAIL PROTECTED]| | http://blindtheory.cjb.net | | __ | |/\/ \/\| -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is this a bug?
Dunno if it's a bug, but it's 2147483648 to max for an integer? doesn't bigint support higher numbers than that? i'm not sure but i think that's why your number gor cut down. Jule On Monday 27 May 2002 22:36, zhaoxd wrote: > Hello all: > > Not long ago I wrote some php code in my computer which had a apache > server,and my php version is 4.0.5.The code as followed: > > $num = 2886732778; > settype($num, integer); > echo $num; > > And I found the num is -2147483648.attention,please:the version of > php is 4.0.5. > > When I installed php-4.2.0 in my computer,however,I found the output > of result is -1408234499. > > Why did the difference between the two version php happen?Is this a > bug??? > > Any help is appreciated! > zhaoxd > > -- |\/\__/\/| | Jule Slootbeek | | [EMAIL PROTECTED]| | http://blindtheory.cjb.net | | __ | |/\/ \/\| -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is this a bug?
Hello all: Not long ago I wrote some php code in my computer which had a apache server,and my php version is 4.0.5.The code as followed: $num = 2886732778; settype($num, integer); echo $num; And I found the num is -2147483648.attention,please:the version of php is 4.0.5. When I installed php-4.2.0 in my computer,however,I found the output of result is -1408234499. Why did the difference between the two version php happen?Is this a bug??? Any help is appreciated! zhaoxd
RE: [PHP] Regex Assistance
this is what I use to get rid of "line" from the url $qs = ereg_replace("&$", "", ereg_replace("line=[^&]*&?", "", $QUERY_STRING)); HTH MArtin -Original Message- From: Scott Reismanis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 12:00 PM To: [EMAIL PROTECTED] Subject: [PHP] Regex Assistance Hey All, I am just begining to learn regex functions in PHP. Anyhow I am trying to code a preg_replace function which basically cleans a URL. What I mean is say a url is index.php?page=hello&list=10&start=4 you pass that URL and say 'list' to the function (shown below) Anyhow I want that to then return index.php?page=hello&start=4 (see how the entire list reference is now gone) Here is what I have come up with so far, though I am yet to test it as I am coding this at work :) function stripUrl($url, $url_strip) { // Check that $url_strip is in the URL if(strpos($url,'?') && strpos($url, $url_strip.'=')) { // Lets clean up the url $url = preg_replace("/\?|&$url_strip=/", "", $url); } return $url; } My problem is that, how do I make the preg_replace stop when it encounters a & in the URL? If anyone could shed some light on this it would be appreciated, - Regards, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Regex Assistance
Hey All, I am just begining to learn regex functions in PHP. Anyhow I am trying to code a preg_replace function which basically cleans a URL. What I mean is say a url is index.php?page=hello&list=10&start=4 you pass that URL and say 'list' to the function (shown below) Anyhow I want that to then return index.php?page=hello&start=4 (see how the entire list reference is now gone) Here is what I have come up with so far, though I am yet to test it as I am coding this at work :) function stripUrl($url, $url_strip) { // Check that $url_strip is in the URL if(strpos($url,'?') && strpos($url, $url_strip.'=')) { // Lets clean up the url $url = preg_replace("/\?|&$url_strip=/", "", $url); } return $url; } My problem is that, how do I make the preg_replace stop when it encounters a & in the URL? If anyone could shed some light on this it would be appreciated, - Regards, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] newbie bigtime
on 16/05/02 12:24 PM, k spellman ([EMAIL PROTECTED]) wrote: > The code for form.html is > > and the code for the HandleForm.php is > > > > Form Results > > > > /* This page receives and handles the data generated > by "form.html". */ > print "Your first name is $FirstName.\n"; > print "Your last name is $LastName.\n"; > print "Your E-mail Address is $Email.\n"; > print "This is what you had to say:\n > $Comments\n"; > > ?> > > If you're running PHP4.2 on a new server (1st install), $FirstName will not work, because register_globals is probably set to Off in your php.ini file. Try this: Form Results \n"; print "Your last name is {$_POST['$LastName']}.\n"; print "Your E-mail Address is {$_POST['$Email']}.\n"; print "This is what you had to say:\n {$_POST['$Comments']}\n"; ?> You have to get the vars out of the $_POST array, not straight out of the vars like $FirstName. It may seem like more work, but since you're new to PHP, now would be the perfect time to get used to the new method, since it's more secure. If you find it a little messy though, you could also try: \n"; print "Your last name is {$LastName}.\n"; print "Your E-mail Address is {$Email}.\n"; print "This is what you had to say:\n {$Comments}\n"; ?> Which is a little closer to what you had, with 4 lines added to the top. I wrap $vars within "strings" in {these brackets}, because it makes complex stuff later on easier & clearer. It's a good habbit to get into. The above code should work now. If it doesn't, email me and i'll run some tests on it. Justin French Creative Director http://Indent.com.au > > And the book suggested POST instead of GET because it > is stated that Post is secure and GET is not. > > Thanks, > spellman > > --- Justin French <[EMAIL PROTECTED]> wrote: >> Show us the code for processing the form! >> >> My guess is your book uses code with $firstname >> rather than >> $_POST['firstname']... given that your version of >> PHP is probably new >> (4.2.x), register_globals is prolly OFF in your >> php.ini config file. >> >> Justin >> >> >> >> on 16/05/02 12:13 PM, k spellman >> ([EMAIL PROTECTED]) wrote: >> >>> Just opened a "How to" book today on PHP. Already >>> having problems and wouldn't mind an extra set of >>> eyes. My basic form does not produce results.Any >>> thoughts on this one? >>> >>> http://www.hermengoode.com/php/form.html >>> >>> Thanks! >>> spellman >>> >>> __ >>> Do You Yahoo!? >>> LAUNCH - Your Yahoo! Music Experience >>> http://launch.yahoo.com >> > > > __ > Do You Yahoo!? > LAUNCH - Your Yahoo! Music Experience > http://launch.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A bit confused
Okay, You REALLY need to read the manual(s) before posting. A quick search for MyISAM on the MySQL site would have told you what you need to know. a) it's mysql b) it's easy to find the answer yourself So don't ask here. Justin on 28/05/02 10:22 PM, r ([EMAIL PROTECTED]) wrote: > Hey guys, > I just got this code (from "PHP BlackBook" pg:213") to make a table in MySql > via a PHP script, I though I knew SQL till I saw this > > CREATE TABLE sh_indexPages ( > ID int(11) NOT NULL auto_increment, > Page varchar(255) NOT NULL default '', > PRIMARY KEY (ID) > ) TYPE=MyISAM; > > What the heck is the "TYPE=MyISAM;" mean? > And to top it all it seems to be running in PHPMyAdmin! > > Any ideas? > > Kindly reply, > -Ryan > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Include load question (newbie)
> I have two files (f1.php,f2.php) that each take about 90% > and 90% of differient functions from the first > file(func.php), would my files (f1.php,f2.php) load faster > if I defined the functions in each file instead of including > it or is this helping? It might, but the difference isn't likely to be significant. If speed is a problem then you need to figure out where your bottle neck is - unless they are huge files the problem is unlikely to be in loading of individual file themselves. CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Include load question (newbie)
Hey all, I have a file that is totally filled with PHP functions, its around 15 k. (func.php) I have two files (f1.php,f2.php) that each take about 90% and 90% of differient functions from the first file(func.php), would my files (f1.php,f2.php) load faster if I defined the functions in each file instead of including it or is this helping? Any help appreciated. -Ryan. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] A bit confused PART 2
Greetings All, Thank you for guiding me in the last doubt and special thanks to Juan Pablo for the link. Just one question, since I have taken out that MyISAM bit when i made the table/s, so will it be missing anything? Com on guys, just on this list I get a load of emails I cant join the MySql list too, my mailbox will DI, and anyway this code was in a PHP book Cheers, -Ryan. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] A bit confused
have a look on the mysql list for this :).. -Original Message- From: r [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 28 May 2002 10:22 PM To: [EMAIL PROTECTED] Subject: [PHP] A bit confused Hey guys, I just got this code (from "PHP BlackBook" pg:213") to make a table in MySql via a PHP script, I though I knew SQL till I saw this CREATE TABLE sh_indexPages ( ID int(11) NOT NULL auto_increment, Page varchar(255) NOT NULL default '', PRIMARY KEY (ID) ) TYPE=MyISAM; What the heck is the "TYPE=MyISAM;" mean? And to top it all it seems to be running in PHPMyAdmin! Any ideas? Kindly reply, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] A bit confused
Hey guys, I just got this code (from "PHP BlackBook" pg:213") to make a table in MySql via a PHP script, I though I knew SQL till I saw this CREATE TABLE sh_indexPages ( ID int(11) NOT NULL auto_increment, Page varchar(255) NOT NULL default '', PRIMARY KEY (ID) ) TYPE=MyISAM; What the heck is the "TYPE=MyISAM;" mean? And to top it all it seems to be running in PHPMyAdmin! Any ideas? Kindly reply, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] at least right code is here :)
thanks again echo " width="; echo $size[0]; echo ";"; I mean, problem's solution is "echo" :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php's variables & javascript
Thanyou very much guys, I is working boyan, but your suggestion seems like a long way? he? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php's variables & javascript
Try something like that: "; echo "width="; echo $size; echo ";"; echo ""; ?> Cheers, boyan -- Boyan Nedkov [EMAIL PROTECTED] > -Original Message- > From: burak delice [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 27, 2002 11:59 PM > To: [EMAIL PROTECTED] > Subject: [PHP] php's variables & javascript > > > hi everyone, > > I want to make a php that include javascript that use a php > variable. Code is below: > > $size = GetImageSize ("images/$resim"); > echo " > wdth=";$size;echo";"; > echo ""; > ?> > > (I am calling that php file as below) > http://localhost/Aksu/web/getimage.php?> resim=K00.jpg > > But > explore gives me an javascript error that > syntax error. Why? and how can do my purpose? > > thanks > burak delice > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OT - 1u linux web servers...
Hi folks, sorry for the off topic post. I'm a semi frustrated cobalt xtr user, and I'm thinking about another 1u rack mount server. Does anyone have any experience building them? Any good vendors for parts? Any how-to websites/books? Any other brands you'd recommend? The cobalts seem to work ok, but I'm running into some real limitations with their interface and not being able to update php, mysql, etc. Thanks, Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php's variables & javascript
On Tuesday 28 May 2002 05:59, burak delice wrote: > I want to make a php that include javascript that use a php variable. Code > is below: No need to post twice. > $size = GetImageSize ("images/$resim"); > echo " > wdth=";$size;echo";"; > echo ""; > ?> That code looks broken to me. > (I am calling that php file as below) > http://localhost/Aksu/web/getimage.php?resim=K00.jpg > > But explore gives me an javascript error that syntax error. Why? and how > can do my purpose? Did you use view source (ALT-V, C) to see what is actually in the " ... " ? -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* "The lymbic system in my brain is so electrically active, it qualifies as a third brain. Normal humans have two brains, left and right. - Jeff Merkey */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php's variables & javascript
burak delice wrote: >hi everyone, > >I want to make a php that include javascript that use a php variable. Code >is below: > >$size = GetImageSize ("images/$resim"); >echo " > wdth=";$size;echo";"; > echo ""; >?> > > I didn't get the third line.. That's no JavaScript.. Isn't this supposed to be something like: echo "document.writeln('width=\"$size\"');"; echo ""; ?> -- Best Regards, Sagie Maoz [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fread and session vars
John, Thanks, the code does actually read this but I'm afraid I removed it so the servers ip is not exposed to the mail list. The script runs correctly and opens and creates the page, however it cannot find the include files I have in the page as the variable $SITE_DOCUMENT_ROOT requires a session variable. Zac - Original Message - From: "John Holmes" <[EMAIL PROTECTED]> To: "'Zac Hillier'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, May 27, 2002 7:12 PM Subject: RE: [PHP] fread and session vars > Hi. > > > Code: > > > > generate page script: > > > > $pge = create-page.php > > $pd = $HTTP_GET_VARS['pd']; > > > > # Set the files > > $crtPge = "/". $pge ."?pd=". $pd; # the url of the dynamic page to > write > > the > > output page > > $targetfilename = $SITE_ DOCUMENT_ROOT . $outPge; # the output page > > > > # delete previous version of temp file if it exists > > @unlink('temp.html'); > > > > # open the dynamic page into dynpage > > $dynpage = fopen($crtPge, 'r'); > > Here it looks like $crtPge is going to be equal to something like > "/create-page.php?pd=xx". If you want to open it via a URL, you need to > add the HTTP:// and server name to it. > > $crtPge = http:// . $HTTP_SERVER_VARS['SERVER_NAME'] . "/" . $pge . > "?pd=" . $pd; > > Something like that...then fopen() will work. > > ---John Holmes... > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newbie question about PHP and Oracle
a VERY newbie question, just how do I get data into a listbox? In mysql it was pretty easy with mysql_fetch_row, but for oracle I am totally lost. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Include directory
Hi, I'm trying to setup an include directory for my site using .htaccess but I'm having some difficulties. The command I'm typing is as follows: php_value include_dir ".:/path/to/my/site/includes" When I try this, I get an error 500 with Apache. Have I typed something wrong? Here's my setup: Apache 1.3.12 PHP 3.0.18 Sun Solaris Thanks -Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] javascript and php
hi everyone, I want to make a php that include javascript that use a php variable. Code is below: wdth=";$size;echo";"; echo ""; ?> (I am calling that php file as below) http://localhost/Aksu/web/getimage.php?resim=K00.jpg But explore gives me an javascript error that syntax error. Why? and how can do my purpose? thanks burak delice -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php's variables & javascript
hi everyone, I want to make a php that include javascript that use a php variable. Code is below: wdth=";$size;echo";"; echo ""; ?> (I am calling that php file as below) http://localhost/Aksu/web/getimage.php?resim=K00.jpg But explore gives me an javascript error that syntax error. Why? and how can do my purpose? thanks burak delice -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Logout
On Mon, 27 May 2002, Jonas Hörnblad wrote: > Hi there, > I've only been PHPing for some week and ofcours I've ran into my first two > problems. > > 1. I'm building this community thing and I have a text file with the users > that is currently logged in. When they press logout there name is deleted > from the textfile, but if they just close there browser or surf to another > site there name is still in the text-file until they log out next time. Any > ideas how to avoid this? Dump the text file and use sessions. Will make your life easier and they provide easy solutions to problems like "logout". > 2. How do I sort an array? I've tried array_multisort(); but I can only > "ascci-sort" my array which makes R come before j and so on. How do I sort > alphabeticly and not case sencetive ascci? There are plenty of XXsort() functions in the manual (hint!hint!). Your case needs natcasesort(). Or you can do it manually with usort() and implement your own comparision function. cheers, thalis > > Thanks > /Jonas > > > _ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Logout
Jonas ? wrote: > 1. I'm building this community thing and I have a text file with the > users that is currently logged in. When they press logout there name > is deleted from the textfile, but if they just close there browser or > surf to another site there name is still in the text-file until they > log out next time. Any ideas how to avoid this? What you should do is save for each user the last time he was "seen" in the site: the value of this time is updated for each page he or she loads. Then, when checking to see if a user is currently logged in, you check how long ago was he last seen. If it was more than X seconds/minutes/etc. (this is for you to set), she is considered "offline" and you can remove him from the file. Best Regards, Sagie Maoz [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Logout
Hi there, I've only been PHPing for some week and ofcours I've ran into my first two problems. 1. I'm building this community thing and I have a text file with the users that is currently logged in. When they press logout there name is deleted from the textfile, but if they just close there browser or surf to another site there name is still in the text-file until they log out next time. Any ideas how to avoid this? 2. How do I sort an array? I've tried array_multisort(); but I can only "ascci-sort" my array which makes R come before j and so on. How do I sort alphabeticly and not case sencetive ascci? Thanks /Jonas _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 27 May 2002 21:01:57 -0000 Issue 1370
php-general Digest 27 May 2002 21:01:57 - Issue 1370 Topics (messages 99345 through 99398): Re: Ora_Fetch_Into function problem 99345 by: Michael P. Carel 99347 by: Michael Virnstein Re: Program execution stops at exec() 99346 by: Tom Mikulecky 99356 by: David Freeman 99359 by: Tom Mikulecky user password 99348 by: Wayne 99368 by: John Holmes Re: Simulating a FORM POST thing (HELP!) 99349 by: Peter simple array question 99350 by: Jose Jeria 99351 by: Billy S Halsey get the filename of an include'd/require'd file? 99352 by: John Ericson problems with storing image data to the db 99353 by: andy Re: gmtime? 99354 by: Ford, Mike [LSS] 99357 by: Jens Lehmann 99358 by: Matt Friedman 99361 by: Ford, Mike [LSS] 99367 by: Jens Lehmann Re: ini_set('register_globals',0) doesn't work 99355 by: Jens Lehmann random HTML pages from PHP calls 99360 by: r 99363 by: Justin French time 99362 by: Chris Grigor 99364 by: Jason Wong 99366 by: Roman Duriancik Re: Parse Error(Newbie) 99365 by: John Holmes fread and session vars 99369 by: Zac Hillier 99374 by: John Holmes 99375 by: Zac Hillier 99387 by: John Holmes Re: Need some advice concerning forms (multi select pulldown) and arrays 99370 by: John Holmes pdf_get_info 99371 by: Dietmar Thamm 99372 by: Henrik Hansen 99376 by: Dietmar Thamm 99378 by: Henrik Hansen Xdebug 0.8.0 announcement 99373 by: Derick Rethans Thread safe 99377 by: r 99385 by: J Smith Function registration failed - duplicate name - mysql_connect in Unknown on line 0 99379 by: Ben Kennish request object 99380 by: Jose Jeria 99382 by: Jose Jeria 99388 by: John Holmes Session's is slowing the page ?? 99381 by: Dima Dubin 99384 by: J Smith Is there a function getSize() of ming or libswf? 99383 by: Augusto Cesar Castoldi PHP script and external C program 99386 by: ing.Martin Prá¹ek 99389 by: John Holmes Entering password on a command line 99390 by: Darren Gamble PhP, mysql and pictures 99391 by: Ragnar 99392 by: John S. Huggins PHP 4.1.2 ignores ini-set on max_upload_filesize 99393 by: DevilKin 99398 by: Rasmus Lerdorf mail() function 99394 by: Jochem Kempe 99395 by: Pushkar Pradhan 99396 by: Pushkar Pradhan IMAP quota support 99397 by: Luiz Lima Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- ooopp...sorry just found out why. I just need to have Ora_Commit() function after all the queries to totally set the data to the database. Im querying a data which is not commited yet to the oracle database. Sorry for that I'm just a newbie in oracle. Thanks to all.. mike > I've recently found out that the Ora_Fetch_Into function cannot get a small > value of the tables data. We've tried to fetch other tables which have a > large amount data ,and it succeeds. The queried values echoed successfully. > Is there any idea why? im using PHP4.2.1 oracle7.3.3 > > > Regards, > Mike > > > > > > > thanks miguel but i've already checked it, i've included return values > > checking where it stop. Here's my full source test script. > > There where no Ora_Error_Code returned. > > > > > PutEnv("ORACLE_SID=PROD"); > > PutEnv("ORACLE_HOME=/u01/app/oracle/product/7.3.3_prod"); > > $connection = Ora_Logon("apps","apps"); > > if($connection==false){ > > echo Ora_ErrorCode($connection).":". > Ora_Error($connection).""; > > exit; > > } > > $cursor= Ora_Open($connection); > > if($cursor==false){ > > echo Ora_ErrorCode($connection).":". > Ora_Error($connection).""; > > exit; > > } > > $query = "select * from mikecarel"; > > //$query = "select table_name from all_tables"; > > $result = Ora_Parse($cursor,$query); > > if($result==false){ > > echo Ora_ErrorCode($connection).":". > Ora_Error($connection).""; > > exit; > > } > > $result=Ora_Exec($cursor); > > if($result==false){ > > echo Ora_ErrorCode($connection).":". > Ora_Error($connection).""; > > exit; > > } > > echo""; > > echo"Full NameEmail Address"; > > //$values=array(mike, tess); > > while(Ora_Fetch_Into($cursor,$values)){ > > $name = $values[0]; > > $email = $values[1]; > > echo "$name$email"; > > echo "$email"; > > print($name); > > $result =1; > > } > > if(!$result==1) print("no result"); > > echo""; > > > > ora_close($cursor); > > ora_logoff($connection); > > ?> > > > > > > mike > > > > > > >
Re: [PHP] PHP 4.1.2 ignores ini-set on max_upload_filesize
You cannot change the upload limit in your script because the file upload happens before your script is executed. You need to set it in your php.ini, httpd.conf or .htaccess -Rasmus On Mon, 27 May 2002, DevilKin wrote: > Hello, > > As stated in the topic: PHP 4.1.2 balantly ignores max_upload_filesize > paramter. I've been trying - without solution - to get php 4.1.2 (compiled as > module for apache 1.3.xx) to accept a file upload (via post) of more than 2 > mb. Files <= 2mb work great, but when I go above this php returns > is_uploaded_file() with false, even tho the file is correct. It also doesn't > seem to be saved correctly. > > I am not using ANY ini-file, but I've been able to reproduce this behaviour > with an ini file (on a different system, same php/apache versions) > > Is there something I'm missing here? > > Thanks! > > DK > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] IMAP quota support
I managed to be somewhat succesfull while trying to get PHP4 and IMP to get quota information from my IMAP server (Vircom's VOPMail for Windows NT/2000 - available from www.vircom.com). I changed the script a little bit to talk right to Vircom's IMAP server but its response differs a little from what RFC 2087 says. While Vircom replies with (STORAGE 10 20480 TRIGGER 0 17408), PHP4's get_imap_quota expects (STORAGE 10 20480), without the TRIGGER. The result is that PHP4 is considering the usage to be 0 and the quota 17408. Looks like it gets the last two numbers it finds and uses it, but I'm not sure... I'm no C programmer and couldn't actually find the way that PHP4 and/or WU IMAP c-client tries to understand the output from the server. So, could anyone point to me the way to change this behavior and understand my server's information? -- Luiz Lima Image Link Internet http://www.imagelink.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() function
I think you meant changing \r\n doesn't work? Did you make necessary changes to the php.ini file: [mail function] ; For Win32 only. SMTP = localhost ; For Win32 only. sendmail_from = [EMAIL PROTECTED] ; For Unix only. You may supply arguments as well (default: 'sendmail -t -i'). ;sendmail_path = Give the path of your sendmail, finally if nothing works it means apache 2.0 is the problem, it means many things in php won't work with it. > Alright, so it doesn't work with my version of php. How can I make it work? > > Jochem > > > From: Pushkar Pradhan <[EMAIL PROTECTED]> > To: Jochem Kempe <[EMAIL PROTECTED]> > CC: [EMAIL PROTECTED] > Subject: Re: [PHP] mail() function > Date: Mon, 27 May 2002 14:58:37 -0500 (CDT) > > There is also a user note at the bottom of the documentation: > I tried to put "\r\n" at the end of each header line and Netscape > 4.7 didn't work properly. I changed to "\n" and it worked well. > So, I tried it on Outlook Express 5.5 and Eudora 5.1 and it worked too > with "\n" only. > > I hope it helps... > > If this doesn't help, then maybe this is due to apache 2.0 since many php > scripts are not working on apache 2.0 > > Dear fellars at php.net > > > > It appears to me that there is something wrong with the mail() function, > > > > I've got an Apache 2.0.36 webserver in an Windows XP environment, > > now everythin seems to work just fine until I try to execute this: > > > > mail("[EMAIL PROTECTED]", "My Subject", "Line 1\r\nLine 2\r\nLine3"); > > > > it's almost the same code as on your web site but I changed the > > [EMAIL PROTECTED] to my own e-mail adress so I would be able to see if > > I've got the mail. I tried severeal ways (somethin with IMAP or such?) > but > > since I'm a php newbie it is quite hard to find understandable > > documentation. > > > > I hope you are well informed by now and you can come up with some sort of > an > > answer. > > > > Greetings, > > > > Jochem Kempe > > > > > > > > > > _ > > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -Pushkar S. Pradhan > > > > > > _ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > -Pushkar S. Pradhan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() function
There is also a user note at the bottom of the documentation: I tried to put "\r\n" at the end of each header line and Netscape 4.7 didn't work properly. I changed to "\n" and it worked well. So, I tried it on Outlook Express 5.5 and Eudora 5.1 and it worked too with "\n" only. I hope it helps... If this doesn't help, then maybe this is due to apache 2.0 since many php scripts are not working on apache 2.0 > Dear fellars at php.net > > It appears to me that there is something wrong with the mail() function, > > I've got an Apache 2.0.36 webserver in an Windows XP environment, > now everythin seems to work just fine until I try to execute this: > > mail("[EMAIL PROTECTED]", "My Subject", "Line 1\r\nLine 2\r\nLine3"); > > it's almost the same code as on your web site but I changed the > [EMAIL PROTECTED] to my own e-mail adress so I would be able to see if > I've got the mail. I tried severeal ways (somethin with IMAP or such?) but > since I'm a php newbie it is quite hard to find understandable > documentation. > > I hope you are well informed by now and you can come up with some sort of an > answer. > > Greetings, > > Jochem Kempe > > > > > _ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -Pushkar S. Pradhan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() function
Dear fellars at php.net It appears to me that there is something wrong with the mail() function, I've got an Apache 2.0.36 webserver in an Windows XP environment, now everythin seems to work just fine until I try to execute this: mail("[EMAIL PROTECTED]", "My Subject", "Line 1\r\nLine 2\r\nLine3"); it's almost the same code as on your web site but I changed the [EMAIL PROTECTED] to my own e-mail adress so I would be able to see if I've got the mail. I tried severeal ways (somethin with IMAP or such?) but since I'm a php newbie it is quite hard to find understandable documentation. I hope you are well informed by now and you can come up with some sort of an answer. Greetings, Jochem Kempe _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 4.1.2 ignores ini-set on max_upload_filesize
Hello, As stated in the topic: PHP 4.1.2 balantly ignores max_upload_filesize paramter. I've been trying - without solution - to get php 4.1.2 (compiled as module for apache 1.3.xx) to accept a file upload (via post) of more than 2 mb. Files <= 2mb work great, but when I go above this php returns is_uploaded_file() with false, even tho the file is correct. It also doesn't seem to be saved correctly. I am not using ANY ini-file, but I've been able to reproduce this behaviour with an ini file (on a different system, same php/apache versions) Is there something I'm missing here? Thanks! DK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PhP, mysql and pictures
On Mon, 27 May 2002, Ragnar wrote: >-Is it possible to display images in a browser that are stored as a blob >-column in a mysql table? Or is it better to store images in a direcotory and >-display them "from" there? IMHO it is better to let a file system store the image files and let MySQL reference the file names and do overall organization. However, it is possible to store the image in MySQL and have it displayed in a browser. >- >--Ragnar >- >- >- >--- >-PHP General Mailing List (http://www.php.net/) >-To unsubscribe, visit: http://www.php.net/unsub.php >- ** John Huggins VANet [EMAIL PROTECTED] http://www.va.net/ ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PhP, mysql and pictures
Is it possible to display images in a browser that are stored as a blob column in a mysql table? Or is it better to store images in a direcotory and display them "from" there? -Ragnar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Entering password on a command line
Good day, I have a command-line PHP script that connects to an LDAP database and does some queries. To increase security, I would like to not put the bind password into the program, and instead have the user type it in. But, I'd like to have this done so that the password is not echo'd to the screen. Lots of searching has shown that people have done something similar in C and Perl by closing the stdout channel. But, I haven't found anything similar in PHP (and I would need to reopen the channel again somehow afterwards anyway). Does anyone have a suggestion on how this might be accomplished? In the meantime I'll just put the password in the program, but, I'd like to learn how this could be done. Thanks in advance, Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP script and external C program
I don't have example code, but what you want is the exec() function. Be careful passing user variables to a command line program. www.php.net/exec ---John Holmes... > -Original Message- > From: ing.Martin Prášek [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 27, 2002 1:21 PM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP script and external C program > > Problem. I have a php 4.0.6. on linux as Apache module. I need to do > folowing: > > I have in my script some value, for example "$value" > and > in /bin on my linux box c language program called "something". (I need > speed) . > > I need to parse $value thru stdin /bin/something program to get from its > stdout a $parsed_value. > > How to run external program (for example /bin/something ), write to its > STDIN $value and then read from its STDOUT to variable $parsed_value ? > > > Example code needed. > > > thanx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] request object
It's called $HTTP_POST_VARS or $HTTP_GET_VARS, depending on the method of your form. It's an array that holds all of the data that was send through the form. In PHP 4.1+ you can use $_POST and $_GET. Use print_r($HTTP_POST_VARS) to see the contents of it in one of your scripts. ---John Holmes... > -Original Message- > From: Jose Jeria [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 27, 2002 12:23 PM > To: [EMAIL PROTECTED] > Subject: [PHP] request object > > I have a page that creates form elements dynamically. Every time the > amount > of form elements is different. > > So to the page that I submit to I need to see how the whole request > object. > Is that possible? > > /Jose > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] fread and session vars
Hi. > Code: > > generate page script: > > $pge = create-page.php > $pd = $HTTP_GET_VARS['pd']; > > # Set the files > $crtPge = "/". $pge ."?pd=". $pd; # the url of the dynamic page to write > the > output page > $targetfilename = $SITE_ DOCUMENT_ROOT . $outPge; # the output page > > # delete previous version of temp file if it exists > @unlink('temp.html'); > > # open the dynamic page into dynpage > $dynpage = fopen($crtPge, 'r'); Here it looks like $crtPge is going to be equal to something like "/create-page.php?pd=xx". If you want to open it via a URL, you need to add the HTTP:// and server name to it. $crtPge = http:// . $HTTP_SERVER_VARS['SERVER_NAME'] . "/" . $pge . "?pd=" . $pd; Something like that...then fopen() will work. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP script and external C program
Problem. I have a php 4.0.6. on linux as Apache module. I need to do folowing: I have in my script some value, for example "$value" and in /bin on my linux box c language program called "something". (I need speed) . I need to parse $value thru stdin /bin/something program to get from its stdout a $parsed_value. How to run external program (for example /bin/something ), write to its STDIN $value and then read from its STDOUT to variable $parsed_value ? Example code needed. thanx
[PHP] Re: Thread safe
You could use a transaction block if your database supports it, or just use some sort of auto-numbering field, such as SERIAL in Postgres, auto_increment in MySQL, etc. Then you wouldn't have to worry about retrieving the next cno before inserting a new row. J R wrote: > Hi, > In java servlets I used to use a "synchronised" block of code to make sure > it was thread safe...how do i do this in PHP? > > Heres what should be thread safe > > { > $r=select max(cno)+1 from MyTable; > (then i insert into the table the new cno plus my name) > insert into mytable ($r,'myname'); > } > How to do this and make sure its thread safe? > > Any help appreciated, > -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Session's is slowing the page ??
It might have something to do with the way the session extension in PHP performs garbage collection. There's a setting in php.ini that basically controls how often garbage collection is performed. The value is a percentage, and determines how often the GC should be done over a random number of session_start() requests. If GC is invoked, the garbage collector will start to delete all of the expired session files in your session directory. If there's a lot of them, it might take longer to load the page that the garbage collection was started on. Since the garbage collector is called at random based on the aforementioned setting, not every page will be affected. The problem could probably be cut down by increasing the value of the GC setting, as fewer files would need to be deleted with each GC sweep, as more GC sweeps will be called overall. That's just a guess, though. J Dima Dubin wrote: > Hello, > I have very wierd problem : > I use session to manage users and I have this structure of the page : > - > include("db.php"); > include("header.php"); > bla bla > include("footer.php"); > - > > in the db.php I have : > > > session_start(); > #some mysql connect stuff > > > I use session with the $_SESSION array (cheking if > registered[isset($_S...)] and registering...) > and all work fine > but sometimes the page loading is very very very slow (and its a really > really fast host) and when I removing session_start(); from the top of the > page, the page load normaly. > > the PHP version is 4.1.1, someone have an idea ? > thanks in advance, > Dima. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is there a function getSize() of ming or libswf?
Hi... Is there a function getSize() of ming or libswf? I want to send Flash imagens to server to put them into HTML, but I need the width and height of the image, and I don`t want to ask this for the user!! thanks, Augusto ___ Yahoo! Encontros O lugar certo para você encontrar aquela pessoa que falta na sua vida. Cadastre-se hoje mesmo! http://br.encontros.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: request object
if I am not mistaken the equivalent in asp is Request.Form(); /j "Jose Jeria" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a page that creates form elements dynamically. Every time the amount > of form elements is different. > > So to the page that I submit to I need to see how the whole request object. > Is that possible? > > /Jose > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session's is slowing the page ??
Hello, I have very wierd problem : I use session to manage users and I have this structure of the page : - include("db.php"); include("header.php"); bla bla include("footer.php"); - in the db.php I have : session_start(); #some mysql connect stuff I use session with the $_SESSION array (cheking if registered[isset($_S...)] and registering...) and all work fine but sometimes the page loading is very very very slow (and its a really really fast host) and when I removing session_start(); from the top of the page, the page load normaly. the PHP version is 4.1.1, someone have an idea ? thanks in advance, Dima. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] request object
I have a page that creates form elements dynamically. Every time the amount of form elements is different. So to the page that I submit to I need to see how the whole request object. Is that possible? /Jose -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: pdf_get_info
Dietmar Thamm <[EMAIL PROTECTED]> wrote: > hmmhh, > > in the PDFlib feature-list there is written > ...process existing PDF documents with the PDF import library PDI... > any ideas what this "pdi" thing is about?? yeah it's not about getting pdf information :( -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Thread safe
Hi, In java servlets I used to use a "synchronised" block of code to make sure it was thread safe...how do i do this in PHP? Heres what should be thread safe { $r=select max(cno)+1 from MyTable; (then i insert into the table the new cno plus my name) insert into mytable ($r,'myname'); } How to do this and make sure its thread safe? Any help appreciated, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: pdf_get_info
hmmhh, in the PDFlib feature-list there is written ...process existing PDF documents with the PDF import library PDI... any ideas what this "pdi" thing is about?? thanx "Henrik Hansen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:<[EMAIL PROTECTED]>... > [EMAIL PROTECTED] (Dietmar Thamm) wrote: > > > hi, > > > > is there still an equivalent function to pdf_set_info() -> pdf_get_info(); > > or another possibility to get the title, subject and author information out > > of an exsiting .pdf-file? > > pdflib dont support getting information AFAIK. > > -- > Henrik Hansen --- jads edv dienstleistungen - dietmar thamm immenhoferstrasse 23 70180 stuttgart phone: +49 (0)711 9641527 mobil: +49 (0)175 4118884 e-mail: [EMAIL PROTECTED] http://www.jads.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fread and session vars
Code: generate page script: $pge = create-page.php $pd = $HTTP_GET_VARS['pd']; # Set the files $crtPge = "/". $pge ."?pd=". $pd; # the url of the dynamic page to write the output page $targetfilename = $SITE_ DOCUMENT_ROOT . $outPge; # the output page # delete previous version of temp file if it exists @unlink('temp.html'); # open the dynamic page into dynpage $dynpage = fopen($crtPge, 'r'); # Check for errors if (!$dynpage) { echo("Unable to load " . $crtPge . ". Static page update aborted!"); exit(); } # function read the data $htmldata = fread($dynpage, 1024*1024); # close the dynamic page fclose($dynpage); # connect to temp file ready to write $tempfile = fopen('temp.html', 'w'); # Check for errors if (!$tempfile) { echo("Unable to open temporary file " . ('temp.html') . " for writing. Static page update aborted!"); exit(); } #write to temp file fwrite($tempfile, $htmldata); # close the temp file fclose($tempfile); etc... === create-page.php: To: "'Zac Hillier'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, May 27, 2002 3:28 PM Subject: RE: [PHP] fread and session vars > Post some code. I don't understand completely what you're trying to do > or how you're trying to do it. > > ---John Holmes... > > > -Original Message- > > From: Zac Hillier [mailto:[EMAIL PROTECTED]] > > Sent: Monday, May 27, 2002 9:20 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] fread and session vars > > > > Hi all, > > > > I'm using the fread function to read one of my php scripts and then > > produce a static page, within this script I'm using session variables. > > > > If I browse to the script normally then all appears to work correctly, > > however when I use the fread function the session variables are not > being > > translated. I've tried adding & SID to the end of the URL but to no > avail. > > Can anyone suggest a course of action. I'm reluctant to produce GET > > variables as there are many variables and this script will need to be > used > > by multiple domains. > > > > Thanks, > > > > Zac > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] fread and session vars
Post some code. I don't understand completely what you're trying to do or how you're trying to do it. ---John Holmes... > -Original Message- > From: Zac Hillier [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 27, 2002 9:20 AM > To: [EMAIL PROTECTED] > Subject: [PHP] fread and session vars > > Hi all, > > I'm using the fread function to read one of my php scripts and then > produce a static page, within this script I'm using session variables. > > If I browse to the script normally then all appears to work correctly, > however when I use the fread function the session variables are not being > translated. I've tried adding & SID to the end of the URL but to no avail. > Can anyone suggest a course of action. I'm reluctant to produce GET > variables as there are many variables and this script will need to be used > by multiple domains. > > Thanks, > > Zac -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Xdebug 0.8.0 announcement
Hello! I'm happy to announce the latest version of the Xdebug extension for PHP 4.2.1 and 4.3.0-dev. This new version has a lot of new and improved functionality. This includes: - improved support for arguments to user defined functions - trace functions to trace function calls during the whole script (including included files) - PHP 4.2.1 compability - support for Windows - support for include, require and eval - new functions for enabling and disabling xdebug from php.ini and the script - new function to return the amount of used memory during script execution There are still a few points left on the road to Xdebug 1.0.0. These will be implemented in the near future: - Support for variable function names - Support for class names - Tracing variables in functions - Profiling You can find the source and binaries of the Xdebug extension at the project site at http://www.jdimedia.nl/xdebug.php. Derick --- Derick Rethans http://www.jdimedia.nl/derick/ JDI Media Solutions http://www.jdimedia.nl/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: pdf_get_info
[EMAIL PROTECTED] (Dietmar Thamm) wrote: > hi, > > is there still an equivalent function to pdf_set_info() -> pdf_get_info(); > or another possibility to get the title, subject and author information out > of an exsiting .pdf-file? pdflib dont support getting information AFAIK. -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] pdf_get_info
hi, is there still an equivalent function to pdf_set_info() -> pdf_get_info(); or another possibility to get the title, subject and author information out of an exsiting .pdf-file? thanx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Need some advice concerning forms (multi select pulldown) and arrays
Shouldn't it be count($_REQUEST['animals']) and count($_REQUEST['animals'][2]), etc... ?? ---John Holmes... > -Original Message- > From: Victor Spång Arthursson [mailto:[EMAIL PROTECTED]] > Sent: Sunday, May 26, 2002 1:29 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] Need some advice concerning forms (multi select > pulldown) and arrays > > Ok, I can't get this right... > > Have the following code: > > >$choices = array(1 => 'dog', 2 => 'cat', 3 => 'mouse', 4 => 'frog'); > > if (is_array($_REQUEST['animals'])) > { > // get the number of selectcases > echo "get the number of selectcases: " . count($animals) . > ""; > > // get the number of provided selects from select with name > "2" > echo "get the number of provided selects from select with name > \"2\": " . count($animals[2]) . ""; > > // test to print some data > echo $animals[2][0]. ""; > echo $animals[2][1]. ""; > echo $animals[2][2]. ""; > echo $animals[2][3]. ""; > } >?> > > > dog > cat > mouse > frog > > > > dog > cat > mouse > frog > > > > Why does it not work? > > // get the number of selectcases > echo "get the number of selectcases: " . count($animals) . > ""; > > This works great > > // get the number of provided selects from select with name > "2" > echo "get the number of provided selects from select with name > \"2\": " . count($animals[2]) . ""; > > But this doesn't... > > Thankful for any help, > > /Victor > > On Sunday, May 26, 2002, at 05:35 PM, John Holmes wrote: > > > You can supply an "whateverID" for the select if you want to. > > > > > > > > > > > > > > > > > > etc... > > > > That will give you an array $select[] on the processing page. If the > > selects are multi-selects, you'll have a multidimensional array. The > > first chosen element in the first select box can be referenced like this > > > > $select[0][0] > > > > You can get a count of how many select boxes there are by doing > > > > count($select); > > > > You can get a count of how many elements were selected within a select > > you can do this: > > > > count($select[x]); > > > > Where x is the number of the select box you want to know about. > > > > Confusing, eh? > > > > ---John Holmes... > > > >> -Original Message- > >> From: Victor Spång Arthursson [mailto:[EMAIL PROTECTED]] > >> Sent: Sunday, May 26, 2002 7:44 AM > >> To: [EMAIL PROTECTED] > >> Subject: Re: [PHP] Need some advice concerning forms (multi select > >> pulldown) and arrays > >> > >> > >> On Sunday, May 26, 2002, at 01:14 PM, John Holmes wrote: > >> > >>> Just give each select its own name. > >> > >> Can't do that, don't know from time to time how many there'll be > > And > >> I've to have some case which iterates on the following page... > >> > >>> Or name them all the same followed > >>> by an [] and you'll end up with a multi-dimensional array if things > > go > >>> right... > >> > >> Sounds better - but I've a lot of items and I'ld like to know which of > >> the arrays that go to which item... Can I just write > >> name=array[whateverid] and then in some way reveal the whateverid's? > >> > >> Sincerely > >> > >> Victor > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fread and session vars
Hi all, I'm using the fread function to read one of my php scripts and then produce a static page, within this script I'm using session variables. If I browse to the script normally then all appears to work correctly, however when I use the fread function the session variables are not being translated. I've tried adding & SID to the end of the URL but to no avail. Can anyone suggest a course of action. I'm reluctant to produce GET variables as there are many variables and this script will need to be used by multiple domains. Thanks, Zac
RE: [PHP] user password
When you get this working, can you post the IP address or web address of your server? Thanks... ---John Holmes... > -Original Message- > From: Wayne [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 27, 2002 5:55 AM > To: [EMAIL PROTECTED] > Subject: [PHP] user password > > Hi Guys, > > Does anybody know how I can set a users password with php? > I tried using a system call with sudo but I get the error cannot lock > password file. I need to use php to change a users account password. > Any ideas? > > Thanks, > Wayne > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] gmtime?
> > -Original Message- > > From: Jens Lehmann [mailto:[EMAIL PROTECTED]] > > Sent: 27 May 2002 12:48 > > > > > > -Original Message- > > > > From: Jens Lehmann [mailto:[EMAIL PROTECTED]] > > > > Sent: 24 May 2002 20:31 > > > > > > > > time() returns the number of seconds since the Unix Epoch to > > > > the current > > > > local time > > > > > > > > gmtime() should return the number of seconds since the Unix > > > > Epoch to the > > > > current GM-time > > > > > > > > Do you understand now? > > > > > Uh, no, actually now I'm more confused! > > > > I can understand that you're confused. :-) Or am I? > > > > > As I understand it, a Unix timestamp is *always* the number > > > of seconds since 1-Jan-1970 GMT ("the Unix epoch"), and > > > so is always a GMT time. > > > > Imho no, because 1-Jan-1970 GMT is just the "starting point", > > the result depends on which timezone your server is located in. > > Please correct me if I'm wrong here! > > Well, I'm not sure, because I think we're talking at cross purposes. I'm *still* not sure what you want gmtime() to achieve that's different from time(), because, as far as I can see, the two scenarios you describe above actually return the same value. Or, to put it another way, because a timestamp is *always in GMT*, it returns the time since 1-Jan-1970 00:00:00, full stop, period, end of story. In other words, timestamps operate in a single timezone, and it's up to anything else that works with a timestamp to do the timezone (and daylight-savings) corrections. (This is also why you get the anomaly of 23- and 25-hour days in areas which have daylight-savings timeshifts.) > > Let's take some detailed examples, and maybe you can explain what you're trying to get with your gmtime() (and why!): > > In a purely GMT zone, with local time 27-May-2002 12:00:00, the UNIX timestamp is 1022500800. > > In a nominally GMT zone, but with daylight-savings in effect (such as British Summer Time!), with local time 27-May-2002 13:00:00, the UNIX time stamp for this is also 1022500800. > > Likewise, in a GMT+0200 zone, a local time of 27-May-2002 14:00:00 also gives a timestamp of 1022500800. > > In fact, this same timestamp of 1022500800 also represents all of these local times: > > 27-May-2002 04:00 -0800 > 27-May-2002 07:00 -0500 > 27-May-2002 17:00 +0500 > 27-May-2002 23:00 +1100 > > and even such oddities as: > > 27-May-2002 21:30 (Western Australia / Northern Territory) > > Thus, given the timestamp of 1022500800, it's the job of date() to determine the correct timezone and daylight-savings offset and apply them before formatting the output; gmdate() just formats it without applying any offsets. Likewise, mkdate() and gmmkdate() translate the other way respectively with and without timezone correction. > > Forgive me if I've gone on at what seems like excessive length, but I just wanted to make sure we both know exactly what it is we're talking about! > > Cheers! > > Mike > @matt&mike: Thank you for your explanations. I'm a bit sorry for having asked such a question. The deeper I thought about it the more confused I was. I see now that there's no sense in a function like gmtime(). Sorry. Jens -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] time
try echo Date("H:i:s"); roman -Original Message- From: Chris Grigor [mailto:[EMAIL PROTECTED]] Sent: Monday, May 27, 2002 2:43 PM To: [EMAIL PROTECTED] Subject: [PHP] time howdi all anyone know how to get a simple time print ? all the functions I have looked at gmtime() time() dont give the right thing ... all I want is a simple time print e.g 17:51 I know that there is an easy way, Im just missing it somewhere ... Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Parse Error(Newbie)
Also note that variables are case sensitive in PHP. So $_get and $_GET are not the same. If you're using the new "super-global" variables on PHP, then you need to use $_GET['id']... ---John Holmes... > -Original Message- > From: Miguel Cruz [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 27, 2002 2:18 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Parse Error(Newbie) > > On Mon, 27 May 2002 [EMAIL PROTECTED] wrote: > > I know it is probably something obvious but the following gives me a > > parse error and as a newbie I am having trouble locating it. > > > > $query = "select * from news WHERE id = "$_get['id']""; > > A lot of people have answered this already, but just for a little more > clarification, consider this: > > The reason the computer requires you to surround a string with quotes is > so that it knows where the string begins and ends. > > If you put quotes in the middle of the string, it thinks those mark the > end; why would it think otherwise, since that's what quotes are for. > > So people have provided you with various solutions for this. Each of them > involve in some way indicating more specifically what's going on. Either > you use a different kind of quotes (if you started the string with single > quotes, it will let you put double quotes inside it without getting > confused, and vice versa), or you use the backslash character before > internal quotes. Backslash is the "escape" character which in this case > tells the parser to ignore the special meaning of the quote that follows. > So your line could have been written in any of the following ways: > > $query = "select * from news WHERE id = '{$_get['id']}'"; > $query = "select * from news WHERE id = \"{$_get['id']}\""; > $query = 'select * from news WHERE id = "' . $_get['id'] . '"'; > > miguel > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] time
On Monday 27 May 2002 20:42, Chris Grigor wrote: > howdi all > > anyone know how to get a simple time print ? all the functions I have > looked at gmtime() time() dont give the right thing ... all I want > is a simple time print e.g 17:51 > > I know that there is an easy way, Im just missing it somewhere ... date() ? -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Every time I look at you I am more convinced of Darwin's theory. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] random HTML pages from PHP calls
What's the connection between the id and the random pages? if you had 10 "html page" file names in a MySQL table, or an array, you'd be able to pick one of them at random and include it. eg SELECT file_name FROM files ORDER BY RAND() LIMIT 1 never had to do it with an array, but i'm guessing array_rand() is what you wanna look at http://www.php.net/manual/en/function.array-rand.php justin french on 28/05/02 11:19 AM, r ([EMAIL PROTECTED]) wrote: > Hey all, > > I'm calling a PHP "GimmeRandom.php?id=35557" and what this page does is take > the "id" and update the number in the database by +1 (till here no problem) > then what its supposed to do is give me ANY ONE of 10 prewritten html pages > in a random order. > > I know this is pretty easy but my brain just aint working today > > Cheers, > -Ryan. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] time
howdi all anyone know how to get a simple time print ? all the functions I have looked at gmtime() time() dont give the right thing ... all I want is a simple time print e.g 17:51 I know that there is an easy way, Im just missing it somewhere ... Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] gmtime?
> -Original Message- > From: Jens Lehmann [mailto:[EMAIL PROTECTED]] > Sent: 27 May 2002 12:48 > > > > -Original Message- > > > From: Jens Lehmann [mailto:[EMAIL PROTECTED]] > > > Sent: 24 May 2002 20:31 > > > > > > time() returns the number of seconds since the Unix Epoch to > > > the current > > > local time > > > > > > gmtime() should return the number of seconds since the Unix > > > Epoch to the > > > current GM-time > > > > > > Do you understand now? > > > Uh, no, actually now I'm more confused! > > I can understand that you're confused. :-) Or am I? > > > As I understand it, a Unix timestamp is *always* the number > > of seconds since 1-Jan-1970 GMT ("the Unix epoch"), and > > so is always a GMT time. > > Imho no, because 1-Jan-1970 GMT is just the "starting point", > the result depends on which timezone your server is located in. > Please correct me if I'm wrong here! Well, I'm not sure, because I think we're talking at cross purposes. I'm *still* not sure what you want gmtime() to achieve that's different from time(), because, as far as I can see, the two scenarios you describe above actually return the same value. Or, to put it another way, because a timestamp is *always in GMT*, it returns the time since 1-Jan-1970 00:00:00, full stop, period, end of story. In other words, timestamps operate in a single timezone, and it's up to anything else that works with a timestamp to do the timezone (and daylight-savings) corrections. (This is also why you get the anomaly of 23- and 25-hour days in areas which have daylight-savings timeshifts.) Let's take some detailed examples, and maybe you can explain what you're trying to get with your gmtime() (and why!): In a purely GMT zone, with local time 27-May-2002 12:00:00, the UNIX timestamp is 1022500800. In a nominally GMT zone, but with daylight-savings in effect (such as British Summer Time!), with local time 27-May-2002 13:00:00, the UNIX time stamp for this is also 1022500800. Likewise, in a GMT+0200 zone, a local time of 27-May-2002 14:00:00 also gives a timestamp of 1022500800. In fact, this same timestamp of 1022500800 also represents all of these local times: 27-May-2002 04:00 -0800 27-May-2002 07:00 -0500 27-May-2002 17:00 +0500 27-May-2002 23:00 +1100 and even such oddities as: 27-May-2002 21:30 (Western Australia / Northern Territory) Thus, given the timestamp of 1022500800, it's the job of date() to determine the correct timezone and daylight-savings offset and apply them before formatting the output; gmdate() just formats it without applying any offsets. Likewise, mkdate() and gmmkdate() translate the other way respectively with and without timezone correction. Forgive me if I've gone on at what seems like excessive length, but I just wanted to make sure we both know exactly what it is we're talking about! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] random HTML pages from PHP calls
Hey all, I'm calling a PHP "GimmeRandom.php?id=35557" and what this page does is take the "id" and update the number in the database by +1 (till here no problem) then what its supposed to do is give me ANY ONE of 10 prewritten html pages in a random order. I know this is pretty easy but my brain just aint working today Cheers, -Ryan. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Program execution stops at exec()
David Freeman wrote: > > What I don't understand is why my php script dies while > > executing the shell script. Set_limit_time should make it > > wait. The build.sh script completes well. > > Not the exact solution here but perhaps a work-around. How dynamic is > the data you're generating with your shell script? Perhaps you could > get away with doing a cron on your shell script (once every hour or > whatever) and outputing it to a text file that you then parse in php to > deal with results. > > CYA, Dave It is generated rarely. I wanted to do a sort of interface to start generation of some files at distance. It would be cool to have it done just by pushing single button. My work-around is that now I have to push another button after 3 hours ;) No big deal, it is generated once or twice a year. Thanks to everyone who tried to help me Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] gmtime?
Unix epoch is the number of secs since the start date in GMT regardless of where your server is. The timestamp is a GMT value. Matt Friedman Web Applications Developer www.SpryNewMedia.com -Original Message- From: Jens Lehmann [mailto:[EMAIL PROTECTED]] Sent: Monday May 27, 2002 7:48 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] gmtime? > > -Original Message- > > From: Jens Lehmann [mailto:[EMAIL PROTECTED]] > > Sent: 24 May 2002 20:31 > > > > time() returns the number of seconds since the Unix Epoch to > > the current > > local time > > > > gmtime() should return the number of seconds since the Unix > > Epoch to the > > current GM-time > > > > Do you understand now? > Uh, no, actually now I'm more confused! I can understand that you're confused. :-) Or am I? > As I understand it, a Unix timestamp is *always* the number > of seconds since 1-Jan-1970 GMT ("the Unix epoch"), and > so is always a GMT time. Imho no, because 1-Jan-1970 GMT is just the "starting point", the result depends on which timezone your server is located in. Please correct me if I'm wrong here! > Any function that converts between local time and a Unix > timestamp therefore has to take the current timezone (and > any daylight-savings rules) into account. This is why there > are two versions of mktime() and date(), but only one time(). > > Cheers! > > Mike > Jens -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] gmtime?
> > -Original Message- > > From: Jens Lehmann [mailto:[EMAIL PROTECTED]] > > Sent: 24 May 2002 20:31 > > > > time() returns the number of seconds since the Unix Epoch to > > the current > > local time > > > > gmtime() should return the number of seconds since the Unix > > Epoch to the > > current GM-time > > > > Do you understand now? > Uh, no, actually now I'm more confused! I can understand that you're confused. :-) Or am I? > As I understand it, a Unix timestamp is *always* the number > of seconds since 1-Jan-1970 GMT ("the Unix epoch"), and > so is always a GMT time. Imho no, because 1-Jan-1970 GMT is just the "starting point", the result depends on which timezone your server is located in. Please correct me if I'm wrong here! > Any function that converts between local time and a Unix > timestamp therefore has to take the current timezone (and > any daylight-savings rules) into account. This is why there > are two versions of mktime() and date(), but only one time(). > > Cheers! > > Mike > Jens -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Program execution stops at exec()
> What I don't understand is why my php script dies while > executing the shell script. Set_limit_time should make it > wait. The build.sh script completes well. Not the exact solution here but perhaps a work-around. How dynamic is the data you're generating with your shell script? Perhaps you could get away with doing a cron on your shell script (once every hour or whatever) and outputing it to a text file that you then parse in php to deal with results. CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ini_set('register_globals',0) doesn't work
Thank you for answer. I didn't expect ini_set('register_globals','Off') to work, that's why I had a look at the documentation. There should be PHP_INI_PERDIR, PHP_INI_SYSTEM but not PHP_INI_ALL in the table (so it's a mistake in the documentation). Anyway it may be possible to use this, if the variables are unset. This is overload of course, because the variables are first set (because of register_globals="On" in php.ini) and are unset if I call ini_set('register_globals','Off'), but this could be a nice "feature", making it easier to work with register_globals="Off" while other old projects still work. Do you consider this a good idea? Does anything except performance speak against doing this manually? Jens > register_globals affects things that happen before PHP parsing begins, so > by the time you get to your ini_set() it is too late. So no, that won't > work. You need to set it in your php.ini, httpd.conf or .htaccess. > > -Rasmus > > On Sun, 26 May 2002, Jens Lehmann wrote: > > > I tested ini_set('register_globals',0) and ini_set('register_globals','Off') > > for turning register_globals off. It doesn't work and it doesn't produce any > > notice, warning or error. > > > > Here's a quick example: > > > > > > > ini_set('register_globals',0); > > > > if(isset($test)) > > echo "$test"; > > > > ?> > > > > > > > > > > > > This prints out $test, what it shouldn't do with register_globals turned > > off. > > I tested this with PHP 4.1.2 and 4.2.1. Even if I start to doubt it is > > supposed to work according to the documentation. Can anyone tell > > me what I've done wrong? > > > > For some strange reason if I do > > > > echo ini_set('register_globals',0); > > > > it will print "10". For > > > > echo ini_set('register_globals','Off'); > > > > it will print "1Off". > > > > Jens > > > > PS: ini_set works fine with include_path and error_reporting > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] gmtime?
> -Original Message- > From: Jens Lehmann [mailto:[EMAIL PROTECTED]] > Sent: 24 May 2002 20:31 > > time() returns the number of seconds since the Unix Epoch to > the current > local time > > gmtime() should return the number of seconds since the Unix > Epoch to the > current GM-time > > Do you understand now? Uh, no, actually now I'm more confused! As I understand it, a Unix timestamp is *always* the number of seconds since 1-Jan-1970 GMT ("the Unix epoch"), and so is always a GMT time. Any function that converts between local time and a Unix timestamp therefore has to take the current timezone (and any daylight-savings rules) into account. This is why there are two versions of mktime() and date(), but only one time(). Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problems with storing image data to the db
Hi there, I would like to save images into a blob column. Works good if I use the tmp file php has created after submitting the form. But if I do some gd stuff like changing some colors with inside the image and then save this immage, it does not work. I used to save the image to a file with: imagejpeg($picture, $name); // this works and now I try to save it to the db with: $picture = ImageCreateTrueColor($maxX, $dstY); //... some funky stuff like using the uuploaded file and mixing it with a water mark $data = addslashes($picture); $stmt =" INSERT INTO test.picture_test (file_name, file_type, picture) VALUES ('$name', '$picture_location_type', '$data') "; Like I said if I replace the $picture with the variable of the tmp field it works fine. I tryed also to do an imagejpeg before saving to the db, but it did not change anything. Thank you so much for any hint, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] get the filename of an include'd/require'd file?
Anyone knows how I can get the name of an include'd/require'd file and not getting the name of the main file. My scenario is like this: a.php: require "b.php"; b.php: echo $_SERVER['PHP_SELF']; echo $_SERVER['SCRIPT_NAME']; I get a.php when I want to have b.php. (Please CC me since Im not a member of the list) -- * John Ericson [EMAIL PROTECTED] * ICQ: 7325429 JID: [EMAIL PROTECTED] * web: http://john.pp.se -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] simple array question
Jose, Try this: for ($i = 0; $i < $whatever; $i++) { $myArray[] = // ... } /bsh/ Jose Jeria wrote: > in javascript i can build an array doing like this: > > for(i=0; i < whatEver.length; i++){ > myArray[myArray.length] = // > } > > What is the equivalent to this in PHP? > Is this the only way: > $myArray[count($myArray)] = //.. > > /J > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] simple array question
in javascript i can build an array doing like this: for(i=0; i < whatEver.length; i++){ myArray[myArray.length] = // } What is the equivalent to this in PHP? Is this the only way: $myArray[count($myArray)] = //.. /J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Simulating a FORM POST thing (HELP!)
Have a look in the manual. It's something like createfrombmp(). Might be imagecreatefrombmp(). It's in the images section of functions. You might need to have the gd library installed for it to work. You could always use fopen() and fread() to open and read the file. Use it in binary mode for images and stuff. "Georgie Casey" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > that function doest exist! > > "Peter" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Windows Bitmap = BMP file > > a WBMP is a wireless bitmap image and is designed for display on mobile > > phones. A lot of software doesn't understand the format. > > > > You need to use createfrombmp() not createfromwbmp() > > > > > > "Georgie Casey" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > i'm getting an error message saying my BMP file i'm trying to convert > isnt > > a > > > valid WBMP file? is dere a difference between BMP and WBMP? I just > opened > > my > > > GIF file into PSP7 and and saved as a windows bmp. > > > > > > why isnt it working? > > > "Peter" <[EMAIL PROTECTED]> wrote in message > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > > > > $im = createfrombmp("image"); > > > > print ""; > > > > print ""; > > > > ?> > > > > you get the idea > > > > > > > > I think PHP does have other funtions for file uplading though. > > > > > > > > "Georgie Casey" <[EMAIL PROTECTED]> wrote in message > > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > > Rite, when you see a web form, you know you can simulate the submit > by > > > > > filling in the values in the address field, just like a GET method, > > and > > > it > > > > > usually works the exact same. But how do you do it when one of the > > > fields > > > > in > > > > > the form is a file upload?!?!?! > > > > > > > > > > For the record, its a GIF file you've to upload. Is there any way to > > do > > > > this > > > > > in PHP?? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] user password
Hi Guys, Does anybody know how I can set a users password with php? I tried using a system call with sudo but I get the error cannot lock password file. I need to use php to change a users account password. Any ideas? Thanks, Wayne -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Ora_Fetch_Into function problem
if you are a newbie to oracle, don't forget to use bind variables in your queries, if this is possible in your Oracle Version. bindvars are placeholders for values in an oracle query, to which you bind your value on runtime. the advantage in using bind variables is, that oracle doesn't have to compile your query every time, but can reuse the compiled version of your query, simply bind the values and execute it. this is a main factor in writing highly scalable application with an oracle database backend, at least with Oracle8i. You can read more about that at http://asktom.oracle.com I'd provide a direct link, but i can't access the page at the moment... seems to be down. Michael "Michael P. Carel" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 006a01c2055b$fbfcb280$[EMAIL PROTECTED]">news:006a01c2055b$fbfcb280$[EMAIL PROTECTED]... > > > > > > > > > ooopp...sorry just found out why. I just need to have Ora_Commit() > function after all the queries to totally set the data to the database. > Im querying a data which is not commited yet to the oracle database. > Sorry for that I'm just a newbie in oracle. > > Thanks to all.. > > mike > > > > > > I've recently found out that the Ora_Fetch_Into function cannot get a > small > > value of the tables data. We've tried to fetch other tables which have a > > large amount data ,and it succeeds. The queried values echoed > successfully. > > Is there any idea why? im using PHP4.2.1 oracle7.3.3 > > > > > > Regards, > > Mike > > > > > > > > > > > > > thanks miguel but i've already checked it, i've included return values > > > checking where it stop. Here's my full source test script. > > > There where no Ora_Error_Code returned. > > > > > > > > PutEnv("ORACLE_SID=PROD"); > > > PutEnv("ORACLE_HOME=/u01/app/oracle/product/7.3.3_prod"); > > > $connection = Ora_Logon("apps","apps"); > > > if($connection==false){ > > > echo Ora_ErrorCode($connection).":". > > Ora_Error($connection).""; > > > exit; > > > } > > > $cursor= Ora_Open($connection); > > > if($cursor==false){ > > > echo Ora_ErrorCode($connection).":". > > Ora_Error($connection).""; > > > exit; > > > } > > > $query = "select * from mikecarel"; > > > //$query = "select table_name from all_tables"; > > > $result = Ora_Parse($cursor,$query); > > > if($result==false){ > > > echo Ora_ErrorCode($connection).":". > > Ora_Error($connection).""; > > > exit; > > > } > > > $result=Ora_Exec($cursor); > > > if($result==false){ > > > echo Ora_ErrorCode($connection).":". > > Ora_Error($connection).""; > > > exit; > > > } > > > echo""; > > > echo"Full NameEmail Address"; > > > //$values=array(mike, tess); > > > while(Ora_Fetch_Into($cursor,$values)){ > > > $name = $values[0]; > > > $email = $values[1]; > > > echo "$name$email"; > > > echo "$email"; > > > print($name); > > > $result =1; > > > } > > > if(!$result==1) print("no result"); > > > echo""; > > > > > > ora_close($cursor); > > > ora_logoff($connection); > > > ?> > > > > > > > > > mike > > > > > > > > > > > > > Check the return values from your ora_logon, ora_open, ora_parse, and > > > > ora_exec calls to see whether they worked. That way you can know at > > > > which stage it stopped working. > > > > > > > > miguel > > > > > > > > On Mon, 27 May 2002, Michael P. Carel wrote: > > > > > Finally i've set-up my AIX server with PHP and oracle support. > Thanks > > > for > > > > > all who helps me for the configure setup. > > > > > Now I have a problem in oracle function regarding the retrieval of > > > entries > > > > > in the oracle table. The Ora_Fetch_Into function doesnt work > properly > > to > > > me > > > > > or i have an error in which i dont know. I've written below the > code > > > that i > > > > > used to test, it doesnt echo the value of $name and $email. My query > > > works > > > > > if i've enter it manually with my Oracle server. I really dont know > > why > > > im > > > > > just a newbie with this database(oracle) statement. > > > > > > > > > > Please help us here. Thanks in advance. > > > > > > > > > > > > > > PutEnv("ORACLE_HOME=/u01/app/oracle/product/7.3.3_prod"); > > > > > $connection = Ora_Logon("apps","apps"); > > > > > $cursor= Ora_Open($connection); > > > > > > > > > > $query = "select * from mikecarel"; > > > > > $result = Ora_Parse($cursor,$query); > > > > > $result=Ora_Exec($cursor); > > > > > echo""; > > > > > echo"Full NameEmail > Address"; > > > > > while(Ora_Fetch_Into($cursor,$values)){ > > > > > $name = $values[0]; > > > > > $email = $values[1]; > > > > > echo "$name$email"; > > > > > } > > > > > ora_close($cursor); > > > > > ora_logoff($connection); ?> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Regards, > > > > > mike > > > > > > > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > > PHP General Mailing List (http://www.php.net/
[PHP] Re: Program execution stops at exec()
I read in php manual that set_time_limit() affects in fact max_execution_time. You can see in my example code I wrote in my initial post that I set it to 100k secs. Php don't run in safe mode so it should go fine. What I don't understand is why my php script dies while executing the shell script. Set_limit_time should make it wait. The build.sh script completes well. Tom Michael Virnstein wrote: > note: > i think the exec in your php waits for the shell to return, but before the > shell can answer, php terminates the script, because of the max_exection. > > Michael > > "Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > check your max_execution_time settings in php.ini > > > > Michael > > > > "Tom Mikulecky" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Hello > > > > > > In one script I use exec() to execute a shell script which takes 2-3 > > > hours to run. I disabled user abort and set time limit to more than one > > > day. The shell script finishes well but no instruction after exec() is > > > run. The script finishes with no error nor warnings. > > > Some of you know hwat happens? > > > Thanx in advance. > > > > > > Tom > > > > > > Code snaps: > > > > > > > > > ignore_user_abort(1); > > > > > > set_time_limit(10); > > > > > > (...) > > > > > > exec('/home/tom/build.sh >ouput 2>errlog');//takes 3 hours to > > complete > > > > > > // *** Nothing from here gets executed, 'build.sh' script completed > with > > succes *** > > > > > > (...) > > > > > > I'm using php 4.0.4pl1(can't upgrade) with Apache 1.3.19 on Mandrake > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Ora_Fetch_Into function problem
ooopp...sorry just found out why. I just need to have Ora_Commit() function after all the queries to totally set the data to the database. Im querying a data which is not commited yet to the oracle database. Sorry for that I'm just a newbie in oracle. Thanks to all.. mike > I've recently found out that the Ora_Fetch_Into function cannot get a small > value of the tables data. We've tried to fetch other tables which have a > large amount data ,and it succeeds. The queried values echoed successfully. > Is there any idea why? im using PHP4.2.1 oracle7.3.3 > > > Regards, > Mike > > > > > > > thanks miguel but i've already checked it, i've included return values > > checking where it stop. Here's my full source test script. > > There where no Ora_Error_Code returned. > > > > > PutEnv("ORACLE_SID=PROD"); > > PutEnv("ORACLE_HOME=/u01/app/oracle/product/7.3.3_prod"); > > $connection = Ora_Logon("apps","apps"); > > if($connection==false){ > > echo Ora_ErrorCode($connection).":". > Ora_Error($connection).""; > > exit; > > } > > $cursor= Ora_Open($connection); > > if($cursor==false){ > > echo Ora_ErrorCode($connection).":". > Ora_Error($connection).""; > > exit; > > } > > $query = "select * from mikecarel"; > > //$query = "select table_name from all_tables"; > > $result = Ora_Parse($cursor,$query); > > if($result==false){ > > echo Ora_ErrorCode($connection).":". > Ora_Error($connection).""; > > exit; > > } > > $result=Ora_Exec($cursor); > > if($result==false){ > > echo Ora_ErrorCode($connection).":". > Ora_Error($connection).""; > > exit; > > } > > echo""; > > echo"Full NameEmail Address"; > > //$values=array(mike, tess); > > while(Ora_Fetch_Into($cursor,$values)){ > > $name = $values[0]; > > $email = $values[1]; > > echo "$name$email"; > > echo "$email"; > > print($name); > > $result =1; > > } > > if(!$result==1) print("no result"); > > echo""; > > > > ora_close($cursor); > > ora_logoff($connection); > > ?> > > > > > > mike > > > > > > > > > Check the return values from your ora_logon, ora_open, ora_parse, and > > > ora_exec calls to see whether they worked. That way you can know at > > > which stage it stopped working. > > > > > > miguel > > > > > > On Mon, 27 May 2002, Michael P. Carel wrote: > > > > Finally i've set-up my AIX server with PHP and oracle support. Thanks > > for > > > > all who helps me for the configure setup. > > > > Now I have a problem in oracle function regarding the retrieval of > > entries > > > > in the oracle table. The Ora_Fetch_Into function doesnt work properly > to > > me > > > > or i have an error in which i dont know. I've written below the code > > that i > > > > used to test, it doesnt echo the value of $name and $email. My query > > works > > > > if i've enter it manually with my Oracle server. I really dont know > why > > im > > > > just a newbie with this database(oracle) statement. > > > > > > > > Please help us here. Thanks in advance. > > > > > > > > > > > PutEnv("ORACLE_HOME=/u01/app/oracle/product/7.3.3_prod"); > > > > $connection = Ora_Logon("apps","apps"); > > > > $cursor= Ora_Open($connection); > > > > > > > > $query = "select * from mikecarel"; > > > > $result = Ora_Parse($cursor,$query); > > > > $result=Ora_Exec($cursor); > > > > echo""; > > > > echo"Full NameEmail Address"; > > > > while(Ora_Fetch_Into($cursor,$values)){ > > > > $name = $values[0]; > > > > $email = $values[1]; > > > > echo "$name$email"; > > > > } > > > > ora_close($cursor); > > > > ora_logoff($connection); ?> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Regards, > > > > mike > > > > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 27 May 2002 08:50:33 -0000 Issue 1369
php-general Digest 27 May 2002 08:50:33 - Issue 1369 Topics (messages 99318 through 99344): Re: Simulating a FORM POST thing (HELP!) 99318 by: Peter 99319 by: Georgie Casey Problem with Includes and Variables 99320 by: Pete Rippe --NEWBIE-- T_String parse error ?? 99321 by: Kevin J 99322 by: Rasmus Lerdorf Re: ini_set('register_globals',0) doesn't work 99323 by: Rasmus Lerdorf Re: PHP and JavaScript 99324 by: Mark Pulling one record from a db(newbie) 99325 by: webmaster.tececo.com 99326 by: David Robley passing variable to anti spam mailto script 99327 by: Greg Wright Validating forms and showing errors 99328 by: Victor Boivie 99329 by: Martin Towell 99336 by: David Freeman Parse Error(Newbie) 99330 by: webmaster.tececo.com 99331 by: Martin Towell 99332 by: Peter 99333 by: David Robley 99335 by: David Freeman 99337 by: Miguel Cruz Ora_Fetch_Into function problem 99334 by: Michael P. Carel 99339 by: Miguel Cruz 99342 by: Michael P. Carel 99343 by: Michael Virnstein 99344 by: Michael P. Carel Re: Problem with if statement and while loops 99338 by: Jason Wong Re: using array to declare globals in function? 99340 by: Jason Wong Re: how to display a file's last updated time using php? 99341 by: Michael Virnstein Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- Windows Bitmap = BMP file a WBMP is a wireless bitmap image and is designed for display on mobile phones. A lot of software doesn't understand the format. You need to use createfrombmp() not createfromwbmp() "Georgie Casey" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > i'm getting an error message saying my BMP file i'm trying to convert isnt a > valid WBMP file? is dere a difference between BMP and WBMP? I just opened my > GIF file into PSP7 and and saved as a windows bmp. > > why isnt it working? > "Peter" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > $im = createfrombmp("image"); > > print ""; > > print ""; > > ?> > > you get the idea > > > > I think PHP does have other funtions for file uplading though. > > > > "Georgie Casey" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Rite, when you see a web form, you know you can simulate the submit by > > > filling in the values in the address field, just like a GET method, and > it > > > usually works the exact same. But how do you do it when one of the > fields > > in > > > the form is a file upload?!?!?! > > > > > > For the record, its a GIF file you've to upload. Is there any way to do > > this > > > in PHP?? > > > > > > > > > > > > > > > > > > --- End Message --- --- Begin Message --- that function doest exist! "Peter" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Windows Bitmap = BMP file > a WBMP is a wireless bitmap image and is designed for display on mobile > phones. A lot of software doesn't understand the format. > > You need to use createfrombmp() not createfromwbmp() > > > "Georgie Casey" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > i'm getting an error message saying my BMP file i'm trying to convert isnt > a > > valid WBMP file? is dere a difference between BMP and WBMP? I just opened > my > > GIF file into PSP7 and and saved as a windows bmp. > > > > why isnt it working? > > "Peter" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > > $im = createfrombmp("image"); > > > print ""; > > > print ""; > > > ?> > > > you get the idea > > > > > > I think PHP does have other funtions for file uplading though. > > > > > > "Georgie Casey" <[EMAIL PROTECTED]> wrote in message > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > Rite, when you see a web form, you know you can simulate the submit by > > > > filling in the values in the address field, just like a GET method, > and > > it > > > > usually works the exact same. But how do you do it when one of the > > fields > > > in > > > > the form is a file upload?!?!?! > > > > > > > > For the record, its a GIF file you've to upload. Is there any way to > do > > > this > > > > in PHP?? > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- End Message --- --- Begin Message --- Hey, im running Apache 2.0.36, and PHP 4.2.1, and im having problems with my site, which relies alot on includes. On each site page, it includes a file called "global.php" which contains the path's to the include folder, and various oth
Re: [PHP] Ora_Fetch_Into function problem
I've recently found out that the Ora_Fetch_Into function cannot get a small value of the tables data. We've tried to fetch other tables which have a large amount data ,and it succeeds. The queried values echoed successfully. Is there any idea why? im using PHP4.2.1 oracle7.3.3 Regards, Mike > thanks miguel but i've already checked it, i've included return values > checking where it stop. Here's my full source test script. > There where no Ora_Error_Code returned. > > PutEnv("ORACLE_SID=PROD"); > PutEnv("ORACLE_HOME=/u01/app/oracle/product/7.3.3_prod"); > $connection = Ora_Logon("apps","apps"); > if($connection==false){ > echo Ora_ErrorCode($connection).":". Ora_Error($connection).""; > exit; > } > $cursor= Ora_Open($connection); > if($cursor==false){ > echo Ora_ErrorCode($connection).":". Ora_Error($connection).""; > exit; > } > $query = "select * from mikecarel"; > //$query = "select table_name from all_tables"; > $result = Ora_Parse($cursor,$query); > if($result==false){ > echo Ora_ErrorCode($connection).":". Ora_Error($connection).""; > exit; > } > $result=Ora_Exec($cursor); > if($result==false){ > echo Ora_ErrorCode($connection).":". Ora_Error($connection).""; > exit; > } > echo""; > echo"Full NameEmail Address"; > //$values=array(mike, tess); > while(Ora_Fetch_Into($cursor,$values)){ > $name = $values[0]; > $email = $values[1]; > echo "$name$email"; > echo "$email"; > print($name); > $result =1; > } > if(!$result==1) print("no result"); > echo""; > > ora_close($cursor); > ora_logoff($connection); > ?> > > > mike > > > > > Check the return values from your ora_logon, ora_open, ora_parse, and > > ora_exec calls to see whether they worked. That way you can know at > > which stage it stopped working. > > > > miguel > > > > On Mon, 27 May 2002, Michael P. Carel wrote: > > > Finally i've set-up my AIX server with PHP and oracle support. Thanks > for > > > all who helps me for the configure setup. > > > Now I have a problem in oracle function regarding the retrieval of > entries > > > in the oracle table. The Ora_Fetch_Into function doesnt work properly to > me > > > or i have an error in which i dont know. I've written below the code > that i > > > used to test, it doesnt echo the value of $name and $email. My query > works > > > if i've enter it manually with my Oracle server. I really dont know why > im > > > just a newbie with this database(oracle) statement. > > > > > > Please help us here. Thanks in advance. > > > > > > > > PutEnv("ORACLE_HOME=/u01/app/oracle/product/7.3.3_prod"); > > > $connection = Ora_Logon("apps","apps"); > > > $cursor= Ora_Open($connection); > > > > > > $query = "select * from mikecarel"; > > > $result = Ora_Parse($cursor,$query); > > > $result=Ora_Exec($cursor); > > > echo""; > > > echo"Full NameEmail Address"; > > > while(Ora_Fetch_Into($cursor,$values)){ > > > $name = $values[0]; > > > $email = $values[1]; > > > echo "$name$email"; > > > } > > > ora_close($cursor); > > > ora_logoff($connection); ?> > > > > > > > > > > > > > > > > > > > > > > > > Regards, > > > mike > > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php