[PHP] Re: Dose this tool exist
Dave Carrera wrote: Hi List, Is there a GUI tool that can help make relationships between MySQL tables ? I saw a tool somewhere that you dragged the relevant table into a kind of workspace and selected what rows you wanted and it made the necessary sql for select. I also saw somewhere a tool that made it easy to make forms for php from MySql tables but I cant locate a good one anywhere Any pointers / urls will be most appreciated. Sorry if this is OT. Dave C phpmyadmin can -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dose this tool exist
Am Sa, den 09.10.2004 schrieb Dave Carrera um 8:46: > Hi List, > > Is there a GUI tool that can help make relationships between MySQL tables ? > Look at: http://www.fabforce.net/dbdesigner4/ -- Martin Rozmus <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: **[SPAM]** RE: [PHP] Newsgroups Space
Matthew Sims wrote: Nice idea, but you want to be "future-proof", don't you? Once alt.binaries.vr.animals.lobster starts filling up with 5 hour Virtual Reality ROMs you're looking at needing a lot more than that. I'd go with about 6 YB if I were you, and that's only because there aren't any SI prefixes higher than Yotta (10^24). Yeah, that Super Turbo Lobster Fighter Alpha EX2 Special is freakin' huge. Mmmm. I wasn't actually talking about games, but I guess you could use it for that too. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions not destroyed
As Marek has stated a number of times, the session options in php.ini are meant to be set to reasonable values for the usage pattern for your server, in order that you can achieve a balance between a /tmp or /var/tmp of several zillion kilobytes, and a constant 100% cpu usage as the gc routine runs again and again. That's all it is. If you wish to time out your sessions for security purposes, you need to handle that security in your application. Security is the responsibility of the developer, and should always remain that way. Anything else is leaving you open to trouble. To restate, the session.gc_maxlifetime defines how long the session must have been inactive in order for it to be SAFE to be gc'ed. That's why it's session.*GC*_maxlifetime and not session.security_maxlifetime. The setting has no bearing on when a session MUST be gc'ed. That is up to the developer to deal with - hell, with session.gc_divisor = 0, you can have session files which are never deleted if you desire - that doesn't mean your users should never be logged out, now does it? Hope this clears things up a little. Cheers Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Grab an array from a cookie without throwing errors?
Of course, you're running unserialize() twice. What about if (empty($_COOKIE['bookmarks']) || !($bookmarks = unserialize($_COOKIE['bookmarks']))) { $bookmarks = array(); } Does the same with only one call to a potentially weighty function. Cheers Chris John Nichel wrote: Brian Dunning wrote: I've got a cookie that's either non-existent or a serialized array. I'm trying all sorts of different code combinations to retrieve it into an array variable, but everything I try throws up some combination of notices and/or warnings. Here is my latest & greatest: $cookie = $_COOKIE['bookmarks']; if(unserialize($cookie) == true) { $bookmarks = unserialize($cookie); } else { $bookmarks = array(); } Use isset if ( isset ( $_COOKIE['bookmarks'] ) && unserialize ( $_COOKIE['bookmarks'] ) ) { $bookmarks = unserialize ( $_COOKIE['bookmarks'] ); } else { $bookmarks = array(); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Callback functions inside classes - how to?
From the manual: http://uk.php.net/manual/en/language.pseudo-types.php#language.types.callback If you want to change things in the callback, the function (or method) should accept its parameters by reference. e.g. class A { function name(&$a, $b, $c) { $a = $b . $c; return; } function parse() { // whatever // then (calls $this->name()) $parser->set_handler( "root/page/title", array($this, 'name') ); // or (calls A::name()) $parser->set_handler( "root/page/title", array('A', 'name') ); // more whatever } } Hope this helps Cheers Chris Thomas Hochstetter wrote: Hi again, I have always been wondering how this is done properly: Here is an example: [snip] class A { function name( $a, $b, $c) { $tmp = array(); $tmp[a] = $a; . array_push( $GLOBALS['XMLStack'], $tmp ); } function parse() { .. some definitions . $parser->set_handler( "root/page/title", "name" ); . some more stuff here . } } [/snip] What I want is to have the callback function name as it is in the above example. But, obviously, the above code won't work. So, how do I tell the set_handler function that it must use the name function from the class? Using: "A::name" or "$this->name" (if instantiated) . how do these callback function calls work, because the same issue is with the xml handler functions in php4 (have not as yet been to v5). Also, how can I get the data from the callback function out without using $GLOBALS? I cannot just return an array, can I? Any ideas. Thanks so long. Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Securing Servers
Curt Zirzow wrote: * Thus wrote M Saleh EG: but plz Radhita, don't bring your biased opinions about MS vs Opensource or Linux vs Windows over here. It's so subjective and plus gets an off-topic topic more off ! I can install BSD apache/php/mysql w/firewall and totally locked down in 15 minutes and know its secure. it takes windows 15 minutes to prepare the installation.. before I can even choose what I want to do. Opinions are always welcome here, expecially when they concern security issues related to internet activities. Instead of avoiding the topic, a better comment would be to say that it is possible to make windows just as secure as any other system. Knowledge on security differs greatly depending on what system your running. Curt Like we're going to listen to you on anything security releated. ;) -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help me to get out of this mass mailing
Hi guys I'm implementing mass mailing program...as there are hundred's of users that receive mails...as a result i'm getting this error... Fatal error: Maximum execution time of 30 seconds exceeded in d:\phpsites\ac\asc\acendo on line 42 Help meee! regards, ss
Re: [PHP] Grab an array from a cookie without throwing errors?
Of course, you're running unserialize() twice. What about if (empty($_COOKIE['bookmarks']) || !($bookmarks = unserialize($_COOKIE['bookmarks']))) { $bookmarks = array(); } Does the same with only one call to a potentially weighty function. Cheers Chris John Nichel wrote: Brian Dunning wrote: I've got a cookie that's either non-existent or a serialized array. I'm trying all sorts of different code combinations to retrieve it into an array variable, but everything I try throws up some combination of notices and/or warnings. Here is my latest & greatest: $cookie = $_COOKIE['bookmarks']; if(unserialize($cookie) == true) { $bookmarks = unserialize($cookie); } else { $bookmarks = array(); } Use isset if ( isset ( $_COOKIE['bookmarks'] ) && unserialize ( $_COOKIE['bookmarks'] ) ) { $bookmarks = unserialize ( $_COOKIE['bookmarks'] ); } else { $bookmarks = array(); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help me to get out of this mass mailing
> I'm implementing mass mailing program...as there are hundred's of users that receive > mails...as a result i'm getting this error... > > Fatal error: Maximum execution time of 30 seconds exceeded in > d:\phpsites\ac\asc\acendo on line 42 take a look at http://us4.php.net/manual/en/ref.info.php#ini.max-execution-time you need to bump it up -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and FORM
I'm writing form using PHP and HTML. The form is submited only if user clicks on submit button. However, it's not possible to submit form when I press "enter". Is it possible to submit form pressing on enter? If so how? TH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and FORM
On Sat, 9 Oct 2004 08:41:38 -0400, php mysql <[EMAIL PROTECTED]> wrote: > I'm writing form using PHP and HTML. The form is submited only if user > clicks on submit button. However, it's not possible to submit form > when I press "enter". Is it possible to submit form pressing on > enter? If so how? You can submit the form with pressing enter if the field you are focusing on when you press enter is inside your tags. The thing then is that on the parsing side you must actually test for that field of the $_POST array, like so: -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help me to get out of this mass mailing
On Sat, 9 Oct 2004 16:41:28 +0530, suneel <[EMAIL PROTECTED]> wrote: > I'm implementing mass mailing program...as there are hundred's of users that receive > mails...as a result i'm getting this error... > > Fatal error: Maximum execution time of 30 seconds exceeded in > d:\phpsites\ac\asc\acendo on line 42 This was just discussed in great detail like 2 or 3 days ago. Did you try searching the mailing list archives? http://marc.theaimsgroup.com/?l=php-general -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with a time comparison loop
Hi, I am trying to create an outlook style day view calendar. I loop through the hours in the day (00:00 - 23:00) and compare it to a diary table for the user. If the users 1st appointment isnt until 10:00 then the hours print out until that appointment then continue looking for the next appointment. However if the user has no appointments in the day then the table layout doesnt work because of this line: With no entries for that day this results in the following: date("H:i", strtotime(@mysql_result($qid, $i, Booking_Start_Date))) = 00:00 $hours[$x].':'.$minutes[$y] = 00:00 My question is therefore how can i get this line ' date("H:i", strtotime(@mysql_result($qid, $i, Booking_Start_Date))) ' to output nothing if there is no entry in the database? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with a time comparison loop
On Sat, 9 Oct 2004 14:51:01 +0100, Shaun <[EMAIL PROTECTED]> wrote: > I am trying to create an outlook style day view calendar. I loop through the > hours in the day (00:00 - 23:00) and compare it to a diary table for the > user. If the users 1st appointment isnt until 10:00 then the hours print out > until that appointment then continue looking for the next appointment. > > However if the user has no appointments in the day then the table layout > doesnt work because of this line: > > Booking_Start_Date))) == $hours[$x].':'.$minutes[$y]){ ?> > > With no entries for that day this results in the following: > > date("H:i", strtotime(@mysql_result($qid, $i, Booking_Start_Date))) = 00:00 > $hours[$x].':'.$minutes[$y] = 00:00 > > My question is therefore how can i get this line ' date("H:i", > strtotime(@mysql_result($qid, $i, Booking_Start_Date))) ' to output nothing > if there is no entry in the database? Wrap it with: if(mysql_num_rows($qid)){ } -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MYSQL_VERSION_ID?
I wouldn't be too surprised if that is the case. I tried my best to remove the rpm installations and as for the compilation options, I believe I specified them correctly, since I got them to install insto the directories I specified. The more important question to me is how PHP5 gets the value for MYSQL_VERSION_ID, though. - Original Message - From: "Curt Zirzow" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, October 09, 2004 2:46 AM Subject: Re: [PHP] MYSQL_VERSION_ID? * Thus wrote Minuk Choi: I've a Redhat9 and installed MySQL 4.0 from source and Apache 1.3 from source. From my expirence, at this point you probably have 2 versions of mysql and 2 versions of apache on your system. Your new versions, depending on how you compile them will default to the paths of: /usr/local/mysql/ /usr/local/apache/ The default installations will be spread accross: /etc/* /usr/include/* /usr/lib/* ... I also downloaded the PHP5.0.2 source and attempted to compile it. Apache and MySQL are installed successfully, as they all work without any noticeable errors. This is how I configured PHP5 ./configure --prefix=/PHP5 --with-mysql= what exactly is that mysql path you issue? when I ran "make", I got an error. It was regarding one of the functions, make tried to compile mysql_create_db and mysql_drop_db(functions that are no longer provided by the MySQL4.0 client). If this is the case then the configuration of php picked up the headers for the old version of mysql, but the libraries that php tried to use where mysql4. Causing the errors. If you provide the exact errors you got when compiling, it might be insightful. When I checked the source code(the c and h files), there was this line, #if MYSQL_VERSION_ID < 4 which was enclosed in the declaration of the function prototypes PHP_FUNCTION(mysql_create_db) PHP_FUNCTION(mysql_drop_db) in php_mysql.h and also around the implemention of the functions PHP_FUNCTION(mysql_create_db) PHP_FUNCTION(mysql_drop_db) in php_mysql.c This is correct behaviour. The problem I seem to have is that MYSQL_VERSION_ID is never defined? Perhaps this is due to the fact that I compiled MySQL 4.0 from source and may have skipped a step... but where is MYSQL_VERSION_ID supposed to be defined or retrieved? typing echo $MYSQL_VERSION_ID in bash got me a blank line. the #if MYSQL_VERSION_ID is not defined in your environment but in the header file of mysql_version.h if at your shell prompt you type: locate mysql_version.h You should get a minimum of 2 or possibly 3 files resulted: /path/to/php/src/ext/mysql/libmysql/mysql_version.h /usr/local/mysql/include/mysql_version.h /usr/include/mysql_version.h That is where MYSQL_VERSION_ID is defined. I managed to comment out those functions in the header and the c files and "make" and "make install" ran flawlessly. This may work, but dont expect mysql_thread_id() to work and you might run into other side effects depending on what version php is thinking mysql is. Could this be a bug? Doesn't look like it. Curt -- The above comments may offend you. flame at will. -- 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] Function declaration failing on return value
On Tuesday 05 October 2004 06:20, Whil Hentzen wrote: > I cut this directly out of the online manual and put it into my PHP page. > If I've got a typo, then there's an error in the manual. > > I also cut the entire PHP page into my email. Nothing missing or hidden. > > I'm stumped. > > I retyped everything in changed all the names... now it works. Looks > like there are hidden chars in the html that I cut out from the online > manual. > > "That's weird". Cut and paste from some browsers could lead to the inclusion of 'hidden' characters in your code (usually the TAB character). -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The least useful horse in your barn will eat the most, require shoes every four weeks and need the vet at least once a month -- Murphy's Horse Laws n4 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] extending built in classes?
Hi - I am trying to extend a built in class, but cannot seem to get my subclass methods called. class movObj extends SWFMovie { function init() { echo("init"); } } $m = new movObj(); $m->init(); Gives::: Fatal error: Call to undefined method SWFMovie::init() ... This method call i would have hoped would pass up to the baseclass. But if I add a constructor to my own subclass, the init method can be called. BUT i can now not call any of the SWFMovie methods. Like, it is not really extending the built in class, or there is no hierarchy. I messed with various versiosn of trying to call the super myself: parent::method $this->parent->method() without much success. Is this a limitation of phps classes? We cannot subclass built in types (perhaps they were built/not compatible with php5 object model)? thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: extending built in classes?
Dc wrote: > Hi - > > I am trying to extend a built in class, but cannot seem to get my > subclass methods called. > > class movObj extends SWFMovie { > function init() { >echo("init"); > } > } > > $m = new movObj(); > $m->init(); > > Gives::: > Fatal error: Call to undefined method SWFMovie::init() ... > > This method call i would have hoped would pass up to the baseclass. > > But if I add a constructor to my own subclass, the init method can be > called. BUT i can now not call any of the SWFMovie methods. Like, it > is not really extending the built in class, or there is no hierarchy. > > I messed with various versiosn of trying to call the super myself: > >parent::method >$this->parent->method() > > without much success. > > Is this a limitation of phps classes? We cannot subclass built in types > (perhaps they were built/not compatible with php5 object model)? > > thanks! > are you using php 4 or 5? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GD
how can i find out in PHP which version of GD is installed. I tried checking for function-existence of imagecreatetruecolor and imagecopyresampled, but these functions exist in older GD versions, but aren't implemented. I want to know if I can use the functions imagecreatetruecolor() and imagecopyresampled() ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD
Gerben wrote: how can i find out in PHP which version of GD is installed. I tried checking for function-existence of imagecreatetruecolor and imagecopyresampled, but these functions exist in older GD versions, but aren't implemented. I want to know if I can use the functions imagecreatetruecolor() and imagecopyresampled() ? gd_info() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Simply open an URL
Hi everyone! Sorry for the probably stupid question. But I can`t find a way to make a php script to open an url in a browser! Like " location = "example.html"; " does. Armand from Latvia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Securing Servers
--- Stephen Craton <[EMAIL PROTECTED]> wrote: > I'm in the process of hooking up my own personal web server for > use by certain clients to view the progress on work I'm doing > for them. However, I'm on a shared network that is behind a > firewall and some computers on the network need to stay secure > as possible. I've heard that if you gain access to one computer, > the whole thing is vulnerable. That has some truth to it. My advice would be to establish a DMZ (demilitarized zone). One way to do this would require the user of an extra firewall. I assume that your current setup is a single firewall between you and the Internet. When you relax your firewall rules to allow HTTP traffic, your entire local network becomes a DMZ. Some users on the local network might be running Windows with IIS and not even realize it, and relaxed firewall rules can expose this weakness. If you want to only open up additional ports for your server, you would place an additional firewall between it and the local network, so HTTP traffic can reach you, but the second firewall prevents it from reaching the local network. > I've going to be running Apache with PHP on my Windows box that > has antivirus all set up and whatnot. My question comes in terms > of port security. Since I'll be having the port open for Apache, > I want to make sure nothing naughty gets through the port. Apache should not be your concern. Windows is your security weakness, but your firewall can help protect you. If you only want to be serving HTTP (I'm assuming no SSL), only allow outside connections to be initiated on port 80 and nowhere else. With this setup, you are relying on the security of Apache for the most part (the OS does handle TCP/IP and such). It is also very important that you do not actually use this computer for other purposes, such as browsing the Web (e.g., if it's your personal workstation). If you do, you are likely to get infected with something, and then the firewall doesn't help you. > How should I configure Apache and PHP in order to keep it as > secure as possible but still functional? This reminds me of another concern, which is your code. Even in the theoretical case that your environment is 100% secure (a fiction that we can only strive to achieve), weaknesses in your applications can still exist. > I have considered using Linux, but until I can get myself a > separate computer box to dedicate to the server, I'm stuck with > using my personal computer as the server as well and all my > programs/games need Windows. You cannot provide reasonable security with this approach, in my opinion. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly HTTP Developer's Handbook - Sams Coming December 2004http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simply open an URL
header("Location: <>"); On 9 Oct 2004, at 20:21, Armands Pucs wrote: Hi everyone! Sorry for the probably stupid question. But I can`t find a way to make a php script to open an url in a browser! Like " location = "example.html"; " does. Armand from Latvia -- 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] http 411 error with cURL
hi all, Im getting an http 411 error when trying to post data with php's cURL functions. The spec says ***The message for this error code is "Length Required." The server refuses to accept the request without a defined Content- Length.*** Im confused on 2 points: * Is it the server i am posting *from* causing the error or is it the server im posting *to*? * How to resolve this? Much thx for any guidance here, this was not happening yesterday doing the same job.. weird! -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http 411 error with cURL
Nick Wilson wrote: hi all, Im getting an http 411 error when trying to post data with php's cURL functions. The spec says ***The message for this error code is "Length Required." The server refuses to accept the request without a defined Content- Length.*** Im confused on 2 points: * Is it the server i am posting *from* causing the error or is it the server im posting *to*? B is correct * How to resolve this? header('Content-Length: ' . strlen($data_you_are_posting)); Much thx for any guidance here, this was not happening yesterday doing the same job.. weird! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http 411 error with cURL
* and then Marek Kilimajer declared > >* How to resolve this? > > header('Content-Length: ' . strlen($data_you_are_posting)); Ok, im with you Marek but how/where do i put it in my curl function? Not with CURL_POSTFIELDS for sure.. i've been looking through the options in the manual and dont see anything obivious...? thanks mate.. -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http 411 error with cURL
* and then Nick Wilson declared > > * and then Marek Kilimajer declared > > >* How to resolve this? > > > > header('Content-Length: ' . strlen($data_you_are_posting)); > > Ok, im with you Marek but how/where do i put it in my curl function? > Not with CURL_POSTFIELDS for sure.. i've been looking through the > options in the manual and dont see anything obivious...? Opps! CURLOPT_HTTPHEADER I go play with it now ;-) -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http 411 error with cURL
Nick Wilson wrote: * and then Nick Wilson declared * and then Marek Kilimajer declared * How to resolve this? header('Content-Length: ' . strlen($data_you_are_posting)); Ok, im with you Marek but how/where do i put it in my curl function? Not with CURL_POSTFIELDS for sure.. i've been looking through the options in the manual and dont see anything obivious...? Opps! CURLOPT_HTTPHEADER I go play with it now ;-) Sorry, I got it mixed :) But you figured it out. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http 411 error with cURL
* and then Marek Kilimajer declared > >Opps! > > > >CURLOPT_HTTPHEADER > > > >I go play with it now ;-) > > > > Sorry, I got it mixed :) But you figured it out. do you know if the lenght includes the args? like this strlen("val=$var&val2=$var2"); or strlen($var . $var2=; ? cheers marek -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http 411 error with cURL
* and then Marek Kilimajer declared > Nick Wilson wrote: > >* and then Marek Kilimajer declared > > > >>>Opps! > >>> > >>>CURLOPT_HTTPHEADER > >>> > >>>I go play with it now ;-) > >>> > >> > >>Sorry, I got it mixed :) But you figured it out. > > > > > >do you know if the lenght includes the args? like this > > > >strlen("val=$var&val2=$var2"); > > This one. Don't forget to urlencode where necessary hmmm.. well, this is giving me the same curl_errno(22) http 411 $postF="s=$s&e=$e&a=" . urlencode($a) . "&em=" . urlencode($em) ."&x=" . $x . "&b=$b&t=" . urlencode($t) . "&p=$p"; $postL=strlen($postF); curl_setopt($ch, CURLOPT_POSTFIELDS,$postF); curl_setopt($ch, CURLOPT_HTTPHEADERS, "Content-Length: $postL"); $result=curl_exec($ch); -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question about error_reporting()
On Saturday 02 October 2004 00:34, Greg Donald wrote: > > The manual is not clear on this point. > > > > Also, must I have a an existing error file for the errors to append to? > > No, the web server error log is where they shoudl appear. No, PHP errors DO NOT appear in the apache logs[1], they are logged to a separate file which can be specified in php.ini. [1] Some PHP induced errors do appear in the apache error log, notably segfaults. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I have an existential map. It has "You are here" written all over it. -- Steven Wright */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http 411 error with cURL
Nick Wilson wrote: * and then Marek Kilimajer declared Nick Wilson wrote: * and then Marek Kilimajer declared Opps! CURLOPT_HTTPHEADER I go play with it now ;-) Sorry, I got it mixed :) But you figured it out. do you know if the lenght includes the args? like this strlen("val=$var&val2=$var2"); This one. Don't forget to urlencode where necessary hmmm.. well, this is giving me the same curl_errno(22) http 411 $postF="s=$s&e=$e&a=" . urlencode($a) . "&em=" . urlencode($em) ."&x=" . $x . "&b=$b&t=" . urlencode($t) . "&p=$p"; $postL=strlen($postF); curl_setopt($ch, CURLOPT_POSTFIELDS,$postF); curl_setopt($ch, CURLOPT_HTTPHEADERS, "Content-Length: $postL"); CURLOPT_HTTPHEADER - An array of HTTP header fields to set. curl_setopt($ch, CURLOPT_HTTPHEADERS, array('Content-Length' => $postL)); $result=curl_exec($ch); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http 411 error with cURL
Nick Wilson wrote: * and then Marek Kilimajer declared Opps! CURLOPT_HTTPHEADER I go play with it now ;-) Sorry, I got it mixed :) But you figured it out. do you know if the lenght includes the args? like this strlen("val=$var&val2=$var2"); This one. Don't forget to urlencode where necessary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http 411 error with cURL
* and then Marek Kilimajer declared > CURLOPT_HTTPHEADER - An array of HTTP header fields to set. Marek, im sure you dont need to know this, but i think it's funny so maybe you will, i just went to bed, im now sitting here er.. without much on at the PC cos i just realized the same thing! - sorry, im tired thanks so much! -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http 411 error with cURL
* and then Nick Wilson declared > > * and then Marek Kilimajer declared > > CURLOPT_HTTPHEADER - An array of HTTP header fields to set. ahhh [EMAIL PROTECTED] it! that dont work and niether does this: curl_setopt($ch, CURLOPT_HTTPHEADERS, array("Content-Length: $postL")); im off to bed.. back in the am. -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP]
Hello everyone, I'm hoping you guys can help me with this error. Here's what I'm getting: Notice: Undefined variable: children in L:\localhost\catalog\catalog_0.1.0\includes\classes\tree.class.php on line 58 This error occurs only when the class's method outputs $children as having a value of zero. Below is the class. I want it to return zero but I don't want this error. Do I need to change my error settings in my php.ini file? The error level is currently set to E_ALL and I'm using PHP 5.0.1. If at all possible, I want to keep this error setting at high because I want everything to be coded strictly. What did I do wrong in my class and how can I fix it to where it doesn't output an error when a class's method returns a value of zero? Here's the class: function get_children($parent) { $parent_coord = tree::get_item_coord($parent); $descendants = $this->get_descendants($parent); for ($i = 0; $i < count($descendants); $i++) { if ((empty($children)) && (($parent_coord['0']['lft'] + 1) == $descendants[$i]['lft'])) { $children[] = $descendants[$i]; // found first child } elseif (($children[count($children)-1]['rgt'] + 1 == $descendants[$i]['lft']) && $children[count($children)-1]['rgt'] + 1 != $parent_coord['0']['rgt']) { $children[] = $descendants[$i]; // find next children } } return $children; } Thanks in advance to anyone that can explain this error to me. Nilaab -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: http 411 error with cURL
Hello, On 10/09/2004 07:49 PM, Nick Wilson wrote: Im getting an http 411 error when trying to post data with php's cURL functions. The spec says ***The message for this error code is "Length Required." The server refuses to accept the request without a defined Content- Length.*** Im confused on 2 points: * Is it the server i am posting *from* causing the error or is it the server im posting *to*? * How to resolve this? It seems cURL is sending a malformed HTTP request. When I used Curl I don't let it compose the request. Instead I use this HTTP client class that lets me use cUrl or fsockopen to establish HTTP connection and it takes care of sending the HTTP request correctly regardless of the way the request is sent. http://www.phpclasses.org/httpclient -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] TTF Text not displaying correctly
Does anybody know off the top of their head why truetype font text would look greyed out? This is my code: The text looks greyed out and it's a bit distorted. Thanks, Brent