Re: [PHP] setting the same value to multiple variables
On Mar 30, 2006, at 11:01 PM, Jasper Bryant-Greene wrote: charles stuart wrote: if ( 1 == 1 ) ^^ what is the point of this? Just cutting out the long IF statement so everyone didn't have to look past it. { $goodToGo = 0; $errorArray[] = "You must declare some goals on Activity 1."; // this block of code does not set each variable to "class= \"errorHere\""; $readingGoalsEnjoymentLabelClass && $readingGoalsInformationLabelClass && $readingGoalsAlphabeticLabelClass && $readingGoalsPrintLabelClass && $readingGoalsPhonologicalLabelClass && $readingGoalsPhoneticLabelClass && $readingGoalsComprehensionLabelClass && $readingGoalsVocabularyLabelClass && $readingGoalsInstructionsLabelClass && $readingGoalsCriticalLabelClass && $readingGoalsCommunicateLabelClass = "class=\"errorHere\""; } While this seems like excessively ugly code (have you considered an array? what is the point of all those variables if they all hold the same value?), replace all of those '&&' with '=' and you will be fine. PHP evaluates right-to-left and the result of an assignment is the value that was assigned, so that will work. Ah, I see. Thanks. I place the variable in the tag for each of the corresponding inputs (checkboxes in this case). If none are checked (at least one is required) I set an error message at the top of the page and then set a background color on each via the now present class="errorHere". I'm sure there's a better way to do this, but I'm not the best with PHP. I'll look into using an array. Thanks again for your help. You've shortened my code at least a little bit. best, Charles -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] setting the same value to multiple variables
charles stuart wrote: if ( 1 == 1 ) ^^ what is the point of this? { $goodToGo = 0; $errorArray[] = "You must declare some goals on Activity 1."; // this block of code does not set each variable to "class=\"errorHere\""; $readingGoalsEnjoymentLabelClass && $readingGoalsInformationLabelClass && $readingGoalsAlphabeticLabelClass && $readingGoalsPrintLabelClass && $readingGoalsPhonologicalLabelClass && $readingGoalsPhoneticLabelClass && $readingGoalsComprehensionLabelClass && $readingGoalsVocabularyLabelClass && $readingGoalsInstructionsLabelClass && $readingGoalsCriticalLabelClass && $readingGoalsCommunicateLabelClass = "class=\"errorHere\""; } While this seems like excessively ugly code (have you considered an array? what is the point of all those variables if they all hold the same value?), replace all of those '&&' with '=' and you will be fine. PHP evaluates right-to-left and the result of an assignment is the value that was assigned, so that will work. -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] setting the same value to multiple variables
Hi, I'm sure this is quite basic. Nonetheless I'm new to PHP so I haven't figured it out. I'd like to set each variable to the same value (without having to set that value individually for each variable). Thanks for the help. best, Charles if ( 1 == 1 ) { $goodToGo = 0; $errorArray[] = "You must declare some goals on Activity 1."; // this block of code does not set each variable to "class=\"errorHere \""; $readingGoalsEnjoymentLabelClass && $readingGoalsInformationLabelClass && $readingGoalsAlphabeticLabelClass && $readingGoalsPrintLabelClass && $readingGoalsPhonologicalLabelClass && $readingGoalsPhoneticLabelClass && $readingGoalsComprehensionLabelClass && $readingGoalsVocabularyLabelClass && $readingGoalsInstructionsLabelClass && $readingGoalsCriticalLabelClass && $readingGoalsCommunicateLabelClass = "class=\"errorHere\""; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database connections
On 3/30/06, Chris <[EMAIL PROTECTED]> wrote: > > Jasper Bryant-Greene wrote: > > Chris wrote: > > > >> If they're accessing the same database you don't need to > >> disconnect/reconnect. Different db's - well, yeh you don't have a > choice. > > > > > > Of course you do. mysql_select_db() or whatever it's called. Or just > > issue a USE [databasename] query. No need to reconnect! > > > > Only if you are using the same username/password, but you're right, it > is an option. php5 still has the mysql_pconnect method for persistent database connections: http://us2.php.net/mysql_pconnect -- > Postgresql & php tutorials > http://www.designmagick.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html
Re: [PHP] XML-RPC or SOAP
what about WSDL? On 3/30/06, Russell Jones <[EMAIL PROTECTED]> wrote: > > I would go with XML-RPC. I currently use XML-RPC to run LinkSleeve - a > link-spam detection tool. In my opinion, I have found XML-RPC to be easier > to use and understand. If at any point in your product you will be dealing > with customers / vendors who will be beginners with both XML-RPC and SOAP, > I > would say the learning curve for XML-RPC is much lower. I do feel, > however, > that SOAP is potentially a more robust solution. > > Anyway, just my 2 cents and, good luck. > > > > On 3/30/06, Philip Hallstrom <[EMAIL PROTECTED]> wrote: > > > > > I am at the beginning of creating a web service. As I am not very > > familar > > > with both SOAP and XML-RPC it would not make much difference in which > > one I > > > learn. > > > > > > Which one would you guys recommend for a web app that has to be > > transformed > > > into a white lable solution. > > > > I just did one using SOAP. Seems to work just fine. Just be sure to > get > > the WSDL generator from here: > > > > http://www.schlossnagle.org/~george/php/WSDL_Gen.tgz > > > > We did it using PHP5's soap extension. > > > > good luck! > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html
Re: [PHP] dynamic loading and build configurations
Mike Milano wrote: What exactly does the --with in --with-curl mean? I've built php5.1.2 on windows, and I thought that it would compile curl into the binary. It means compile the extension. It doesn't include it in the binary. Is this normal behavior? The same thing happens with openssl and zip. Depends on the extension. I guess the difference lies in how you include it: --enable-ftp doesn't build an extension (.so or .dll), but --with-curl does. The -internals list will be able to give you more info on the differences. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dynamic loading and build configurations
What exactly does the --with in --with-curl mean? I've built php5.1.2 on windows, and I thought that it would compile curl into the binary. It does not. I still need to declare CURL as an extension in the php.ini file for it to work. i.e. extension=php_curl.dll Is this normal behavior? The same thing happens with openssl and zip. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and CakePHP
Pham Huu Le Quoc Phuc wrote: > I use CakePHP > The folowing code do not execute: > > $datetime->time2str($info['Employee']['dob']) : ""?> > > Are you sure that > $info['Employee']['dob'] isn't actually empty? To see if that's the case, you could temporarily change your code to: > > $datetime->time2str($info['Employee']['dob']) : "it's empty!!"?> > HTH, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML-RPC or SOAP
I would go with XML-RPC. I currently use XML-RPC to run LinkSleeve - a link-spam detection tool. In my opinion, I have found XML-RPC to be easier to use and understand. If at any point in your product you will be dealing with customers / vendors who will be beginners with both XML-RPC and SOAP, I would say the learning curve for XML-RPC is much lower. I do feel, however, that SOAP is potentially a more robust solution. Anyway, just my 2 cents and, good luck. On 3/30/06, Philip Hallstrom <[EMAIL PROTECTED]> wrote: > > > I am at the beginning of creating a web service. As I am not very > familar > > with both SOAP and XML-RPC it would not make much difference in which > one I > > learn. > > > > Which one would you guys recommend for a web app that has to be > transformed > > into a white lable solution. > > I just did one using SOAP. Seems to work just fine. Just be sure to get > the WSDL generator from here: > > http://www.schlossnagle.org/~george/php/WSDL_Gen.tgz > > We did it using PHP5's soap extension. > > good luck! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Database connections
Jasper Bryant-Greene wrote: Chris wrote: If they're accessing the same database you don't need to disconnect/reconnect. Different db's - well, yeh you don't have a choice. Of course you do. mysql_select_db() or whatever it's called. Or just issue a USE [databasename] query. No need to reconnect! Only if you are using the same username/password, but you're right, it is an option. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database connections
Chris wrote: If they're accessing the same database you don't need to disconnect/reconnect. Different db's - well, yeh you don't have a choice. Of course you do. mysql_select_db() or whatever it's called. Or just issue a USE [databasename] query. No need to reconnect! -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database connections
Hey all, Thanks for replying. /* If you have phpmyadmin or something installed: show status like '%connection%'; should show something. */Ok, will give that a shot./*If they're accessing the same database you don't need to disconnect/reconnect. Different db's - well, yeh you don't have a choice. */Some luck hereits just one DB and maybe 5 tables totally./* > Suggestions welcome.. Without knowing what you're doing or what queries you're running we can't really help.. and you can't tell us 'coz of the NDA.. so I guess we're stuck ;)*/Sorry about that, will try to make a explanation as cryptic as possible about the project and as open as possible for the developerso you guys can help me and i am within the NDA...will write back again tomorrow.Thanks again,Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database connections
Ryan A wrote: Hi Phillip/Chris, Thanks for replying. Other than actually asking the host and taking a chance of pissing them off before i have even done anythingis there any way to find out the max connections by looking at the phpinfo() ? If you have phpmyadmin or something installed: show status like '%connection%'; should show something. /* I hope you're not connecting/disconnecting between queries... */ Unfortunatly i have tofor each site, the more sites...the more querying :-( If they're accessing the same database you don't need to disconnect/reconnect. Different db's - well, yeh you don't have a choice. Suggestions welcome.. Without knowing what you're doing or what queries you're running we can't really help.. and you can't tell us 'coz of the NDA.. so I guess we're stuck ;) -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database connections
On Thu, 2006-03-30 at 19:31, Philip Hallstrom wrote: > > I have almost finished making a set of scripts that would communicate with > > maybe 1k sites to start with... > > > > I'm sorry I cannot give you more details about the scripts but this guy is > > really nervious and had me sign an NDA etc etc > > > > but what i would like to know is; would there be a problem with connecting > > to the database many hundred/thousand times a minute? (esp on a shared > > server as this guy and I cannot afford a dedicated at this point) > > Mostly the "normal/usual" queries...eg: select, update, delete very little > > JOIN or sub-selects > > There's no problem doing that... 1,000 times a minute is only 16 queries a > second. Ummm, he said connecting, not querying. Remote sites often take more than a second to establish a connection. Good luck. And if I was the host, I'd have limits slammed on you the same day (if not already) *lol*. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database connections
Hi Phillip/Chris, Thanks for replying. Other than actually asking the host and taking a chance of pissing them off before i have even done anythingis there any way to find out the max connections by looking at the phpinfo() ? /* I hope you're not connecting/disconnecting between queries... */ Unfortunatly i have tofor each site, the more sites...the more querying :-( Suggestions welcome.. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Instalation problem
Mauricio Masias wrote: I have a problem with PHP5, I'm using Apache1.3 as web server in winXP SP2 , y change the httpd file: LoadModule php5_module "C:/php/php5apache.dll" also AddModule mod_php5.c then TypesConfig conf/mime.types AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps I also change the directory root. to htdocs Then I copy and rename the php.ini file to my c:\windows also copy the php5ts.dll file to the bin directory of apache. then save the file and restart the server.. but it just not work. I create the file phpinfo.php containig: From the browser I tried: "http://localhost/phpinfo.php"; and the server work 'cause y searches the file, but do not reconigze PHP, it just show the same code in a white screen. Try Your php.ini might have short_tags disabled which means you have to use Check your apache logs. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and CakePHP
Pham Huu Le Quoc Phuc wrote: It doesn't show any thing while $info['Employee']['dob'] isn't empty. This is my code add this: $x = $datetime->time2str($info['Employee']['dob']); echo "dob: " . $info['Employee']['dob'] . "; x: " . $x . ""; and make sure that $datetime (whatever that is doing) is returning something. If it's not, look at that and go from there. The folowing code do not execute: time2str($info['Employee']['dob']) : ""?> What do you mean? It doesn't show anything? Then $info['Employee']['dob'] is empty. If not, explain what you see or what happens. -- Postgresql & php tutorials http://www.designmagick.com/ -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database connections
Ryan A wrote: Hi, I have almost finished making a set of scripts that would communicate with maybe 1k sites to start with... I'm sorry I cannot give you more details about the scripts but this guy is really nervious and had me sign an NDA etc etc but what i would like to know is; would there be a problem with connecting to the database many hundred/thousand times a minute? (esp on a shared server as this guy and I cannot afford a dedicated at this point) On a shared server? Most likely yes. Either you'll kill the mysql server (for everyone) or they will have you set up with limited connections. I'm assuming you're using a mysql database: http://dev.mysql.com/doc/refman/5.0/en/grant.html <-- see MAX_CONNECTIONS_PER_HOUR http://dev.mysql.com/doc/refman/5.0/en/too-many-connections.html Other databases will have similar limitations. I hope you're not connecting/disconnecting between queries... -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database connections
I have almost finished making a set of scripts that would communicate with maybe 1k sites to start with... I'm sorry I cannot give you more details about the scripts but this guy is really nervious and had me sign an NDA etc etc but what i would like to know is; would there be a problem with connecting to the database many hundred/thousand times a minute? (esp on a shared server as this guy and I cannot afford a dedicated at this point) Mostly the "normal/usual" queries...eg: select, update, delete very little JOIN or sub-selects There's no problem doing that... 1,000 times a minute is only 16 queries a second. That's not that bad from a technical point of view, but from a political point of view you'd have to ask your ISP what they think. ISP's have been known to get upset about this sort of stuff... just depends on what their rules are. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML-RPC or SOAP
I am at the beginning of creating a web service. As I am not very familar with both SOAP and XML-RPC it would not make much difference in which one I learn. Which one would you guys recommend for a web app that has to be transformed into a white lable solution. I just did one using SOAP. Seems to work just fine. Just be sure to get the WSDL generator from here: http://www.schlossnagle.org/~george/php/WSDL_Gen.tgz We did it using PHP5's soap extension. good luck! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Database connections
Hi, I have almost finished making a set of scripts that would communicate with maybe 1k sites to start with... I'm sorry I cannot give you more details about the scripts but this guy is really nervious and had me sign an NDA etc etc but what i would like to know is; would there be a problem with connecting to the database many hundred/thousand times a minute? (esp on a shared server as this guy and I cannot afford a dedicated at this point) Mostly the "normal/usual" queries...eg: select, update, delete very little JOIN or sub-selects Thanks for your time. Cheers, Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP MVC
Hey all, thanks for all the help upfront! In MVC I have a controller e.g PermissionController.php for my application which manages permissions of groups/users etc... So a controller loads up, and assuming theres nothing passed in request loads the default module in this case Permissions. (module or model which ever you want to call it). The controller calls the execute method on Permission module, and then the view method of that module. My question is... the view needs to have a select box with all the groups so you can select the group for which you want to set the permissions for, how can i allow the permission module to retrieve this data and display it. Basically would i need to do something like pass back an action from the permission module to the controller to call a function of the groups module to get the groups, or can i access the groups module directly from the permission module. If anyone can help and maybe give me an diagram/example would be much appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Fatal error: Allowed memory exhausted
Means not bad - if it's REALLY well controlled. But, to risky. :) Chris wrote: [EMAIL PROTECTED] wrote: ok, then. how "smart" is to do something like this? what's a bad side? Your memory will runaway and your script could potentially take over the server and slow everything down. Just like any other script could. [EMAIL PROTECTED] wrote: Hi, I'm working on the script that has to read csv file (51 column an a little bit over 3000 rows) with products and store the info in DB. Script works fine while I tested on csv files up to 200 records. And, when I tried to upload REAL data I got this. PHP: Fatal error: Allowed memory size of 8388608 bytes exhausted ... On google I found as a solution to put ini_set("memory_limit","12M"); on the top of the script, except allowed memory size wasn't 8m then 12m bytes. I tried with 16M and it worked :) My question is how "far" I can go with increasing? Where is "the limit"? Why is not 24M as default in php.ini? Thanks! -afan if you set the memory_limit to 0, then the script has unlimited memory to its disposal. Actually you need to set it to -1. http://www.php.net/manual/en/ini.core.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Fatal error: Allowed memory exhausted
[EMAIL PROTECTED] wrote: ok, then. how "smart" is to do something like this? what's a bad side? Your memory will runaway and your script could potentially take over the server and slow everything down. Just like any other script could. [EMAIL PROTECTED] wrote: Hi, I'm working on the script that has to read csv file (51 column an a little bit over 3000 rows) with products and store the info in DB. Script works fine while I tested on csv files up to 200 records. And, when I tried to upload REAL data I got this. PHP: Fatal error: Allowed memory size of 8388608 bytes exhausted ... On google I found as a solution to put ini_set("memory_limit","12M"); on the top of the script, except allowed memory size wasn't 8m then 12m bytes. I tried with 16M and it worked :) My question is how "far" I can go with increasing? Where is "the limit"? Why is not 24M as default in php.ini? Thanks! -afan if you set the memory_limit to 0, then the script has unlimited memory to its disposal. Actually you need to set it to -1. http://www.php.net/manual/en/ini.core.php -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Visa / MasterCard security compliance
Dan Harrington wrote: One of these requirements is cardholder data encryption -- is anyone aware of a PHP/MySQL/Linux/Apache solution for end-to-end cardholder data encryption that satisfies the Visa / MasterCard requirements? Apache supports SSL/TLS. Therefore the credit card data can be encrypted in transit to you (you'll probably need to shell out for an SSL cert). Your credit-card processing gateway will provide SSL/TLS encryption for your connection to them (be it via SOAP, REST, whatever). If you really have to store the data for any reason, PHP's mcrypt extension allows you to encrypt it before storing it in the database. But avoid storing it if you can. There you have it, end-to-end data encryption. That's basically the way I do it (I don't store card information so only the first two paragraphs apply), and I satisfy Visa and Mastercard's requirements. :) -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Visa / MasterCard security compliance
Hello everyone, As you may know, Visa and MasterCard have some pretty extensive security requirements for merchants who accept a larger number of credit card transactions E.g. http://usa.visa.com/business/accepting_visa/ops_risk_management/cisp_merchan ts.html https://sdp.mastercardintl.com/documentation/index.shtml One of these requirements is cardholder data encryption -- is anyone aware of a PHP/MySQL/Linux/Apache solution for end-to-end cardholder data encryption that satisfies the Visa / MasterCard requirements? Thanks Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
No, I'm creating remote service and it's returning codes according to passed parameters. I only wanted to test it using browsers... I do not care about the output actually, but the status code B. Jasper Bryant-Greene wrote: The default Apache error handler is not called when PHP sends a 404 header. The code that does Apache error handling happens *before* PHP gets in the loop, and checks to see if the script being referenced exists, which it indeed does, whether it sends a 404 header or not. Tested on Apache 2.2 with PHP 5.1. If you really want to get the default Apache error handler to appear then either readfile() it or redirect to it. Jasper Anthony Ettinger wrote: well, you typically would redirect 404 to something like foo.com/404.html Otherwise, it's whatever your server (apache/IIS) has as the default 404 handler... Default is something like this: Not Found The requested URL /asdf was not found on this server. Apache Server at foo.org Port 80 On 3/30/06, Jasper Bryant-Greene <[EMAIL PROTECTED]> wrote: In other words, if you want Firefox/Opera/etc to display something, you have to output something. Strange, that. :P Jasper Anthony Ettinger wrote: Then it's workingFireFox, et. al. show you the server 404, IE on the otherhand has it's own 404 error page (for those newbies who don't know what a 404 is). You can disable it under IE options. On 3/30/06, Bronislav Klucka <[EMAIL PROTECTED]> wrote: Yes, I do... B. Anthony Ettinger wrote: Are you seeing the IE-specific 404 page? The one that looks like this: http://redvip.homelinux.net/varios/404-ie.jpg On 3/30/06, Bronislav Klucka <[EMAIL PROTECTED]> wrote: Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header("Status: 404 Not Found"); exit; -- MSIE displays "Page not found", but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
The default Apache error handler is not called when PHP sends a 404 header. The code that does Apache error handling happens *before* PHP gets in the loop, and checks to see if the script being referenced exists, which it indeed does, whether it sends a 404 header or not. Tested on Apache 2.2 with PHP 5.1. If you really want to get the default Apache error handler to appear then either readfile() it or redirect to it. Jasper Anthony Ettinger wrote: well, you typically would redirect 404 to something like foo.com/404.html Otherwise, it's whatever your server (apache/IIS) has as the default 404 handler... Default is something like this: Not Found The requested URL /asdf was not found on this server. Apache Server at foo.org Port 80 On 3/30/06, Jasper Bryant-Greene <[EMAIL PROTECTED]> wrote: In other words, if you want Firefox/Opera/etc to display something, you have to output something. Strange, that. :P Jasper Anthony Ettinger wrote: Then it's workingFireFox, et. al. show you the server 404, IE on the otherhand has it's own 404 error page (for those newbies who don't know what a 404 is). You can disable it under IE options. On 3/30/06, Bronislav Klucka <[EMAIL PROTECTED]> wrote: Yes, I do... B. Anthony Ettinger wrote: Are you seeing the IE-specific 404 page? The one that looks like this: http://redvip.homelinux.net/varios/404-ie.jpg On 3/30/06, Bronislav Klucka <[EMAIL PROTECTED]> wrote: Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header("Status: 404 Not Found"); exit; -- MSIE displays "Page not found", but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
well, you typically would redirect 404 to something like foo.com/404.html Otherwise, it's whatever your server (apache/IIS) has as the default 404 handler... Default is something like this: Not Found The requested URL /asdf was not found on this server. Apache Server at foo.org Port 80 On 3/30/06, Jasper Bryant-Greene <[EMAIL PROTECTED]> wrote: > In other words, if you want Firefox/Opera/etc to display something, you > have to output something. Strange, that. :P > > Jasper > > Anthony Ettinger wrote: > > Then it's workingFireFox, et. al. show you the server 404, IE on > > the otherhand has it's own 404 error page (for those newbies who don't > > know what a 404 is). You can disable it under IE options. > > > > On 3/30/06, Bronislav Klucka <[EMAIL PROTECTED]> wrote: > >> Yes, I do... > >> B. > >> > >> Anthony Ettinger wrote: > >>> Are you seeing the IE-specific 404 page? The one that looks like this: > >>> > >>> http://redvip.homelinux.net/varios/404-ie.jpg > >>> > >>> > >>> > >>> On 3/30/06, Bronislav Klucka <[EMAIL PROTECTED]> wrote: > >>> > Hi, > I'm using following construction to send http status code > -- > header('HTTP/1.1 404 Not Found'); > header("Status: 404 Not Found"); > exit; > -- > > MSIE displays "Page not found", but FireFox and Opera don't display > anything. Just blank page with no text... > > full headers sent by this script (and server itself) are: > > -- > Date: Thu, 30 Mar 2006 18:02:49 GMT > Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a > X-Powered-By: PHP/5.1.2 > Keep-Alive: timeout=15, max=99 > Connection: Keep-Alive > Transfer-Encoding: chunked > Content-Type: text/html > > 404 Not Found > -- > > can anyone tell me, why those two browsers are not affected? > > Brona > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > >>> > >>> > >>> -- > >>> Anthony Ettinger > >>> Signature: http://chovy.dyndns.org/hcard.html > >>> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > >> > > > > > > -- > > Anthony Ettinger > > Signature: http://chovy.dyndns.org/hcard.html > > > > -- > Jasper Bryant-Greene > General Manager > Album Limited > > http://www.album.co.nz/ 0800 4 ALBUM > [EMAIL PROTECTED] 021 708 334 > > -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] I have a mktime problem
> > > > > I'm having an weird issues with the date and mktime function thing > > getting unexpected results, and I was wondering if y'all > > could help clue > > me in as to what is wrong. > > Here's the code I'm running: > > echo date(M, mktime(0,0,0,2)) . "\n"; Where the 2 is > > the month. > > Now when I put in the number 1 in the month slot I get Jan > > When I put in > > 3 I get Mar When I put in 4 I get Apr Etc. > > However, when I put in 2 I get Mar and not Feb. > > > > What's up with that? What am I doing wrong here? Should I get some > > sleep? > > > > > It seems to have something to do with the fact that Feb has > only 28 or 29 > days, and today is the 30th. > > echo date(M, mktime(0,0,0,2,28)) . "\n"; > > It will return "Mar". > > JM Whoops, "Feb" I meant to say. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HAXPLORER - any info?
Turned out to be a security hole in Mambo. He has fixed it. Thanks for your assistance. - Charles On Mar 30, 2006, at 3:33 PM, Brady Mitchell wrote: -Original Message- Does anyone know anything about this, and if they do - have any thoughts on how it may have gotten on the server and how to secure against it in the future? Just trying to help out a friend here. Without knowing the exact setup of the server, we can't help much. Any service running on the system that allows people to access the system could be the culprit, or it could be weak passwords on the server, it could even be a piece of poorly written php code that allowed someone to get control. I would suggest that your friend make a list of the things he has running on his server and spend some time googling for security issues with those services/programs. Brady -- RightCode, Inc. 900 Briggs Road #130 Mount Laurel, NJ 08054 P: 856.608.7908 F: 856.439.0154 E: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] I have a mktime problem
> > I'm having an weird issues with the date and mktime function thing > getting unexpected results, and I was wondering if y'all > could help clue > me in as to what is wrong. > Here's the code I'm running: > echo date(M, mktime(0,0,0,2)) . "\n"; Where the 2 is > the month. > Now when I put in the number 1 in the month slot I get Jan > When I put in > 3 I get Mar When I put in 4 I get Apr Etc. > However, when I put in 2 I get Mar and not Feb. > > What's up with that? What am I doing wrong here? Should I get some > sleep? > It seems to have something to do with the fact that Feb has only 28 or 29 days, and today is the 30th. echo date(M, mktime(0,0,0,2,28)) . "\n"; It will return "Mar". JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] I have a mktime problem
[snip] I think this is happening because the day is being filled in by PHP as 30. Today is March 30th. Try these: echo date("d M Y", mktime(0,0,0,2)) . "\n"; //02 Mar 2006 echo date("d M Y", mktime(0,0,0,3)) . "\n"; //30 Mar 2006 PHP thinks you mean Feb 30th, which doesn't exist. So it adds 2 days and ends up being Mar 2nd. [/snip] Thanks! That fixed it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I have a mktime problem
Every missing argument is set to current value, so now you have mktime(0,0,0,2,30,2006), that is March, the 2nd. Brona Jay Blanchard wrote: I'm having an weird issues with the date and mktime function thing getting unexpected results, and I was wondering if y'all could help clue me in as to what is wrong. Here's the code I'm running: echo date(M, mktime(0,0,0,2)) . "\n"; Where the 2 is the month. Now when I put in the number 1 in the month slot I get Jan When I put in 3 I get Mar When I put in 4 I get Apr Etc. However, when I put in 2 I get Mar and not Feb. What's up with that? What am I doing wrong here? Should I get some sleep? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Fatal error: Allowed memory exhausted
hm. it looks like set_time_limit(0); ok, then. how "smart" is to do something like this? what's a bad side? > [EMAIL PROTECTED] wrote: >> Hi, >> I'm working on the script that has to read csv file (51 column an a >> little >> bit over 3000 rows) with products and store the info in DB. >> Script works fine while I tested on csv files up to 200 records. >> And, when I tried to upload REAL data I got this. >> PHP: Fatal error: Allowed memory size of 8388608 bytes exhausted ... >> >> On google I found as a solution to put >> ini_set("memory_limit","12M"); >> on the top of the script, except allowed memory size wasn't 8m then 12m >> bytes. >> I tried with 16M and it worked :) >> >> My question is how "far" I can go with increasing? Where is "the limit"? >> Why is not 24M as default in php.ini? >> >> Thanks! >> >> -afan >> > if you set the memory_limit to 0, then the script has unlimited memory > to its disposal. > > Cheers > /V > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Fatal error: Allowed memory exhausted
Spread sheet is 2M, but 12M wasn't enough. this is the code getting data from csv: $fp = fopen ('/var/www/html/afan.com/admin/tmp/'.$SpreadSheetFile,"r"); while ($data = fgetcsv ($fp, 5, ",")) { $num = count ($data); for ($c=0; $c<$num; $c++) { $PRODUCTS[$row][$c] = $data[$c]; } ++$row; } fclose ($fp); Then each row from array $PRODUCT checking if such a product no. exists and if no insert into DB, select_id(), insert into two other tables (categories and prices). > [EMAIL PROTECTED] wrote: >> Hi, >> I'm working on the script that has to read csv file (51 column an a >> little >> bit over 3000 rows) with products and store the info in DB. >> Script works fine while I tested on csv files up to 200 records. >> And, when I tried to upload REAL data I got this. >> PHP: Fatal error: Allowed memory size of 8388608 bytes exhausted ... >> >> On google I found as a solution to put >> ini_set("memory_limit","12M"); >> on the top of the script, except allowed memory size wasn't 8m then 12m >> bytes. >> I tried with 16M and it worked :) >> >> My question is how "far" I can go with increasing? Where is "the limit"? >> Why is not 24M as default in php.ini? >> >> Thanks! >> >> -afan >> >> > I think 16m should be enough in most cases.. > > Would like to see the script. Try to avoid reading large files in once > file() file_get_contents0. > Use fopen en fgets. I work with txt files over 40 m and hardly get 1 m > of memory usage. > > You could also try to run the program with the unix nice command. Just > don't think > increasing is a solution. What if you get a 300 m csv file? Well just my > 2 cents. > > Thijs > > -- > 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] I have a mktime problem
I'm having an weird issues with the date and mktime function thing getting unexpected results, and I was wondering if y'all could help clue me in as to what is wrong. Here's the code I'm running: echo date(M, mktime(0,0,0,2)) . "\n"; Where the 2 is the month. Now when I put in the number 1 in the month slot I get Jan When I put in 3 I get Mar When I put in 4 I get Apr Etc. However, when I put in 2 I get Mar and not Feb. What's up with that? What am I doing wrong here? Should I get some sleep? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Fatal error: Allowed memory exhausted
[EMAIL PROTECTED] wrote: > Hi, > I'm working on the script that has to read csv file (51 column an a little > bit over 3000 rows) with products and store the info in DB. > Script works fine while I tested on csv files up to 200 records. > And, when I tried to upload REAL data I got this. > PHP: Fatal error: Allowed memory size of 8388608 bytes exhausted ... > > On google I found as a solution to put > ini_set("memory_limit","12M"); > on the top of the script, except allowed memory size wasn't 8m then 12m > bytes. > I tried with 16M and it worked :) > > My question is how "far" I can go with increasing? Where is "the limit"? > Why is not 24M as default in php.ini? > > Thanks! > > -afan > > I think 16m should be enough in most cases.. Would like to see the script. Try to avoid reading large files in once file() file_get_contents0. Use fopen en fgets. I work with txt files over 40 m and hardly get 1 m of memory usage. You could also try to run the program with the unix nice command. Just don't think increasing is a solution. What if you get a 300 m csv file? Well just my 2 cents. Thijs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
In other words, if you want Firefox/Opera/etc to display something, you have to output something. Strange, that. :P Jasper Anthony Ettinger wrote: Then it's workingFireFox, et. al. show you the server 404, IE on the otherhand has it's own 404 error page (for those newbies who don't know what a 404 is). You can disable it under IE options. On 3/30/06, Bronislav Klucka <[EMAIL PROTECTED]> wrote: Yes, I do... B. Anthony Ettinger wrote: Are you seeing the IE-specific 404 page? The one that looks like this: http://redvip.homelinux.net/varios/404-ie.jpg On 3/30/06, Bronislav Klucka <[EMAIL PROTECTED]> wrote: Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header("Status: 404 Not Found"); exit; -- MSIE displays "Page not found", but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Outputting text "
tedd wrote: Merlin: First the syntax should be: <-- note the close / No, that is invalid XML. The specification is available at http://www.w3.org/TR/XML11 (and makes riveting reading! ;) [snip] If you want to print it to a web page, try: EOD; echo($a); echo ''; would work just as well and is a hell of a lot easier to look at. That's assuming you actually want it to appear on the page for the user to see, if you want the browser to interpret it you'll have to change the < at the start to a < -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HAXPLORER - any info?
> -Original Message- > Does anyone know anything about this, and if they do - have any > thoughts on how it may have gotten on the server and how to secure > against it in the future? Just trying to help out a friend here. Without knowing the exact setup of the server, we can't help much. Any service running on the system that allows people to access the system could be the culprit, or it could be weak passwords on the server, it could even be a piece of poorly written php code that allowed someone to get control. I would suggest that your friend make a list of the things he has running on his server and spend some time googling for security issues with those services/programs. Brady -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Overloading Limitation- Can Someone Confirm?
Jochem Maas wrote: Jasper Bryant-Greene wrote: Jochem Maas wrote: I think its a misunderstanding on the one side and a limitation on the other, you can't use overloading directly on items of an overloaded array e.g: echo $tc->arr['a'] this is triggers a call to __get() with the $key parameter set to something like (I'm guessing) "arr['a']" No, I'm pretty sure (too lazy and tired right now to test...) that if you guess wrong :-) .. I couldn't resist testing it: php -r ' class T { private $var = array(); function __set($k, $v) { $this->var[$k] = $v; } function __get($k) { var_dump($k); } } $t = new T; $t->arr = array(); $t->arr["a"] = 1; echo "OUTPUT: \n"; var_dump($t->arr); var_dump($t->arr["a"]); var_dump($t); ' That's weird, because I did get around to testing it before I saw your mail, and in my test it works as *I* expect (PHP 5.1.2)... My comments earlier were based on the fact that it would not be good to limit what can be put in an object through __get and __set effectively to scalar variables, and I would expect the engine developers to realise that. I think they have (unless I've done something stupid in my test code...): Code: array[$key]; } public function __set( $key, $value ) { $this->array[$key] = $value; } } $t = new T; $t->insideArray = array(); $t->insideArray['test'] = 'testing!'; var_dump( $t ); ?> Output: object(T)#1 (1) { ["array:private"]=> array(1) { ["insideArray"]=> array(1) { ["test"]=> string(8) "testing!" } } } -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP: Fatal error: Allowed memory exhausted
Hi, I'm working on the script that has to read csv file (51 column an a little bit over 3000 rows) with products and store the info in DB. Script works fine while I tested on csv files up to 200 records. And, when I tried to upload REAL data I got this. PHP: Fatal error: Allowed memory size of 8388608 bytes exhausted ... On google I found as a solution to put ini_set("memory_limit","12M"); on the top of the script, except allowed memory size wasn't 8m then 12m bytes. I tried with 16M and it worked :) My question is how "far" I can go with increasing? Where is "the limit"? Why is not 24M as default in php.ini? Thanks! -afan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
Then it's workingFireFox, et. al. show you the server 404, IE on the otherhand has it's own 404 error page (for those newbies who don't know what a 404 is). You can disable it under IE options. On 3/30/06, Bronislav Klucka <[EMAIL PROTECTED]> wrote: > Yes, I do... > B. > > Anthony Ettinger wrote: > > Are you seeing the IE-specific 404 page? The one that looks like this: > > > > http://redvip.homelinux.net/varios/404-ie.jpg > > > > > > > > On 3/30/06, Bronislav Klucka <[EMAIL PROTECTED]> wrote: > > > >>Hi, > >>I'm using following construction to send http status code > >>-- > >>header('HTTP/1.1 404 Not Found'); > >>header("Status: 404 Not Found"); > >>exit; > >>-- > >> > >>MSIE displays "Page not found", but FireFox and Opera don't display > >>anything. Just blank page with no text... > >> > >>full headers sent by this script (and server itself) are: > >> > >>-- > >>Date: Thu, 30 Mar 2006 18:02:49 GMT > >>Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a > >>X-Powered-By: PHP/5.1.2 > >>Keep-Alive: timeout=15, max=99 > >>Connection: Keep-Alive > >>Transfer-Encoding: chunked > >>Content-Type: text/html > >> > >>404 Not Found > >>-- > >> > >>can anyone tell me, why those two browsers are not affected? > >> > >>Brona > >> > >>-- > >>PHP General Mailing List (http://www.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > >> > > > > > > > > -- > > Anthony Ettinger > > Signature: http://chovy.dyndns.org/hcard.html > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
Yes, I do... B. Anthony Ettinger wrote: Are you seeing the IE-specific 404 page? The one that looks like this: http://redvip.homelinux.net/varios/404-ie.jpg On 3/30/06, Bronislav Klucka <[EMAIL PROTECTED]> wrote: Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header("Status: 404 Not Found"); exit; -- MSIE displays "Page not found", but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
Are you seeing the IE-specific 404 page? The one that looks like this: http://redvip.homelinux.net/varios/404-ie.jpg On 3/30/06, Bronislav Klucka <[EMAIL PROTECTED]> wrote: > Hi, > I'm using following construction to send http status code > -- > header('HTTP/1.1 404 Not Found'); > header("Status: 404 Not Found"); > exit; > -- > > MSIE displays "Page not found", but FireFox and Opera don't display > anything. Just blank page with no text... > > full headers sent by this script (and server itself) are: > > -- > Date: Thu, 30 Mar 2006 18:02:49 GMT > Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a > X-Powered-By: PHP/5.1.2 > Keep-Alive: timeout=15, max=99 > Connection: Keep-Alive > Transfer-Encoding: chunked > Content-Type: text/html > > 404 Not Found > -- > > can anyone tell me, why those two browsers are not affected? > > Brona > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Instalation problem
I have a problem with PHP5, I'm using Apache1.3 as web server in winXP SP2 , y change the httpd file: LoadModule php5_module "C:/php/php5apache.dll" also AddModule mod_php5.c then TypesConfig conf/mime.types AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps I also change the directory root. to htdocs Then I copy and rename the php.ini file to my c:\windows also copy the php5ts.dll file to the bin directory of apache. then save the file and restart the server.. but it just not work. I create the file phpinfo.php containig: From the browser I tried: "http://localhost/phpinfo.php"; and the server work 'cause y searches the file, but do not reconigze PHP, it just show the same code in a white screen. I shut down de SP2 firewall, also the AV(just in case) and throw the same result. then modify some things form the php.ini, but still doesn't work. so, please, anyone have the solution? or I just better use IIS? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTTP status code
Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header("Status: 404 Not Found"); exit; -- MSIE displays "Page not found", but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HAXPLORER - any info?
My buddy just called me and let me know he found this running on his server. I have googled it and come up with much, but it appears to be a php script that gives the user pretty much total control of adding, editing, deleting - files, folders, etc. As well as giving them access to run any shell script they want. Does anyone know anything about this, and if they do - have any thoughts on how it may have gotten on the server and how to secure against it in the future? Just trying to help out a friend here. Thanks, Charles -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] White label with PHP?
On Wednesday 29 March 2006 9:52 am, Merlin wrote: > white label solution Can someone enlighten me as to what this means? Thanks. -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can "output_buffering" be set in a script?
http://us2.php.net/ob_start Hope this helps http://www.ouradoptionblog.com Join our journey of adoption http://www.thelonecoder.com [EMAIL PROTECTED] continuing the struggle against bad code */ ?> > From: Todd Cary <[EMAIL PROTECTED]> > Date: Thu, 30 Mar 2006 08:02:16 -0800 > To: > Subject: [PHP] Can "output_buffering" be set in a script? > > I do not have access to the php.ini file and I need to have > output_buffering turned on. Can this be done within a script? > > Thank you > > -- > 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] Can "output_buffering" be set in a script?
On Thursday 30 March 2006 9:02 am, Todd Cary wrote: > I do not have access to the php.ini file and I need to have > output_buffering turned on. Can this be done within a script? > > Thank you Yep. http://us2.php.net/manual/en/function.ob-start.php That link should get you started. -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can "output_buffering" be set in a script?
[snip] I do not have access to the php.ini file and I need to have output_buffering turned on. Can this be done within a script? [/snip] http://www.php.net/ob_start -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can "output_buffering" be set in a script?
> > I do not have access to the php.ini file and I need to have > output_buffering turned on. Can this be done within a script? If your web host allows it, you may be able to set it with ini_set(). See www.php.net/ini_set and also http://us2.php.net/manual/en/ref.outcontrol.php#ini.output-buffering JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can "output_buffering" be set in a script?
I do not have access to the php.ini file and I need to have output_buffering turned on. Can this be done within a script? Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't get XSLT on PHP
I have it working with : --with-xsl --enable-xslt --with-xslt-sablot Do you have the libxslt-devel package ? I'm not sure if it compiles it as module... If it is module make sure it is enabled in php.ini On Wednesday March 29 2006 22:17, MARG wrote: > Anthony Ettinger wrote: > > obvious one, but did you restart apache? > > Sure :) > > -- AM > > > On 3/29/06, MARG <[EMAIL PROTECTED]> wrote: > >>Hi, > >> > >>I'm trying to get XSLT support on PHP, but i'm not able :( > >> > >>I've compiled Sablotron 1.0.2 successfully and compiled PHP 5.1.2 with > >>--enable-xslt \ > >>--with-xslt-sablot > >> > >>I get no errors and PHP works fine, but i get no XSLT support (confirmed > >>via phpinfo()). > >> > >>Any ideas ? > >> > >>Any help would be apreciated. > >> > >>Warm Regards, > >>MA > >> > >>-- > >>PHP General Mailing List (http://www.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > > Anthony Ettinger > > Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Overloading Limitation- Can Someone Confirm?
Jasper Bryant-Greene wrote: Jochem Maas wrote: I think its a misunderstanding on the one side and a limitation on the other, you can't use overloading directly on items of an overloaded array e.g: echo $tc->arr['a'] this is triggers a call to __get() with the $key parameter set to something like (I'm guessing) "arr['a']" No, I'm pretty sure (too lazy and tired right now to test...) that if you guess wrong :-) .. I couldn't resist testing it: php -r ' class T { private $var = array(); function __set($k, $v) { $this->var[$k] = $v; } function __get($k) { var_dump($k); } } $t = new T; $t->arr = array(); $t->arr["a"] = 1; echo "OUTPUT: \n"; var_dump($t->arr); var_dump($t->arr["a"]); var_dump($t); ' things work as they should, it will look up __get() with the key parameter set to 'arr', and treat the return value of that as an array, looking for the 'a' key inside that array. Or at least it should, dammit. really should it? if you had written this engine functionality yourself and it did not work as you intended I could understand yuor remark - but I'm pretty sure you didn't write it. It's very simple to state something should work a certain way - you'll probably find it rahter harder to actually make the core engine handle stuff like this in way that ... a: is robust b: is intuitive to most people c: actually works -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] webservice
[snip] > soap_fault Object ( [error_message_prefix] => [mode] => 1 [level] => 1024 > [code] => WSDL [message] => no operation readpackageabstract in wsdl [/snip] It appears as though you're attempting to invoke a method that doesn't exist. Are you sure readPackageAbstract() is defined & registered in the WSDL you're pointing to? John W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] webservice
Does anyone know why I am getting the result below? http://test.xtravelsystem.com/public/v1_0rc1/commonsHandler?WSDL";) ; $res = $PerlPackageDatabase->readPackageAbstract("SOAP-Lite"); print_r($res); ?> I GET THIS RESULT: soap_fault Object ( [error_message_prefix] => [mode] => 1 [level] => 1024 [code] => WSDL [message] => no operation readpackageabstract in wsdl [userinfo] => http://test.xtravelsystem.com/public/v1_0rc1/commonsHandler?WSDL [backtrace] => Array ( [0] => Array ( [file] => c:\inetpub\wwwroot\usr\local\global\php\online\SOAP\Fault.php [line] => 60 [function] => pear_error [class] => pear_error [type] => :: [args] => Array ( [0] => no operation readpackageabstract in wsdl [1] => WSDL [2] => 1 [3] => 1024 [4] => http://test.xtravelsystem.com/public/v1_0rc1/commonsHandler?WSDL ) ) [1] => Array ( [file] => C:\Inetpub\wwwroot\usr\local\lib\php\Pear.php [line] => 538 [function] => soap_fault [class] => soap_fault [type] => -> [args] => Array ( [0] => no operation readpackageabstract in wsdl [1] => WSDL [2] => 1 [3] => 1024 [4] => Array ( [actor] => [detail] => http://test.xtravelsystem.com/public/v1_0rc1/commonsHandler?WSDL ) ) ) [2] => Array ( [file] => c:\inetpub\wwwroot\usr\local\global\php\online\SOAP\Base.php [line] => 118 [function] => raiseerror [class] => soap_wsdl [type] => -> [args] => Array ( [0] => no operation readpackageabstract in wsdl [1] => WSDL [2] => [3] => [4] => Array ( [actor] => [detail] => http://test.xtravelsystem.com/public/v1_0rc1/commonsHandler?WSDL ) [5] => SOAP_Fault [6] => ) ) [3] => Array ( [file] => c:\inetpub\wwwroot\usr\local\global\php\online\SOAP\WSDL.php [line] => 98 [function] => raisesoapfault [class] => soap_wsdl [type] => -> [args] => Array ( [0] => no operation readpackageabstract in wsdl [1] => http://test.xtravelsystem.com/public/v1_0rc1/commonsHandler?WSDL ) ) [4] => Array ( [file] => c:\inetpub\wwwroot\usr\local\global\php\online\SOAP\Client.php [line] => 153 [function] => getportname [class] => soap_wsdl [type] => -> [args] => Array ( [0] => readpackageabstract ) ) [5] => Array ( [file] => c:\inetpub\wwwroot\usr\local\global\php\online\SOAP\Client.php [line] => 311 [function] => call -- Diana Castillo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: upgrade of PHP failed
Merlin wrote: Hi there, I just tried to upgrade to the newest 4.x version from 4.3.11. No trying to start apache I do get following error message: Starting apache/usr/local/apache/bin/httpd: relocation error: .//usr/local/lib/php/extensions/debug-non-zts-20020429/upload_progress_meter.so: undefined symbol: upload_progress_register_callback startproc: exit status of parent of /usr/local/apache/bin/httpd: 127 This does not tell me anything. My config looks like this: './configure' '--with-gd' '--with-freetype-dir=/usr/lib' '--enable-gd-native-ttf' '--enable-gd-imgstrttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr/lib' '--with-zlib' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-ftp' '--with-mysql' '--with-pdflib' '--with-xml' '--with-gettext' '--enable-sysvsem' '--enable-sysvshm' '--with-curl' '--enable-xslt' '--with-xslt-sablot=/usr/local/' '--enable-debug' '--with-PEAR' --with-xmlrpc Can somebody give me a hint what has happened? Thank you in advance, Merlin Your config looks funny why do you have 2 times --enable-sysvem? if you remove --enable-debug it might work. looks like that debug module has an CRC error or something like that. btw. wasn't there an installation list around here? Greets Barry -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Outputting text "
At 11:28 AM +0200 3/30/06, Merlin wrote: Hi there, I would like to output following text with php: How can I do that? I tried to escape the ? with \? but this did not help. Any ideas? Thank you for any hint, Merlin Merlin: First the syntax should be: <-- note the close / Second, to what do you want to output the text? If you want to write it to a text file, try: $filename = "text.txt"; $file = fopen( $filename, "w" ); fwrite( $file, ''); fclose( $file ); If you want to print it to a web page, try: EOD; echo($a); HTH's tedd PS: I would also consider changing the encoding to utf-8 -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upgrade of PHP failed
Hi there, I just tried to upgrade to the newest 4.x version from 4.3.11. No trying to start apache I do get following error message: Starting apache/usr/local/apache/bin/httpd: relocation error: .//usr/local/lib/php/extensions/debug-non-zts-20020429/upload_progress_meter.so: undefined symbol: upload_progress_register_callback startproc: exit status of parent of /usr/local/apache/bin/httpd: 127 This does not tell me anything. My config looks like this: './configure' '--with-gd' '--with-freetype-dir=/usr/lib' '--enable-gd-native-ttf' '--enable-gd-imgstrttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr/lib' '--with-zlib' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-ftp' '--with-mysql' '--with-pdflib' '--with-xml' '--with-gettext' '--enable-sysvsem' '--enable-sysvshm' '--with-curl' '--enable-xslt' '--with-xslt-sablot=/usr/local/' '--enable-debug' '--with-PEAR' --with-xmlrpc Can somebody give me a hint what has happened? Thank you in advance, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IP Address Filtering
Ave, Curt, thanks for your response. > Is this a common guestbook, like a 3rd party tool you got and added > to the web site? If so, do they already have a solution in place > with an add-on or such. No, actually it's a script I have written myself from scratch. And unfortunately (or fortunately perhaps), I haven't ever run into this problem before. > You really want to use $_SERVER['REMOTE_ADDR']; That is should, I agree! > A common method (now adays) is have the form that is being posted > provide a challange/response method (like CAPTCHA) to verify that > someone is actually sitting there filling out the form instead of a > script doing the work. > > One of the problems with this method is well it limits your > "visually" impared audience from being able to add to the > guestbook, since it requires a visual response to the challenge. > > Another method is to require javascript for a challenge response > method, this of course limits your audience to those who have > javascript enabled, and I'm not sure if it really 'visually > impared' friendly. I have implemented both those methods in different scripts I have written and maintain across different websites. Visual Confirmation using Image Verification and JavaScript Confirmation. However, I honestly don't want to add such an 'extra' step in my Guestbook for users who simply wish to put in a nice comment about the site, at least not at this point, which is why I do want to stay away from these methods for the Guestbook for now. Let me try a few other suggestions first and see how it goes, and then I'll decide if I need to add more capabilities/security to the Guestbook. Thanks for your insight, always brain-enhancing. Rahul S. Johari Coordinator, Internet & Administration Informed Marketing Services Inc. 500 Federal Street, Suite 201 Troy NY 12180 Tel: (518) 687-6700 x154 Fax: (518) 687-6799 Email: [EMAIL PROTECTED] http://www.informed-sources.com
Re: [PHP] IP Address Filtering
Rahul S. Johari wrote: Ave, I have to say I absolutely love your idea! It¹s probably a solution for my problem, at the same time, like the other guy said, freaking hilarious!!! :0) I think I¹ll probably write up a script that displays everything except records with NULL as IP for regular audience... And displays all records with NULL as IP for audience who¹s IP is recorded as NULL. Thanks! Could ipv6 make problems here? If apache or similiar apps don't recognize it you also will get NULL. Greets Barry -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IP Address Filtering
Ave, I have to say I absolutely love your idea! It¹s probably a solution for my problem, at the same time, like the other guy said, freaking hilarious!!! :0) I think I¹ll probably write up a script that displays everything except records with NULL as IP for regular audience... And displays all records with NULL as IP for audience who¹s IP is recorded as NULL. Thanks! Rahul S. Johari Coordinator, Internet & Administration Informed Marketing Services Inc. 500 Federal Street, Suite 201 Troy NY 12180 Tel: (518) 687-6700 x154 Fax: (518) 687-6799 Email: [EMAIL PROTECTED] http://www.informed-sources.com On 3/29/06 4:13 PM, "Joe Harman" <[EMAIL PROTECTED]> wrote: > if you really want to mess with them.. only show the user with the > NULL IP address all the spam posts.. .make them think that they've > been successful > > On 3/29/06, Rahul S. Johari <[EMAIL PROTECTED]> wrote: > > > -- > Joe Harman > - > * My programs never have bugs, they just develop random features. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php
FW: [PHP] php error reporting problem
-Original Message- From: ngwarai zed [mailto:[EMAIL PROTECTED] Sent: 30 March 2006 13:36 I am using Fedora core 4. yes I stopped and restarted apache On 3/30/06, Ford, Mike wrote: On 29 March 2006 15:25, ngwarai zed wrote: > phpinfo says > > Configuration File (php.ini) Path /etc/php.ini > > And the file I am editing is /etc/php.ini Is this not the > one Iam supposed to edit? On list please! H'mmm -- file permissions? You've stopped and restarted Apache? Which operating system? Starting to clutch at straws, now! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List ( http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm
Re: [PHP] Overloading Limitation- Can Someone Confirm?
Jochem Maas wrote: I think its a misunderstanding on the one side and a limitation on the other, you can't use overloading directly on items of an overloaded array e.g: echo $tc->arr['a'] this is triggers a call to __get() with the $key parameter set to something like (I'm guessing) "arr['a']" No, I'm pretty sure (too lazy and tired right now to test...) that if things work as they should, it will look up __get() with the key parameter set to 'arr', and treat the return value of that as an array, looking for the 'a' key inside that array. Or at least it should, dammit. -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML-RPC or SOAP
Hello there, I am at the beginning of creating a web service. As I am not very familar with both SOAP and XML-RPC it would not make much difference in which one I learn. Which one would you guys recommend for a web app that has to be transformed into a white lable solution. Thank you for any recommendations, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Overloading Limitation- Can Someone Confirm?
Chris wrote: While playing with an unnamed framework, I think I discovered an overloading limitation (PHP 5.1.2). Can someone please confirm this limitation? Example class: class testClass { public $vars = array(); public function __get($key) { return array_key_exists($key, $this->vars) ? $this->vars [$key] : null; } public function __set($key, $value) { $this->vars[$key] = $value; } public function __isset($key) { return array_key_exists($key, $this->vars); } public function __unset($key) { unset($this->vars[$key]); } } Given the above class, the following code will not work: $tc = new testClass(); $tc->arr = array(); $tc->arr['a'] = 'A'; $tc->arr['b'] = 'B'; if (isset($tc->arr['b'])) { unset($tc->arr['b']); } //var_dump is only to see results of above var_dump($tc); Am I a moron or, in fact, does this not work and is a language limitation? I think its a misunderstanding on the one side and a limitation on the other, you can't use overloading directly on items of an overloaded array e.g: echo $tc->arr['a'] this is triggers a call to __get() with the $key parameter set to something like (I'm guessing) "arr['a']" ... what $key is set to it surely wont be a key in the array testClass->vars (do some test otherwise to see eactly what $key contains if you do "echo $tc->arr['c']" maybe it contains something useful after all) try this: a = 'A'; $tc->b = 'B'; if (isset($tc->b)) { unset($tc->b); } var_dump($tc); Chris [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Overloading Limitation- Can Someone Confirm?
Chris wrote: class testClass { public $vars = array(); public function __get($key) { return array_key_exists($key, $this->vars) ? $this->vars[$key] : null; } public function __set($key, $value) { $this->vars[$key] = $value; } public function __isset($key) { return array_key_exists($key, $this->vars); } public function __unset($key) { unset($this->vars[$key]); } } $tc = new testClass(); $tc->arr = array(); here you store an empty array in the $vars member array, under the key 'arr' (due to your magic methods). is that what you intended? $tc->arr['a'] = 'A'; $tc->arr['b'] = 'B'; now you are adding elements to this array under the 'arr' key in the $vars member array. if (isset($tc->arr['b'])) { unset($tc->arr['b']); } you just removed b from the array under 'arr' in the $vars member array. //var_dump is only to see results of above var_dump($tc); this should show something equiv. to: array( 'arr' => array( 'a' => 'A' ) ) what does it actually show? -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Overloading Limitation- Can Someone Confirm?
While playing with an unnamed framework, I think I discovered an overloading limitation (PHP 5.1.2). Can someone please confirm this limitation? Example class: class testClass { public $vars = array(); public function __get($key) { return array_key_exists($key, $this->vars) ? $this->vars [$key] : null; } public function __set($key, $value) { $this->vars[$key] = $value; } public function __isset($key) { return array_key_exists($key, $this->vars); } public function __unset($key) { unset($this->vars[$key]); } } Given the above class, the following code will not work: $tc = new testClass(); $tc->arr = array(); $tc->arr['a'] = 'A'; $tc->arr['b'] = 'B'; if (isset($tc->arr['b'])) { unset($tc->arr['b']); } //var_dump is only to see results of above var_dump($tc); Am I a moron or, in fact, does this not work and is a language limitation? Chris [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 5 and XSLT again
Hi, I'm still trying to get PHP 5.1.2 to support XSLT, but so far, no good. I read here http://www.zend.com/php5/andi-book-excerpt.php that in PHP5 is libxml2 that tak care of everything (XML, XSL, XSLT, etc.), but i've compiled it and got no XSLT support. Any help would be appreciated. Warm Regards, Mário Gamito -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP4: calling method on returned object
Karl Glennon wrote: [snip] I expected to have the ability to get the url of a location's map with the floowing statement: print $this->Location->GetMap()->GetUrl(); [snip] Is there any other syntax in PHP4 to allow me to concisely call a method on a return object? eg. ($this->Location->GetMap())->GetUrl() .. which doens't work. In short, no. That syntax was introduced in PHP5. For OO work, I would strongly recommend upgrading to PHP5 as there are many other important OO features that simply are not available in PHP4. -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP4: calling method on returned object
On Thursday 30 March 2006 14:05, Karl Glennon wrote: > Hi there, > > I have an object structure, whereby a location object contains a method > to return it's map object. The map object contains a method to return > it's URL. > > I expected to have the ability to get the url of a location's map with > the floowing statement: > > print $this->Location->GetMap()->GetUrl(); > > This works in PHP5, but in PHP4 it causes a parse error (the application > has to run on PHP4 for the moment). > > I'm currently working around this limitation as so: > > $locationMap = $this->Location->GetMap(); > print $locationMap->GetUrl(); > > Unfortunatly this senario is occuring in dozens of palces in the > application, and is quite unsightly compared to the PHP5 syntax. > > Is there any other syntax in PHP4 to allow me to concisely call a method > on a return object? eg. ($this->Location->GetMap())->GetUrl() .. which > doens't work. Try curly brackets. > > Thanks for any help, > > Karl Glennon -- Cyberly yours, Petar Nedyalkov Devoted Orbitel Fan :-) PGP ID: 7AE45436 PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436 pgpsCmA7vlSuB.pgp Description: PGP signature
[PHP] PHP4: calling method on returned object
Hi there, I have an object structure, whereby a location object contains a method to return it's map object. The map object contains a method to return it's URL. I expected to have the ability to get the url of a location's map with the floowing statement: print $this->Location->GetMap()->GetUrl(); This works in PHP5, but in PHP4 it causes a parse error (the application has to run on PHP4 for the moment). I'm currently working around this limitation as so: $locationMap = $this->Location->GetMap(); print $locationMap->GetUrl(); Unfortunatly this senario is occuring in dozens of palces in the application, and is quite unsightly compared to the PHP5 syntax. Is there any other syntax in PHP4 to allow me to concisely call a method on a return object? eg. ($this->Location->GetMap())->GetUrl() .. which doens't work. Thanks for any help, Karl Glennon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to create RSS feeds with PHP?
chris smith schrieb: On 3/30/06, Merlin <[EMAIL PROTECTED]> wrote: chris smith schrieb: On 3/28/06, Merlin <[EMAIL PROTECTED]> wrote: Hi there, I am wondering if there are already tools out there which do create RSS feeds on the fly with the help of PHP. My goal would be to create RSS dynamicly out of a LAMP App. to syndicate the results. Are there any tools you know about? This might get you started: http://www.phpclasses.org/browse/package/2957.html -- Postgresql & php tutorials http://www.designmagick.com/ Hi Chris, thank you for that hint. That worked excellent. There is just one small thing I can not figure out. Including images into that feed. Using your mentioned classes I have following code: $rss_channel = new rssGenerator_channel(); $rss_channel->title = 'test'; $rss_channel->link = 'test.com'; $rss_channel->description = 'test'; $rss_channel->language = 'en-us'; $rss_channel->generator = 'RSS Feed Generator'; $rss_channel->managingEditor = '[EMAIL PROTECTED]'; $rss_channel->webMaster = '[EMAIL PROTECTED]'; for ($i=0;$i<=$results_num;$i++){ $item = new rssGenerator_item(); $item->title= $ad[title][$i]; $item->description= $ad[text][$i]; $item->link = $ad[link][$i]; $item->pubDate = $ad[date][$i]; $rss_channel->items[] = $item; $rss_image = new rssGenerator_image(); $rss_image->url = '/g/p/logo.gif'; Try it as a full url. -- Postgresql & php tutorials http://www.designmagick.com/ sorry that was an XML problem. Stupid me :-) Here is the solution for anybody having the same problem: />select="rss/channel/image/width" />name="height">/> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and CakePHP
It doesn't show any thing while $info['Employee']['dob'] isn't empty. This is my code "> time2str($info['Employee']['dob']) : ""?> link("Xóa", "?url=employees/del/" . $info['Employee']['id']) ?> - Original Message - From: "chris smith" <[EMAIL PROTECTED]> To: "Pham Huu Le Quoc Phuc" <[EMAIL PROTECTED]> Cc: Sent: Thursday, March 30, 2006 5:20 PM Subject: Re: [PHP] PHP and CakePHP > > The folowing code do not execute: > > > > > $datetime->time2str($info['Employee']['dob']) : ""?> > > > > What do you mean? It doesn't show anything? Then > $info['Employee']['dob'] is empty. > > If not, explain what you see or what happens. > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and CakePHP
> The folowing code do not execute: > > $datetime->time2str($info['Employee']['dob']) : ""?> > What do you mean? It doesn't show anything? Then $info['Employee']['dob'] is empty. If not, explain what you see or what happens. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to create RSS feeds with PHP?
On 3/30/06, Merlin <[EMAIL PROTECTED]> wrote: > chris smith schrieb: > > On 3/28/06, Merlin <[EMAIL PROTECTED]> wrote: > >> Hi there, > >> > >> I am wondering if there are already tools out there which do > >> create RSS feeds on the fly with the help of PHP. > >> > >> My goal would be to create RSS dynamicly out of a LAMP App. to > >> syndicate the results. > >> > >> Are there any tools you know about? > > > > This might get you started: > > > > http://www.phpclasses.org/browse/package/2957.html > > > > -- > > Postgresql & php tutorials > > http://www.designmagick.com/ > > Hi Chris, > > thank you for that hint. That worked excellent. There is just one small thing > I > can not figure out. Including images into that feed. Using your mentioned > classes I have following code: > > $rss_channel = new rssGenerator_channel(); >$rss_channel->title = 'test'; >$rss_channel->link = 'test.com'; >$rss_channel->description = 'test'; >$rss_channel->language = 'en-us'; >$rss_channel->generator = 'RSS Feed Generator'; >$rss_channel->managingEditor = '[EMAIL PROTECTED]'; >$rss_channel->webMaster = '[EMAIL PROTECTED]'; > >for ($i=0;$i<=$results_num;$i++){ >$item = new rssGenerator_item(); >$item->title= $ad[title][$i]; >$item->description= $ad[text][$i]; >$item->link = $ad[link][$i]; >$item->pubDate = $ad[date][$i]; >$rss_channel->items[] = $item; > > $rss_image = new rssGenerator_image(); > $rss_image->url = '/g/p/logo.gif'; Try it as a full url. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to create RSS feeds with PHP?
chris smith schrieb: On 3/28/06, Merlin <[EMAIL PROTECTED]> wrote: Hi there, I am wondering if there are already tools out there which do create RSS feeds on the fly with the help of PHP. My goal would be to create RSS dynamicly out of a LAMP App. to syndicate the results. Are there any tools you know about? This might get you started: http://www.phpclasses.org/browse/package/2957.html -- Postgresql & php tutorials http://www.designmagick.com/ Hi Chris, thank you for that hint. That worked excellent. There is just one small thing I can not figure out. Including images into that feed. Using your mentioned classes I have following code: $rss_channel = new rssGenerator_channel(); $rss_channel->title = 'test'; $rss_channel->link = 'test.com'; $rss_channel->description = 'test'; $rss_channel->language = 'en-us'; $rss_channel->generator = 'RSS Feed Generator'; $rss_channel->managingEditor = '[EMAIL PROTECTED]'; $rss_channel->webMaster = '[EMAIL PROTECTED]'; for ($i=0;$i<=$results_num;$i++){ $item = new rssGenerator_item(); $item->title= $ad[title][$i]; $item->description= $ad[text][$i]; $item->link = $ad[link][$i]; $item->pubDate = $ad[date][$i]; $rss_channel->items[] = $item; $rss_image = new rssGenerator_image(); $rss_image->url = '/g/p/logo.gif'; $rss_image->title = 'image'; $rss_image->link = 'no link'; $rss_image->width = 88; $rss_image->height = 31; $rss_image->description = 'test image'; $rss_channel->image = $rss_image; } $rss_feed = new rssGenerator_rss(); $rss_feed->encoding = 'UTF-8'; $rss_feed->version = '2.0'; header('Content-Type: text/xml'); echo $rss_feed->createFeed($rss_channel); The image will not apear no matter how I try it. Any idea how to do that? Best regards, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and CakePHP
I use CakePHP The folowing code do not execute: time2str($info['Employee']['dob']) : ""?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php error reporting problem
On 29 March 2006 15:25, ngwarai zed wrote: > phpinfo says > > Configuration File (php.ini) Path /etc/php.ini > > And the file I am editing is /etc/php.ini Is this not the > one Iam supposed to edit? On list please! H'mmm -- file permissions? You've stopped and restarted Apache? Which operating system? Starting to clutch at straws, now! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Outputting text "
Look up htmlentities() in the php manual and see if it'll work for you. Hugh - Original Message - From: "Merlin" <[EMAIL PROTECTED]> To: Sent: Thursday, March 30, 2006 1:28 AM Subject: [PHP] Outputting text " Hi there, I would like to output following text with php: How can I do that? I tried to escape the ? with \? but this did not help. Any ideas? Thank you for any hint, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.3/295 - Release Date: 3/28/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.3/295 - Release Date: 3/28/2006 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Outputting text "
Merlin wrote: Hi there, I would like to output following text with php: How can I do that? I tried to escape the ? with \? but this did not help. Either: 1. Turn off short tags (good idea if you plan on distributing your code). 2. Just echo or print that text. Like: ' . "\n"; ?> -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Outputting text "
Merlin a écrit : Hi there, I would like to output following text with php: How can I do that? I tried to escape the ? with \? but this did not help. htmlentities perhaps ? N F Any ideas? Thank you for any hint, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Outputting text "
Hi there, I would like to output following text with php: How can I do that? I tried to escape the ? with \? but this did not help. Any ideas? Thank you for any hint, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php