Re: [PHP] aspx
.NET dude, a little irrelevant to PHP, but a major competitor to J2EE, may i ask why and how did they copy java code and attempt to refine it ? Anyone know what aspx is? A rogue version of asp? It's not Open Source or PHP in disguise? -- 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] Combo problems.. Multi Array??
Hi, I've got a problem which has left me scratching my head for the better part of a week. What I need to do is take x amount of items on one side, and somehow find all the combinations of y that fit in x. Now I know this doesn't make much sense but it is very hard to explain, so I'm probably better off giving an example. In this example just say I have three isntances of x; A, B and C. x can grow to as much as 5 or 6 (D, E, F). On the flipside I have two instances of y; [1] and [2] I need to find how many combinations there are where y can fit in x. The outcome, if working properly, should be... A [1][2] BC AB [1][2] C ABC [1][2] A [1]B [2]C AB [1]C [2] A [1]BC [2] A [2]B [1]C A [2]CC [1] AB [2]C [1] Does anyone have any ideas on how I could do this? As I said I'm completely stumped. Thanks, Michael. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] connecting remote host ..
Hi Gowthaman, For mysql to allow remove connecivity u have to make entry in mysql database in tables db, user and host giving the IP of remote PC from which u want to connect and username and password then reload the database and It will all work Manoj On 14 Jun 2004 10:25:48 +0530, gowthaman ramasamy [EMAIL PROTECTED] wrote: hello list, My php script works fine with local mysql database. however when try to use some remote database it fails and gives follwing error .. Warning: mysql_connect(): Unknown MySQL Server Host 'http' (2) in /usr/local/apache2/htdocs/gowtham/forphp/db_qry_4repeat.php on line 86 the mysql_connect() syntax is as follows .. $db=mysql_connect(192.168.1.109, root, password); 192.168.1.109 is the ip (internal IP on LAN) of the machine hosting the database. thanx a lot in advance .. -- Ra. Gowthaman, Graduate Student, Bioinformatics Lab, Malaria Research Group, ICGEB , New Delhi. INDIA Phone: 91-9811261804 91-11-26173184; 91-11-26189360 #extn 314 -- 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] small and big letter in WHERE statement
Dear Sirs, When I use where statement, I see that there is no meaning small and big letter. Without looking small caps or big, result comes back. But I want to match only small letters. How can I do that? Best REgards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] aspx
Anyone know what aspx is? A rogue version of asp? It's not Open Source or PHP in disguise? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] small and big letter in WHERE statement
I'm guessing that you mean in a SQL sentence. Well, depending on what SQL engine're you using it's case sensitive or not. MySQL don't take diferent case as diferent string, thats why is the 'binary' date type. In that case you have two alternatives, or change the field type to binary, or cast it in the where statement. El lun, 14-06-2004 a las 14:36, QT escribió: Dear Sirs, When I use where statement, I see that there is no meaning small and big letter. Without looking small caps or big, result comes back. But I want to match only small letters. How can I do that? Best REgards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] connecting remote host ..
Reloadind database isn't necesary, a flush privileges should be ok. El lun, 14-06-2004 a las 04:32, Manoj Nahar escribió: Hi Gowthaman, For mysql to allow remove connecivity u have to make entry in mysql database in tables db, user and host giving the IP of remote PC from which u want to connect and username and password then reload the database and It will all work Manoj On 14 Jun 2004 10:25:48 +0530, gowthaman ramasamy [EMAIL PROTECTED] wrote: hello list, My php script works fine with local mysql database. however when try to use some remote database it fails and gives follwing error .. Warning: mysql_connect(): Unknown MySQL Server Host 'http' (2) in /usr/local/apache2/htdocs/gowtham/forphp/db_qry_4repeat.php on line 86 the mysql_connect() syntax is as follows .. $db=mysql_connect(192.168.1.109, root, password); 192.168.1.109 is the ip (internal IP on LAN) of the machine hosting the database. thanx a lot in advance .. -- Ra. Gowthaman, Graduate Student, Bioinformatics Lab, Malaria Research Group, ICGEB , New Delhi. INDIA Phone: 91-9811261804 91-11-26173184; 91-11-26189360 #extn 314 -- 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] small and big letter in WHERE statement[Scanned]
The following may help: http://dev.mysql.com/doc/mysql/en/Case_sensitivity.html Cheers, Michael Egan -Original Message- From: QT [mailto:[EMAIL PROTECTED] Sent: 14 June 2004 18:36 To: [EMAIL PROTECTED] Subject: [PHP] small and big letter in WHERE statement[Scanned] Dear Sirs, When I use where statement, I see that there is no meaning small and big letter. Without looking small caps or big, result comes back. But I want to match only small letters. How can I do that? Best REgards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email (and in any attachments sent with it) is confidential. It is intended for the addressee only. Access to this email by anyone else is unintended and unauthorized. If you are not the original addressee, 3tc asks you to please maintain confidentiality. If you have received this email in error please notify 3tc immediately by replying to it, then destroy any copies and delete it from your computer system. Any use, dissemination, forwarding, printing or copying of this email by anyone except the addressee in the normal course of his/her business, is strictly prohibited. 3tc owns the copyright in this email and any document created by us and assert the right to be identified as the author of it. Copyright has not been transferred to the addressee. We protect our systems with Sophos Anti-virus - www.sophos.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Array problem
Hi all I have this problem whereby im try to create some kind of an array of a split off a file. //Here I pull the file in the array $contents. $contents = file($hotelpathprod.$hotel); foreach($contents as $arr=$conts){ $ff[] = split(\|,$conts); //Here im trying to do a split on the file } Now this the array $ff is fine, the catch is now, it that, the first element has a have like p101. What I trying to do is do a substr($abc,1) and the take that value and make that the number of the element I want. This is what I was going with. foreach($ff as $qaz=$wsx){ $ffile[substr($qaz[0],1)]=$qaz[0]; } If anyone could assist, it would really be appreciated. Kind Regards Brent Clark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP
hi is this a joke -Original Message- From: Cheung Pui Pan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 11:03 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP Dear Sir/Madam, I would like to make a page on which people may add records to a table and view them (As my web server does not support MYSQL, I may have to do it on text files). I would also like to sort them by descending order of time. Can you please tell me which functions are available for the following items I want to do? If possible, can you write a sample code for me? Thank you for your time and attention. *Date / Time *Name *E-mail (Check them too please) *Company *Vehicle *Route (Original) *Route (Now on) *Notes Yours faithfully, Cheung Pui Pan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP
Hi, You can visit www.phpclasses.org There are n number of classes given for validation. Regards, Umesh. -Original Message- From: Brent Clark [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 5:28 PM To: Cheung Pui Pan; [EMAIL PROTECTED] Subject: RE: [PHP] PHP hi is this a joke -Original Message- From: Cheung Pui Pan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 11:03 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP Dear Sir/Madam, I would like to make a page on which people may add records to a table and view them (As my web server does not support MYSQL, I may have to do it on text files). I would also like to sort them by descending order of time. Can you please tell me which functions are available for the following items I want to do? If possible, can you write a sample code for me? Thank you for your time and attention. *Date / Time *Name *E-mail (Check them too please) *Company *Vehicle *Route (Original) *Route (Now on) *Notes Yours faithfully, Cheung Pui Pan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Newbie Guide] For the benefit of new members
=== Please feel free to add more points and send to the list. === 1. If you have any queries/problems about PHP try http://www.php.net/manual/en first. You can download a copy and use it offline also. Please also try http://www.php.net/manual/faq.php for answers to frequently answered questions about PHP (added by Christophe Chisogne). 2. Try http://www.google.com next. Searching for php YOUR QUERY may fetch you relevant information within the first 10 results. 3. There is a searchable archive of the mailing list discussion at http://phparch.com/mailinglists. Many of the common topics are discussed repeatedly, and you may get answer to your query from the earlier discussions. For example: One of the repeatedly discussed question in the list is Best PHP editor. Everyone has his/her favourite editor. You can get all the opinions by going through the list archives. If you want a chosen list try this link : http://www.thelinuxconsultancy.co.uk/phpeditors/ (contributed by Christophe Chisogne). 4. Not sure if PHP is working or you want find out what extensions are available to you? Just put the following code into a file with a .php extension and access it through your webserver: ?php phpinfo(); ? If PHP is installed you will see a page with a lot of information on it. If PHP is not installed (or not working correctly) your browser will try to download the file. (contributed by Teren and reworded by Chris W Parker) 5. If you are stuck with a script and do not understand what is wrong, instead of posting the whole script, try doing some research yourself. One useful trick is to print the variable/sql query using print or echo command and check whether you get what you expected. After diagnosing the problem, send the details of your efforts (following steps 1, 2 3) and ask for help. 6. PHP is a server side scripting language. Whatever processing PHP does takes place BEFORE the output reaches the client. Therefore, it is not possible to access users' computer related information (OS, screen size etc) using PHP. Nor can you modify any the user side settings. You need to go for JavaScript and ask the question in a JavaScript list. On the other hand, you can access the information that is SENT by the user's browser when a client requests a page from your server. You can find details about browser, OS etc as reported by this request. - contributed by Wouter van Vliet and reworded by Chris W Parker. 7. Provide a clear descriptive subject line. Avoid general subjects like Help!!, A Question etc. Especially avoid blank subjects. 8. When you want to start a new topic, open a new mail composer and enter the mailing list address [EMAIL PROTECTED] instead of replying to an existing thread and replacing the subject and body with your message. 9. It's always a good idea to post back to the list once you've solved your problem. People usually add [SOLVED] to the subject line of their email when posting solutions. By posting your solution you're helping the next person with the same question. [contribued by Chris W Parker] 10. Ask smart questions http://catb.org/~esr/faqs/smart-questions.html [contributed by Jay Blanchard) 11. Do not send your email to the list with attachments. If you don't have a place to upload your code, try the many pastebin websites (such as www.pastebin.com). [contributed by Burhan Khalid] -- Integrated Management Tools for leather industry -- http://www.leatherlink.net Ma Siva Kumar, BSG LeatherLink (P) Ltd, Chennai - 600106 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Scheduling a PHP script
Hi All, I have a PHP script that I need to call from both web browsers from a crontab but whichever route I choose I hit a problem. Here are the options I have tried along with problems encountered... PHP - /usr/bin/php /home/sites/home/web/schedules/index.php arg1 arg2 arg3 After resolving include path issues using ini_set() I get... Call to undefined function: mysql_connect(). I assume that all mysql functions are unavailable?? curl - /usr/bin/curl -u username:password http://www.domain.com/script.php?arg1=aarg2=barg3=c This gives me a PHP error... Undefined index: arg2 Only the first argument is available wget - /usr/bin/wget --http-user=username --http-passwd=password http://www.domain.com/script.php?arg1=aarg2=barg3=c This does not give an error but gives a message... `index.php?fuseaction=NewMembers.1' saved [557] Again it looks like query string is ignored. The database changes and email report that are supposed to occur on successful execution are unavailable! lynx - /usr/bin/lynx -dump -auth=username:password http://www.domain.com/script.php?arg1=aarg2=barg3=c This gives me a PHP error... Undefined index: arg2 Only the first argument is available again! Any ideas anyone? TIA - Phil. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.705 / Virus Database: 461 - Release Date: 12/06/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Combo problems.. Multi Array??
-Original Message- From: Michael Benbow [mailto:[EMAIL PROTECTED] Sent: 14 June 2004 08:31 To: [EMAIL PROTECTED] Subject: [PHP] Combo problems.. Multi Array?? Hi, I've got a problem which has left me scratching my head for the better part of a week. [...] The outcome, if working properly, should be... A [1][2] BC AB [1][2] C ABC [1][2] A [1]B [2]C AB [1]C [2] A [1]BC [2] A [2]B [1]C A [2]CC [1] AB [2]C [1] Does anyone have any ideas on how I could do this? As I said I'm completely stumped. This is called a permutation. Googling for permutation formula brings up any number of good links; the most succinct is probably http://www.mathwords.com/p/permutation_formula.htm, but most of the other top 10 links will give you the same answer with a bit (or a lot!) more explanation. 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Scheduling a PHP script
On Mon, 14 Jun 2004 12:10:30 +0100 Phil Ewington - 43 Plc [EMAIL PROTECTED] wrote: PHP - /usr/bin/php /home/sites/home/web/schedules/index.php arg1 arg2 arg3 After resolving include path issues using ini_set() I get... Call to undefined function: mysql_connect(). I assume that all mysql functions are unavailable?? Is your commandline php executable compiled --with-mysql ? curl - /usr/bin/curl -u username:password http://www.domain.com/script.php?arg1=aarg2=barg3=c When issuing commands through bash (or alike) you need to surround the string with double-quotes (), because is a bash-operator, meaning put into background. With the command above you will execute /usr/bin/curl -u username:password http://www.domain.com/script.php?arg1=a; in the background, arg2=b in the background, and arg3=c in the foreground ;) The correct command is: /usr/bin/curl -u username:password http://www.domain.com/script.php?arg1=aarg2=barg3=c; This also applies to wget, lynx and all other commandline tools you can imagine ;-) -- Dennis Freise [EMAIL PROTECTED] GnuPG key: 2DE8 CCEF 6E20 11D4 3B27 21EC B0BA 1749 D2C8 38ED Available at: http://www.final-frontier.ath.cx/?key-plain pgpvBCe1WquYW.pgp Description: PGP signature
[PHP] PHP 4.3.7 update - how to
I've downloaded the 4.3.7 tar ball and extractted it. I've run configure (after deleting the cache), no errors. I've run make - no errors, I've then run make install.. no errors, it says it's updating and installing. Now I've restarted my httpd service - I've even rebooted but I'm left with phpinfo telling me that version 4.2.2 is running. I'm in RH9 and I have no idea why it doesn't install properly.. Can someone shed some light on this? thanks Alan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with an objective
All, I would like to use php to email a picture (as an attachment) that is on my server (linux), without manually attaching/uploading one. Is this possible? If so, how can it be done? Thanks, Ryan
RE: [PHP] Help with an objective
[snip] I would like to use php to email a picture (as an attachment) that is on my server (linux), without manually attaching/uploading one. Is this possible? If so, how can it be done? [/snip] Google can be your friend, if you use it http://www.zend.com/zend/spotlight/sendmimeemailpart1.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP 4.3.7 update - how to
Alan McDonald wrote: I've downloaded the 4.3.7 tar ball and extractted it. I've run configure (after deleting the cache), no errors. I've run make - no errors, I've then run make install.. no errors, it says it's updating and installing. Now I've restarted my httpd service - I've even rebooted but I'm left with phpinfo telling me that version 4.2.2 is running. I'm in RH9 and I have no idea why it doesn't install properly.. Can someone shed some light on this? Not sure if it's relevant, but does httpd.conf point to the new version? It's all I have to tweak in Windows. -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 4.3.7 update - how to
Alan McDonald wrote --- napsal:: I've downloaded the 4.3.7 tar ball and extractted it. I've run configure (after deleting the cache), no errors. I've run make - no errors, I've then run make install.. no errors, it says it's updating and installing. Now I've restarted my httpd service - I've even rebooted but I'm left with phpinfo telling me that version 4.2.2 is running. I'm in RH9 and I have no idea why it doesn't install properly.. Can someone shed some light on this? thanks Alan Did you edit /etc/httpd/conf/httpd.conf and change the path to the php module there? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP 4.3.7 update - how to
I've downloaded the 4.3.7 tar ball and extractted it. I've run configure (after deleting the cache), no errors. I've run make - no errors, I've then run make install.. no errors, it says it's updating and installing. Now I've restarted my httpd service - I've even rebooted but I'm left with phpinfo telling me that version 4.2.2 is running. I'm in RH9 and I have no idea why it doesn't install properly.. Can someone shed some light on this? Not sure if it's relevant, but does httpd.conf point to the new version? It's all I have to tweak in Windows. -- Lester Caine I must be missing something critical here... I was thinking that the make install would overwrite the PHP executables but it obviously doesn't .. Now where in the conf file does the PHP module get mentioned? I;ve searched it with no mention of PHP! Alan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP 4.3.7 update - how to
Alan McDonald wrote --- napsal:: I've downloaded the 4.3.7 tar ball and extractted it. I've run configure (after deleting the cache), no errors. I've run make - no errors, I've then run make install.. no errors, it says it's updating and installing. Now I've restarted my httpd service - I've even rebooted but I'm left with phpinfo telling me that version 4.2.2 is running. I'm in RH9 and I have no idea why it doesn't install properly.. Can someone shed some light on this? Not sure if it's relevant, but does httpd.conf point to the new version? It's all I have to tweak in Windows. -- Lester Caine I must be missing something critical here... I was thinking that the make install would overwrite the PHP executables but it obviously doesn't .. Now where in the conf file does the PHP module get mentioned? I;ve searched it with no mention of PHP! Alan It might be in /etc/httpd/conf.d/[*]_mod_php.conf file -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Regular Expression - it works but uses way too much memory ?
$replace = /^(([a-z]+?[^a-z]+?){.($count).})(.$typedmask.)(.*)/iS; $with = $1error-start sourcetext=.$corr['sourcetext']. id=.$corr['id']. group=\.$corr['grupper'].\ class=\.$corr['ordklasse'].\ corrected-from=\.$corr['typed'].\ corrected-to=\.$corr['corrected'].\$3error-end sourcetext=.$corr['sourcetext']. id=.$corr['id'].$4; $text = preg_replace ($replace,$with,$text,1); Above preg_replace works as expected, I have it inside a loop that processes 1000 texts and replaces a total of 3 words. The problem is that it accumulates memory up to 200MB, that isn't freed again until the script completes? It runs for about 1 - 2 minutes and allocates more and more memory. If I comment out the preg_replace the memory usage looks normal, so I'm pretty sure that is where the problem is? My question is basically, is it something in my reg. exp. that it totally nuts or is it normal behaviour for preg_replace to allocate memory and not free it again until the script ends? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Scheduling a PHP script
On Mon, 14 Jun 2004 12:10:30 +0100 Phil Ewington - 43 Plc [EMAIL PROTECTED] wrote: PHP - /usr/bin/php /home/sites/home/web/schedules/index.php arg1 arg2 arg3 After resolving include path issues using ini_set() I get... Call to undefined function: mysql_connect(). I assume that all mysql functions are unavailable?? Is your commandline php executable compiled --with-mysql ? My PHP installation (4.3.6) was configured with: with-mysql=shared curl - /usr/bin/curl -u username:password http://www.domain.com/script.php?arg1=aarg2=barg3=c When issuing commands through bash (or alike) you need to surround the string with double-quotes (), because is a bash-operator, meaning put into background. With the command above you will execute /usr/bin/curl -u username:password http://www.domain.com/script.php?arg1=a; in the background, arg2=b in the background, and arg3=c in the foreground ;) That worked a treat! Thanks. The correct command is: /usr/bin/curl -u username:password http://www.domain.com/script.php?arg1=aarg2=barg3=c; This also applies to wget, lynx and all other commandline tools you can imagine ;-) -- Dennis Freise [EMAIL PROTECTED] GnuPG key: 2DE8 CCEF 6E20 11D4 3B27 21EC B0BA 1749 D2C8 38ED Available at: http://www.final-frontier.ath.cx/?key-plain --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.705 / Virus Database: 461 - Release Date: 12/06/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Header target?
On 06/12/04 19:05 Kim Steinhaug spoke: Steve Douville had a long answer, the short answer : no Ok, thanks. I want to avoid relying on Javascript anyways. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP 4.3.7 update - how to
Alan McDonald wrote: I must be missing something critical here... I was thinking that the make install would overwrite the PHP executables but it obviously doesn't .. Now where in the conf file does the PHP module get mentioned? I;ve searched it with no mention of PHP! Alan Make will overwrite the old PHP binaries if A) you have permission to overwrite them, and b) they are in the path that you ran with configure... ./configure --prefix=/path/to/install -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] small and big letter in WHERE statement
QT wrote: Dear Sirs, When I use where statement, I see that there is no meaning small and big letter. Without looking small caps or big, result comes back. But I want to match only small letters. How can I do that? Best REgards Where statement for what? MySQL? If so, I don't think you can do it on the SQL end as WHERE is normally case-insensitive. You could use a regular expression while looping thru your result set. -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Header target?
Bob Lockie wrote --- napísal:: On 06/12/04 19:05 Kim Steinhaug spoke: Steve Douville had a long answer, the short answer : no Ok, thanks. I want to avoid relying on Javascript anyways. Make _top the target of the form, then rebuild the frameset based on your logic. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 4.3.7 update - how to
Alan McDonald wrote: I've downloaded the 4.3.7 tar ball and extractted it. I've run configure (after deleting the cache), no errors. I've run make - no errors, I've then run make install.. no errors, it says it's updating and installing. Now I've restarted my httpd service - I've even rebooted but I'm left with phpinfo telling me that version 4.2.2 is running. I'm in RH9 and I have no idea why it doesn't install properly.. personal opinion: Possibly because the default RPM installation of apache on RH is a huge mess :-( me thinks apache should only be installed on RH by compiling it from source -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help with an objective
Also check the archives of this e-mail list. I believe this topic has been discussed before. [Original Message] From: Ryan Schefke [EMAIL PROTECTED] To: Php-General-Help [EMAIL PROTECTED] Date: 06/14/2004 5:48:16 AM Subject: [PHP] Help with an objective All, I would like to use php to email a picture (as an attachment) that is on my server (linux), without manually attaching/uploading one. Is this possible? If so, how can it be done? Thanks, Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] converting a char variable to an int?
Hi, I have a variable that is created using the date command: $date = date(Ymd); but its not working in my database this way (when I explicity enter 20040614 in my database, it works though). so I think PHP is making $date a character variable, so how can I force or change the caste of $date to force it to be an integer variable? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] converting a char variable to an int?
eh nevermind, I found settype(); :) thanks On Mon, 14 Jun 2004, Adam Williams wrote: Hi, I have a variable that is created using the date command: $date = date(Ymd); but its not working in my database this way (when I explicity enter 20040614 in my database, it works though). so I think PHP is making $date a character variable, so how can I force or change the caste of $date to force it to be an integer variable? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: converting a char variable to an int?
Adam Williams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have a variable that is created using the date command: $date = date(Ymd); but its not working in my database this way (when I explicity enter 20040614 in my database, it works though). so I think PHP is making $date a character variable, so how can I force or change the caste of $date to force it to be an integer variable? thanks Try this: $date = (int) $date; See here: http://de2.php.net/language.types.type-juggling But it should also work as a PHP string with your DB. Could you post your INSERT/UPDATE statement? Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] converting a char variable to an int?
You could cast the type when you create the variable: $variable = (integer) $variable; Or you could set the type: settype ($variable, integer); However, the problem may be with the database, depending on what you mean by it's not working in my database this way. [Original Message] From: Adam Williams [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: 06/14/2004 8:32:18 AM Subject: [PHP] converting a char variable to an int? Hi, I have a variable that is created using the date command: $date = date(Ymd); but its not working in my database this way (when I explicity enter 20040614 in my database, it works though). so I think PHP is making $date a character variable, so how can I force or change the caste of $date to force it to be an integer variable? thanks -- 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] converting a char variable to an int?
Does it work now? It should not matter, because if you use $date in your sql statement: $sql = update table set `date` = '$date'; $date is converted (back) to string. Adam Williams wrote --- napísal:: eh nevermind, I found settype(); :) thanks On Mon, 14 Jun 2004, Adam Williams wrote: Hi, I have a variable that is created using the date command: $date = date(Ymd); but its not working in my database this way (when I explicity enter 20040614 in my database, it works though). so I think PHP is making $date a character variable, so how can I force or change the caste of $date to force it to be an integer variable? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] gethostbyaddr
Hi John, Thank you for the ideas :) I am beginning to believe I need a new way to work around this issue. gethostbyaddr is a simple reverse-DNS lookup (of the REMOTE_ADDR ip address) requested by your server to its nameserver. This never goes near the user's IE or Netscape browser. The IP address used is the one your webserver is using in its HTTP (TCP) connection with the browser (or its agent -- a firewall or proxy, for example). If there is no DNS entry for the ip address, there should be no hostname returned because by definition there is no host name to be returned. This is exactly the problem, the error is DNS related and has nothing to do with the languages, which is why I get the similar results no matter what I write it in. And yes, they are using proxies as well as rotating ip addresses. The client's team is behind a firewall with a specific domain name but I am not consistently getting that IP address. To make it more complicated, inside their firewall they have rotating ip addresses, and only some of those have DNS entries. I wrote it in JavaScript first, which works in IE if they are indeed using a specific domain name, but not in Netscape, which returns IP addresses with an occasional domain name, not sure why the browsers are so different. So I switched to PHP... Thinking, like you, it would not matter which browser they are using, which helped some, but I am still unable to get domain names from all of their team. No DNS entries listed for some of the IP addresses returned. I am not seeing a way to do it without a consistent DNS entry for each person or at minimum fixed ip addresses. Thank you for helping me walk through it. Alicia -Original Message- From: John Hicks [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 11:35 PM To: PHP Subject: Re: [PHP] gethostbyaddr Hi Alicia. Welcome to the list. On Friday 11 June 2004 12:58 pm, Alicia Riggs wrote: Hi guys, I am new to this list, and signed up specifically for this problem. If any one has any ideas it would be greatly appreciated. I am writing a function to allow users from a specific intranet permission to view a directory. I am getting very different results from IE and Netscape. I have written this in JavaScript as well as PHP, and I am getting the same error in both languages. Are you talking about regular old (browser-based) Javascript? Javascript and (server-based) PHP are like apples and oranges. You can't really get the same error from each because they are doing completely different things in completely different places. When I use the gethostbyaddr call, in IE I get a domain name the majority of the time, with a few exceptions. When I use the gethostbyaddr call in Netscape I only receive a domain name if there is a DNS entry. If there is no DNS entry, Netscape returns an IP address. PHP functions are executed by the server. The browser (Netscape and IE) have nothing to do with them. gethostbyaddr is a simple reverse-DNS lookup (of the REMOTE_ADDR ip address) requested by your server to its nameserver. This never goes near the user's IE or Netscape browser. The IP address used is the one your webserver is using in its HTTP (TCP) connection with the browser (or its agent -- a firewall or proxy, for example). If there is no DNS entry for the ip address, there should be no hostname returned because by definition there is no host name to be returned. I am not sure what IE is using to get the domain names when there is no DNS entry. How do I get the correct info to be returned from Netscape? Here is the code I am using *** ?php //echo pre; //print_r($_SERVER); //echo /pre; $hn = gethostbyaddr($_SERVER['REMOTE_ADDR']); echo host by addr = . $hn . \nbr; $darr = explode(., $hn); $cnt = count($darr); $host = $darr[$cnt - 2] . . . $darr[$cnt - 1]; echo host = . $host . \nbr; /* if($host == xyz.com) header(Location: xyz.html); else if($host == abc.com) header(Location: abc.html); else header(Location: error.html); */ ? For debugging purposes, I would add more verbose echos: particularly for IP address and full host name returned ($hn). How are you deducing that you are getting different results based on the user's browser? Are there firewalls or web proxies involved? This could account for getting conflicting IP addresses for the same user reported by the browser (via Javascript) and server. Thanks in advance for any ideas! Alicia Riggs PSG - Web Development Engineer 214-550-7452 Hope this helps. Regards, John --- John Hicks Gulfbridge, Inc. Putting the Web to work for your business. http://gulfbridge.com 561-586-8116 -- 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] Re: converting a char variable to an int?
Regardless of how you use your database, here you can read about type juggling/casting: http://www.php.net/language.types.type-juggling Quoting Marek Kilimajer [EMAIL PROTECTED]: Does it work now? It should not matter, because if you use $date in your sql statement: $sql = update table set `date` = '$date'; $date is converted (back) to string. Adam Williams wrote --- napísal:: eh nevermind, I found settype(); :) thanks On Mon, 14 Jun 2004, Adam Williams wrote: Hi, I have a variable that is created using the date command: $date = date(Ymd); but its not working in my database this way (when I explicity enter 20040614 in my database, it works though). so I think PHP is making $date a character variable, so how can I force or change the caste of $date to force it to be an integer variable? thanks -- 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] Re: Multidimensional Array advice from a newbie
Is this what you need? (See below for inline suggestions). [EMAIL PROTECTED] wrote: Hi :) I am creating an XML file out of a mysql query with nested arrays. Currently I can get 1 element and 1 child with a properly formatted XML file with the below script . My question is: How do I add 3 to 4 more child elements to the below 'playlist' array ? Currently ,I have one parent 'Artist' and one child 'english' ... I need to add more child elements to the 'Artist' array like urlPath, spanish, biography, etc My addled thoughts... So, would the multidimensional array be like: $playlist[ [$artist [ ] ][$media[ ] ] [$mediaElement] ]? for the 'trackName' child: $playlist [ Artist 1 ] [ Track 1 ] [ trackName ] or for 'urlPath' child : $playlist [ Artist 1 ] [ Track 1 ] [ urlPath ] Do I have to add another dimension to the 'playlist' array? Do I need another foreach loop ? Is there an easier more efficient way to do this? Be nice to spell out the schema in some way in the script...in case you need to add more levels...like a 'subCategory' I am a bit new to this so any help would be greatly appretiated head is spinning a bit ?php @ $db = mysql_connect('127.0.0.1','name','pass'); if (!$db) { echo 'Error:Could Not Connect'; exit; } mysql_select_db('univision'); $sql = 'SELECT artist.artist_name, media.english, media.path '; $sql .= 'FROM media, artist '; $sql .= 'WHERE artist.artist_id = media.artist_id LIMIT 0, 30 '; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { $playlist[$row['artist_name']] [] = $row['english']; Instead, try $playlist[$row['artist_name']][] = array('english' = $row['english'], 'path' = $row['path'], //add more here); You could even add a sub-loop here: $entry = array('english' = $row['english'], 'path' = $row['path'], //add more here); //guessing here $sql = 'SELECT * FROM tracks WHERE artist = '.$row['artist_name'].''; $sth = mysql_query($sql); while($track = mysql_fetch_assoc($sth)) { $entry['tracks'][$track['name']] = $track; } $playlist[$row['artist_name']][] = $entry; //would like to add more children here... } $xml = sirenreels\n; foreach ($playlist as $artist = $media) { $num_media = count($media); $xml .= artist\n; $xml .= \tmeta\n; $xml .= \t\ttitle.$artist./title\n; $xml .= \t/meta\n; $xml .= \tcontent\n; foreach ($media as $mediaVal) { $xml .= \t\tmedia\n; $xml .= \t\t\tenglish_name.$mediaVal./english_name\n; ///add more children ///add more children $xml .= \t\t/media\n; } $xml .= \t/content\n; $xml .= /artist\n; } $xml .= /sirenreels\n; print $xml -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Cookie Security?
Phpmail wrote: My login script sets unique, secure, cookies that identify the user. Some of my pages only display content if a secure cookie is present. Is this a bad idea for secure pages with sensitive details as I have heard that cookies can be faked? I am always interested in creating a secure environment for my website visitors and I want to make sure I am protecting their privacy. Any help on this matter is greatly appreciated. Thanks, ~Sean V. I would suggest tying your cookies to an IP. This makes it MUCH harder for a cracker to use the cookie. You may just want to search for PHP secure cookies on google. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Function Date
Hi! I am using date(j M Y), the format date is 14 Jun 2004, but i need this format 14 JUN 2004. The unique difference is Jun - JUN. How can i change this?. Thank You, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Cookie Security?
My login script sets unique, secure, cookies that identify the user. Some of my pages only display content if a secure cookie is present. Is this a bad idea for secure pages with sensitive details as I have heard that cookies can be faked? I am always interested in creating a secure environment for my website visitors and I want to make sure I am protecting their privacy. Any help on this matter is greatly appreciated. I would suggest tying your cookies to an IP. This makes it MUCH harder for a cracker to use the cookie. You may just want to search for PHP secure cookies on google. As well as much harder for AOL subscribers (whose IP's change per-request) to use the site. Cookies are easy to fake. In most cases, though, the cost (to an intruder) of interfering with a user session far outweighs the benefit. This is why most e-commerce sites are pretty lax about security while you browse, and why they immediately switch to SSL when you decide to pay. Consider the potential damage done to your users or the sensitivity of the information you're transmitting, and you may decide to go with SSL. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Function Date
Use the strtoupper function: http://www.php.net/strtoupper HTH! --Sam -Original Message- From: Juan Pablo Herrera [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 11:05 AM To: [EMAIL PROTECTED] Subject: [PHP] Function Date Hi! I am using date(j M Y), the format date is 14 Jun 2004, but i need this format 14 JUN 2004. The unique difference is Jun - JUN. How can i change this?. Thank You, Juan -- 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 Date
On Mon, 14 Jun 2004 14:04:56 -0300 (ART) Juan Pablo Herrera [EMAIL PROTECTED] wrote: I am using date(j M Y), the format date is 14 Jun 2004, but i need this format 14 JUN 2004. The unique difference is Jun - JUN. How can i change this?. How about strtoupper( date(j M Y) ); ? -- Dennis Freise [EMAIL PROTECTED] GnuPG key: 2DE8 CCEF 6E20 11D4 3B27 21EC B0BA 1749 D2C8 38ED Available at: http://www.final-frontier.ath.cx/?key-plain pgpYFwoIAIk4R.pgp Description: PGP signature
Re: [PHP] Function Date
How about. strtoupper( date(j M Y)) I am using date(j M Y), the format date is 14 Jun 2004, but i need this format 14 JUN 2004. The unique difference is Jun - JUN. How can i change this?. Thank You, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Function Date
Hello Juan, Monday, June 14, 2004, 6:04:56 PM, you wrote: JPH I am using date(j M Y), the format date is 14 Jun 2004, but i need this JPH format 14 JUN 2004. The unique difference is Jun - JUN. How can i change JPH this?. $date = strtoupper(date('j M Y')); :) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I am not young enough to know everything. - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP CRM
Guys. Anybody knows any open source CRM thats based on PHP or something similar? Im looking for CRM alternatives... Thx for any comments. Anton Krall -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Cookie Security?
[snip} As well as much harder for AOL subscribers (whose IP's change per-request) to use the site. [snip] WHAT?? Are you sure of this? AOL really breaks internet browsing this much? Sorry, I can't believe this. If this was true, many things would break. I know that dial-up users get different IPs every time they connect, but for somehting like this to happen, they'd have to be using some kind of round-robin DNS for a proxy server or some kind of wacky load balancing. Can you point us to a resource that verifies this? -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP CRM
Anton Krall wrote: Guys. Anybody knows any open source CRM thats based on PHP or something similar? Im looking for CRM alternatives... Thx for any comments. Anton Krall Please don't ask for read receipts when sending to a mailing list. -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: creating a nested multidimensional array from a query
PLEASE stop posting the same qustion over and over. If you're not subscribed to the list (or reading it via news.php.net) you need to be to see responses. I sent a response to this question earlier today. [EMAIL PROTECTED] wrote: Hi :) I am on my second week of php so be gentle I am creating an XML file out of a mysql query with nested arrays. Currently I can get 1 element and 1 child with a properly formatted XML file with the below script . My question is: How do I add 3 to 4 more child elements to the below 'playlist' array ? Currently ,I have one parent 'Artist' and one child 'english' ... I need to add more child elements to the 'Artist' array like urlPath, spanish, biography, etc Do I have to add another dimension to the 'playlist' array? Do I need another foreach loop ? Is there an easier more efficient way to do this? Be nice to spell out the schema in some way in the script...in case you need to add more levels...like a 'subCategory' I am a bit new to this so any help would be greatly appretiated head is spinning a bit $sql = 'SELECT artist.artist_name, media.english, media.path '; $sql .= 'FROM media, artist '; $sql .= 'WHERE artist.artist_id = media.artist_id LIMIT 0, 30 '; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { $playlist[$row['artist_name']] [] = $row['english']; //would like to add more children here... } $xml = sirenreels\n; foreach ($playlist as $artist = $media) { $num_media = count($media); $xml .= artist\n; $xml .= \tmeta\n; $xml .= \t\ttitle.$artist./title\n; $xml .= \t/meta\n; $xml .= \tcontent\n; foreach ($media as $mediaVal) { $xml .= \t\tmedia\n; $xml .= \t\t\tenglish_name.$mediaVal./english_name\n; ///add more children ///add more children $xml .= \t\t/media\n; } $xml .= \t/content\n; $xml .= /artist\n; } $xml .= /sirenreels\n; print $xml -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Cookie Security?
On Mon, 2004-06-14 at 14:02, Justin Patrin wrote: [snip} As well as much harder for AOL subscribers (whose IP's change per-request) to use the site. [snip] I don't think it changes per request, but rather has the potential to change between requests. 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] Re: Cookie Security?
Robert Cummings wrote: On Mon, 2004-06-14 at 14:02, Justin Patrin wrote: [snip] As well as much harder for AOL subscribers (whose IP's change per-request) to use the site. [snip] I don't think it changes per request, but rather has the potential to change between requests. I still don't believe that. The only reason an IP would change is if the user dials up again. Using IP-restricted cookies will not break anything while the person is on the site. It will, however, not work if the user disconnects, then dials up again as they *will* have a different IP. This is true of Cable users as well as their IP *may* change at any time (although it doesn't often if you leave your computer on most of the time). -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP5] Super constructor?
If i'm not wrong php has only 1 level of depth for child class. That means you can only extends from 1 level up the class. In your example you have the class OneMore that extends down from the grandfather Base. It is not a problem in C++ but should not work in php or either javascript. Am i wrong? Franciccio Frzzman [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] Hi guys, hey don't laugh at the subject, in fact I don't what to call it, so let's call it super constructor :D Let's see following code... class Base { __construct() { // Do something } } class One extends Base { __construct() { // Do nothing } } class OneMore extends One { __construct() { // Do things :D } } So when I create an instance of OneMore class by: $OneMoreInstance = new OneMore() The __construct() method of class OneMore will be called, not the one of One and Base, right? So is there any way around to make the Base class have a contructor that will be called everytime one of its child initialize? My problem, I want all of the classes in my object are extend from one base class, so they are all have some common properties and function, but PHP won't implicit call the contructor (that's the right way)... btw, in my case, this is bad, as bad as every constructor would be called... Well, hope you understand what I'm trying to say... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MapServer and PHP/MapScript
Anybody have any experience (good or bad) with MapServer? (http://mapserver.gis.umn.edu/) And if so, can you comment on how good or bad PHP/MapScript is? (http://mapserver.gis.umn.edu/doc42/phpmapscript-class-guide.html) Thanks. ...Rene -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: small and big letter in WHERE statement
In case u run under win32 ...WHERE REGXEP BINARY fileldname=whatever.. If you run under unix, linux you don't need to do that. Franciccio Qt [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] Dear Sirs, When I use where statement, I see that there is no meaning small and big letter. Without looking small caps or big, result comes back. But I want to match only small letters. How can I do that? Best REgards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Cookie Security?
Justin Patrin wrote --- napísal:: [snip} As well as much harder for AOL subscribers (whose IP's change per-request) to use the site. [snip] WHAT?? Are you sure of this? AOL really breaks internet browsing this much? Sorry, I can't believe this. If this was true, many things would break. I know that dial-up users get different IPs every time they connect, but for somehting like this to happen, they'd have to be using some kind of round-robin DNS for a proxy server or some kind of wacky load balancing. Can you point us to a resource that verifies this? a proxy server farm with some kind of wacky load balancing ;-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Cookie Security?
On 06/14/2004 1:02 PM, Justin Patrin [EMAIL PROTECTED] wrote: As well as much harder for AOL subscribers (whose IP's change per-request) to use the site. WHAT?? Are you sure of this? AOL really breaks internet browsing this much? Sorry, I can't believe this. If this was true, many things would break. I know that dial-up users get different IPs every time they connect, but for somehting like this to happen, they'd have to be using some kind of round-robin DNS for a proxy server or some kind of wacky load balancing. Can you point us to a resource that verifies this? [W]ebmasters should not make assumptions about the relationship between members and proxy servers when designing their web site. http://webmaster.info.aol.com/proxyinfo.html Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Load a frame and work on another?
Here is a piece of my code in my PHP, I am trying to reload frame C with updated information and reload the current page into the current frame. Can someone tell me where I am going wrong? if (mysql_num_rows($get_query_res) 1){ //invalid id, send away header(script language=\javascript\parent.C.location.href = \show.html\;/script); header(script language=\javascript\parent.B.location.href = \prefs.html\;/script); exit; Thanks, Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Cookie Security?
Marek Kilimajer wrote: Justin Patrin wrote --- napísal:: [snip} As well as much harder for AOL subscribers (whose IP's change per-request) to use the site. [snip] WHAT?? Are you sure of this? AOL really breaks internet browsing this much? Sorry, I can't believe this. If this was true, many things would break. I know that dial-up users get different IPs every time they connect, but for somehting like this to happen, they'd have to be using some kind of round-robin DNS for a proxy server or some kind of wacky load balancing. Can you point us to a resource that verifies this? a proxy server farm with some kind of wacky load balancing ;-) http://webmaster.info.aol.com/proxyinfo.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Cookie Security?
Paul Fierro wrote: On 06/14/2004 1:02 PM, Justin Patrin [EMAIL PROTECTED] wrote: As well as much harder for AOL subscribers (whose IP's change per-request) to use the site. WHAT?? Are you sure of this? AOL really breaks internet browsing this much? Sorry, I can't believe this. If this was true, many things would break. I know that dial-up users get different IPs every time they connect, but for somehting like this to happen, they'd have to be using some kind of round-robin DNS for a proxy server or some kind of wacky load balancing. Can you point us to a resource that verifies this? [W]ebmasters should not make assumptions about the relationship between members and proxy servers when designing their web site. http://webmaster.info.aol.com/proxyinfo.html Paul Heh... bad timing :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Erroring out?!
I am trying to figure out why if there is an error in my query it throws an error message to the screen instead of parsing the rest of my script to get the rest of the information. I have error checking in my script and if there is no information I want it to process and do things. I run this: ? session_start(); //connect to database include 'db.php'; include 'salesinfo.php'; $query = select * from quoteprefs where salesman = $user; $get_query_res = mysql_query($query) or die(mysql_error()); if (mysql_num_rows($get_query_res) 1){ //invalid id, send away header(script language=\javascript\parent.C.location.href = \show.html\;/script); header(script language=\javascript\parent.B.location.href = \custn.html\;/script); exit; } else { //get info $title = mysql_result($get_query_res,0,'item_num'); $desc = mysql_result($get_query_res,0,'description'); $q = mysql_result($get_query_res,0,'qty'); $p = mysql_result($get_query_res,0,'price'); $c = mysql_result($get_query_res,0,'comments'); $tp = mysql_result($get_query_res,0,'Tprice'); $display_block = html; } ? html head body centerBR Choose from the following options to set your preferences: ? echo $display_block; ? BR/center /body /html And I get: Unknown column 'robert' in 'where clause' ThANKS!! Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Cookie Security?
[snip} As well as much harder for AOL subscribers (whose IP's change per-request) to use the site. [snip] WHAT?? Are you sure of this? AOL really breaks internet browsing this much? Sorry, I can't believe this. If this was true, many things would break. Not really -- HTTP is stateless, so there's really no reason for each request to come from the same IP. As other posters in this thread have pointed out, AOL uses an army of proxy servers. In the past, they've even cached and re-compressed images for the benefit of those on slow dialup. As you say, wacky stuff. You're on the right track, though - the way to make cookies tougher to crack is to associate the cookie with some other piece of user information. I've toyed with using an encrypted string based on the user agent as part of the cookie, but have never encountered a project where this level of care was called-for while SSL was not. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Erroring out?!
You need to quote the $user: $query = select * from quoteprefs where salesman = '$user'; - Original Message - From: Robert Sossomon [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Monday, June 14, 2004 2:44 PM Subject: [PHP] Erroring out?! I am trying to figure out why if there is an error in my query it throws an error message to the screen instead of parsing the rest of my script to get the rest of the information. I have error checking in my script and if there is no information I want it to process and do things. I run this: ? session_start(); //connect to database include 'db.php'; include 'salesinfo.php'; $query = select * from quoteprefs where salesman = $user; $get_query_res = mysql_query($query) or die(mysql_error()); if (mysql_num_rows($get_query_res) 1){ //invalid id, send away header(script language=\javascript\parent.C.location.href = \show.html\;/script); header(script language=\javascript\parent.B.location.href = \custn.html\;/script); exit; } else { //get info $title = mysql_result($get_query_res,0,'item_num'); $desc = mysql_result($get_query_res,0,'description'); $q = mysql_result($get_query_res,0,'qty'); $p = mysql_result($get_query_res,0,'price'); $c = mysql_result($get_query_res,0,'comments'); $tp = mysql_result($get_query_res,0,'Tprice'); $display_block = html; } ? html head body centerBR Choose from the following options to set your preferences: ? echo $display_block; ? BR/center /body /html And I get: Unknown column 'robert' in 'where clause' ThANKS!! Robert -- 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] Erroring out?!
Robert Sossomon wrote: I am trying to figure out why if there is an error in my query it throws an error message to the screen instead of parsing the rest of my script to get the rest of the information. I have error checking in my script and if there is no information I want it to process and do things. I run this: ? session_start(); //connect to database include 'db.php'; include 'salesinfo.php'; $query = select * from quoteprefs where salesman = $user; $get_query_res = mysql_query($query) or die(mysql_error()); if (mysql_num_rows($get_query_res) 1){ //invalid id, send away header(script language=\javascript\parent.C.location.href = \show.html\;/script); header(script language=\javascript\parent.B.location.href = \custn.html\;/script); exit; } else { //get info $title = mysql_result($get_query_res,0,'item_num'); $desc = mysql_result($get_query_res,0,'description'); $q = mysql_result($get_query_res,0,'qty'); $p = mysql_result($get_query_res,0,'price'); $c = mysql_result($get_query_res,0,'comments'); $tp = mysql_result($get_query_res,0,'Tprice'); $display_block = html; } ? html head body centerBR Choose from the following options to set your preferences: ? echo $display_block; ? BR/center /body /html And I get: Unknown column 'robert' in 'where clause' ThANKS!! Robert $get_query_res = mysql_query($query) or die(mysql_error()); die(mysql_error()) prints the error message to the screen, then kills the script, if mysql_query errors. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Load a frame and work on another?
Did you try to just echo the javascript statements instead of trying to use the header? Should have the same effect. - Original Message - From: Robert Sossomon [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Monday, June 14, 2004 2:32 PM Subject: [PHP] Load a frame and work on another? Here is a piece of my code in my PHP, I am trying to reload frame C with updated information and reload the current page into the current frame. Can someone tell me where I am going wrong? if (mysql_num_rows($get_query_res) 1){ //invalid id, send away header(script language=\javascript\parent.C.location.href = \show.html\;/script); header(script language=\javascript\parent.B.location.href = \prefs.html\;/script); exit; Thanks, Robert -- 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] Erroring out?!
I think you need single quotes around $user. $query = select * from quoteprefs where salesman = '$user'; I am trying to figure out why if there is an error in my query it throws an error message to the screen instead of parsing the rest of my script to get the rest of the information. I have error checking in my script and if there is no information I want it to process and do things. I run this: ? session_start(); //connect to database include 'db.php'; include 'salesinfo.php'; $query = select * from quoteprefs where salesman = $user; $get_query_res = mysql_query($query) or die(mysql_error()); if (mysql_num_rows($get_query_res) 1){ //invalid id, send away header(script language=\javascript\parent.C.location.href = \show.html\;/script); header(script language=\javascript\parent.B.location.href = \custn.html\;/script); exit; } else { //get info $title = mysql_result($get_query_res,0,'item_num'); $desc = mysql_result($get_query_res,0,'description'); $q = mysql_result($get_query_res,0,'qty'); $p = mysql_result($get_query_res,0,'price'); $c = mysql_result($get_query_res,0,'comments'); $tp = mysql_result($get_query_res,0,'Tprice'); $display_block = html; } ? html head body centerBR Choose from the following options to set your preferences: ? echo $display_block; ? BR/center /body /html And I get: Unknown column 'robert' in 'where clause' ThANKS!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Erroring out?!
I took out the or die(mysql_error()) and the script seems to continue correctly, however as there are no results it should be loading 2 windows in different pages, but I get only a white screen and no messages written to the error logs. I am trying to use the header function to javascript load 2 pages. Any thoughts? -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 2:44 PM To: PHP List Subject: [PHP] Erroring out?! I am trying to figure out why if there is an error in my query it throws an error message to the screen instead of parsing the rest of my script to get the rest of the information. I have error checking in my script and if there is no information I want it to process and do things. I run this: ? session_start(); //connect to database include 'db.php'; include 'salesinfo.php'; $query = select * from quoteprefs where salesman = $user; $get_query_res = mysql_query($query) or die(mysql_error()); if (mysql_num_rows($get_query_res) 1){ //invalid id, send away header(script language=\javascript\parent.C.location.href = \show.html\;/script); header(script language=\javascript\parent.B.location.href = \custn.html\;/script); exit; } else { //get info $title = mysql_result($get_query_res,0,'item_num'); $desc = mysql_result($get_query_res,0,'description'); $q = mysql_result($get_query_res,0,'qty'); $p = mysql_result($get_query_res,0,'price'); $c = mysql_result($get_query_res,0,'comments'); $tp = mysql_result($get_query_res,0,'Tprice'); $display_block = html; } ? html head body centerBR Choose from the following options to set your preferences: ? echo $display_block; ? BR/center /body /html And I get: Unknown column 'robert' in 'where clause' ThANKS!! Robert -- 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] Erroring out?!
Taking the die() out may have helped your script continue but now you won't know if there are sql problems which would cause you to not get any data. I typically trap the error in a string variable or an array, depending on the application, and print that out in a nice way to see why my query didn't return data. In your case, missing the quotes on $user, you won't return data from the query because the query is in error. Steve - Original Message - From: Robert Sossomon [EMAIL PROTECTED] To: 'PHP List' [EMAIL PROTECTED] Sent: Monday, June 14, 2004 2:53 PM Subject: RE: [PHP] Erroring out?! I took out the or die(mysql_error()) and the script seems to continue correctly, however as there are no results it should be loading 2 windows in different pages, but I get only a white screen and no messages written to the error logs. I am trying to use the header function to javascript load 2 pages. Any thoughts? -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 2:44 PM To: PHP List Subject: [PHP] Erroring out?! I am trying to figure out why if there is an error in my query it throws an error message to the screen instead of parsing the rest of my script to get the rest of the information. I have error checking in my script and if there is no information I want it to process and do things. I run this: ? session_start(); //connect to database include 'db.php'; include 'salesinfo.php'; $query = select * from quoteprefs where salesman = $user; $get_query_res = mysql_query($query) or die(mysql_error()); if (mysql_num_rows($get_query_res) 1){ //invalid id, send away header(script language=\javascript\parent.C.location.href = \show.html\;/script); header(script language=\javascript\parent.B.location.href = \custn.html\;/script); exit; } else { //get info $title = mysql_result($get_query_res,0,'item_num'); $desc = mysql_result($get_query_res,0,'description'); $q = mysql_result($get_query_res,0,'qty'); $p = mysql_result($get_query_res,0,'price'); $c = mysql_result($get_query_res,0,'comments'); $tp = mysql_result($get_query_res,0,'Tprice'); $display_block = html; } ? html head body centerBR Choose from the following options to set your preferences: ? echo $display_block; ? BR/center /body /html And I get: Unknown column 'robert' in 'where clause' ThANKS!! Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Problems compiling PHP 5 RC3
U, how do I set the make commands to do that? -Original Message- From: raditha dissanayake [mailto:[EMAIL PROTECTED] Sent: 13 June 2004 15:43 To: [EMAIL PROTECTED] Subject: Re: [PHP] Problems compiling PHP 5 RC3 Luca Spiller wrote: I am having a few problems compiling PHP 5 RC 3. I am following the tutorial at http://uk.php.net/install.apache2 and everything works up until I start to compile PHP. It all seems to work fine but then when running make at the end I get: ln: creating hard link 'libxml.o' to 'libxml.lo': Operation not permitted Possibly because creating a hard link between two partitions is not allowed you will have to use a symbolic link instead. (ln -s) -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.706 / Virus Database: 462 - Release Date: 14/06/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP5] Super constructor?
Franciccio wrote: If i'm not wrong php has only 1 level of depth for child class. That means you can only extends from 1 level up the class. In your example you have the class OneMore that extends down from the grandfather Base. It is not a problem in C++ but should not work in php or either javascript. Am i wrong? Yes, you are. You can extend as much as you want. If you couldn't, it wouldn't be very useful. Franciccio Frzzman [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] Hi guys, hey don't laugh at the subject, in fact I don't what to call it, so let's call it super constructor :D Let's see following code... class Base { __construct() { // Do something } } class One extends Base { __construct() { // Do nothing } } class OneMore extends One { __construct() { // Do things :D } } So when I create an instance of OneMore class by: $OneMoreInstance = new OneMore() The __construct() method of class OneMore will be called, not the one of One and Base, right? So is there any way around to make the Base class have a contructor that will be called everytime one of its child initialize? My problem, I want all of the classes in my object are extend from one base class, so they are all have some common properties and function, but PHP won't implicit call the contructor (that's the right way)... btw, in my case, this is bad, as bad as every constructor would be called... Well, hope you understand what I'm trying to say... -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [PHP5] Super constructor?
Hmm, looks like my reply got lost. Here's my ideas: Instead of parent::__construct() use Class1::__construc(). This way, you go straight to the top-level constructor without going through the middle constructors. This means that you *must* overload __construct in all child classes or else the constructor of the immediate parent will be called. If you want to leave the option of no child constructor open, you could use something like: parent::__construct(); if(strtolower(get_class($this)) == 'class2') { //do constructor things for class2 } in the constructor for Class2. Then if Class3 has no constructor, the Class2 constructor code won't be run. Frzzman wrote: Yeah you understood me, thanks god :D but not fully :( But the problem is right in your code (sorry :D) What if I create an instance of ChildClass, its constructor won't be called (since it commented out), but if I un-comment its constructor, it will be called even if I create an instance of GrandChildClass? Let me make some simple diagram ;) Class1 -- Class2 -- Class3 -- Class4 If I create an instance of Class4, then Class4's constructor and Class1's constructor must be called, neither Class3 nor Class2. You can see that Class1's constructor will always be called, and the constructor of the lowest class in the class tree will be called. I think this is a bit complex, I can define a final function in Class1, and call it in every deriver class constructor, it will solve the problem (I think) but it's not convenience, I want it done automatically... Any idea are welcome :D Chris wrote: FrzzMan wrote: Hi guys, hey don't laugh at the subject, in fact I don't what to call it, so let's call it super constructor :D Let's see following code... class Base { __construct() { // Do something } } class One extends Base { __construct() { // Do nothing } } class OneMore extends One { __construct() { // Do things :D } } So when I create an instance of OneMore class by: $OneMoreInstance = new OneMore() The __construct() method of class OneMore will be called, not the one of One and Base, right? So is there any way around to make the Base class have a contructor that will be called everytime one of its child initialize? My problem, I want all of the classes in my object are extend from one base class, so they are all have some common properties and function, but PHP won't implicit call the contructor (that's the right way)... btw, in my case, this is bad, as bad as every constructor would be called... Well, hope you understand what I'm trying to say... I'm not positive I understand you correctly, but I think this will answer your question. Example Classes: class ParentClass { function __construct() { echo 'ParentClass::__construct()',\r\n; } } class ChildClass extends ParentClass { /* function __construct() { parent::__construct(); echo 'ChildClass::__construct()',\r\n; } //*/ } class GrandChildClass extends ChildClass { function __construct() { parent::__construct(); echo 'GrandChildClass::__construct()',\r\n; } } __construct is just like any other method, if you overload it (redefine it in a child class), the parent method will not be called automatically, so, if you want the functionality of both, you can call the parent constructor from the childs constructor. If the direct parent doesn't have a constructor, the next parent's constructor is checked and so on. In the above example when defining a GrandChildClass, its constructor and the ParentClass::__construct() are will both run. If you uncomment ChildClass::__construct(), it will run as well. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php and CSS
Hello all. Im deleloping some PHP pages for school work, and now, im trying to put the pages nice, with some colors and images, etc... I found a problem regarding CSS and PHP The same page, with html extension, it works fine, but when the page becames with php extension, the CSS just dont work.. Someone has any idea why this is happening ?? Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] protecting your source code?
I wrote a bunch of code that will be used for a local site. I usually do all my hosting with a friend who I trust...the new site will be hosted by another company in town (not my choosing) who I don't necessarily trust to not copy the code and reuse it for other sites. How can I protect the code? I know there are some encoders but I have never used them. Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Load 2 Frames (possibly OT)
I need to load 2 frames from within PHP, I just don't know how to do it. I have tried header calls, I've tried echoing out the javascript command, but I need a way to load the pages at one time. Layout: add List see You use list to add information, when things are added in add they call another script to process the add. At the end of the add is when I need see to be loaded. I am pretty sure it is going to have to be a javascript, but even that I haven't found the code for yet. Any thoughts? My current code is: header(script language=\javascript\parent.C.location.href = \show.html\;/script); header(script language=\javascript\parent.B.location.href = \custn.html\;/script); Thanks, Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php and CSS
Bruno, Drop some code our way, it's just a guessing game for me without it. Robert -Original Message- From: Bruno Santos [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 3:28 PM To: [EMAIL PROTECTED] Subject: [PHP] php and CSS Hello all. Im deleloping some PHP pages for school work, and now, im trying to put the pages nice, with some colors and images, etc... I found a problem regarding CSS and PHP The same page, with html extension, it works fine, but when the page becames with php extension, the CSS just dont work.. Someone has any idea why this is happening ?? Cheers -- 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] Re: Load 2 Frames (possibly OT)
Robert Sossomon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I need to load 2 frames from within PHP, I just don't know how to do it. I have tried header calls, I've tried echoing out the javascript command, but I need a way to load the pages at one time. Layout: add List see You use list to add information, when things are added in add they call another script to process the add. At the end of the add is when I need see to be loaded. I am pretty sure it is going to have to be a javascript, but even that I haven't found the code for yet. Any thoughts? My current code is: header(script language=\javascript\parent.C.location.href = \show.html\;/script); header(script language=\javascript\parent.B.location.href = \custn.html\;/script); Just echo out your JS: echo 'script language=javascriptparent.C.location.href = show.html;/script'; Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP5] Super constructor?
ok thanks Justin Patrin [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] Franciccio wrote: If i'm not wrong php has only 1 level of depth for child class. That means you can only extends from 1 level up the class. In your example you have the class OneMore that extends down from the grandfather Base. It is not a problem in C++ but should not work in php or either javascript. Am i wrong? Yes, you are. You can extend as much as you want. If you couldn't, it wouldn't be very useful. Franciccio Frzzman [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] Hi guys, hey don't laugh at the subject, in fact I don't what to call it, so let's call it super constructor :D Let's see following code... class Base { __construct() { // Do something } } class One extends Base { __construct() { // Do nothing } } class OneMore extends One { __construct() { // Do things :D } } So when I create an instance of OneMore class by: $OneMoreInstance = new OneMore() The __construct() method of class OneMore will be called, not the one of One and Base, right? So is there any way around to make the Base class have a contructor that will be called everytime one of its child initialize? My problem, I want all of the classes in my object are extend from one base class, so they are all have some common properties and function, but PHP won't implicit call the contructor (that's the right way)... btw, in my case, this is bad, as bad as every constructor would be called... Well, hope you understand what I'm trying to say... -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] protecting your source code?
Hi Edward, Check out the Zend Encoder: www.zend.com To run encoded/compiled programs, the server will need the (free) Zend Optimizer, available for download at the same location. Zend has a small-business program that if your yearly revenues are less than some magic number, you get a major discount on the Zend Suite which includes the encoder and the development environment. The Zend Development Environment is fantastic- includes a debugger and profiler, code completion, etc. After 10+ years as a vi-guy, I actually made the switch recently. :) James -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 3:50 PM To: Php-General Subject: [PHP] protecting your source code? I wrote a bunch of code that will be used for a local site. I usually do all my hosting with a friend who I trust...the new site will be hosted by another company in town (not my choosing) who I don't necessarily trust to not copy the code and reuse it for other sites. How can I protect the code? I know there are some encoders but I have never used them. Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. -- 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] php and CSS
Robert Sossomon wrote: Bruno, Drop some code our way, it's just a guessing game for me without it. Robert -Original Message- From: Bruno Santos [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 3:28 PM To: [EMAIL PROTECTED] Subject: [PHP] php and CSS Hello all. Im deleloping some PHP pages for school work, and now, im trying to put the pages nice, with some colors and images, etc... I found a problem regarding CSS and PHP The same page, with html extension, it works fine, but when the page becames with php extension, the CSS just dont work.. Someone has any idea why this is happening ?? Cheers Well, here is it: ?php require ('funcoes.php'); /* Página de Ajuda. Apartir desta pagina, acede-se a ajuda que e pedida pelo utilizador. Os ficheiros de ajuda estao numa pasta chamada help, e sao txt. */ ? html headtitleAjuda/title LINK rel=StyleSheet type=text/css href=ajuda.css /head body ?php if (isset ($_GET['idhlp'])) { //abrir o ficheiro $fileName = HELP.'/'.$_GET['idhlp'].'.txt'; $fp = fopen ($fileName,'r'); //abrir ficheiro de ajuda /* $contents = fread ($fp, filesize ($fileName)); fclose ($fp); */ //por questoes de seguranca, vamos retirar as tags html do ficheiro //$contents = strip_tags ($contents); //imprimir o html $titulo = fgets ($fp,1024); echo 'table widht=100%'; echo 'tr'; echo 'td class=titulo'.$titulo.'/td'; echo '/tr'; echo 'trtd'; while (!feof($fp)) { $buffer = fgets ($fp,1024); echo $buffer; } echo '/td/tr'; echo 'trtdinput type=button value=fechar onclick=window.close()'; echo '/table'; } else { Header(Location: index.php); } echo '/body/html'; ? has some coments in Portuguese, but, the essential is the first lines. I've always done this way, and always has work... till now... =:( Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] protecting your source code?
Thanks James, I have played with the Zend IDE a little...but will take a look. On a simpler scale, I usually have one main directory which then holds the subdirectories for classes, header, etc. then use includes to pull in header, classes, etc. I tried to call my classes from an external folder but can instantiate them..why? I seem to be able to pull them in...example include_once(http://www.peloke.com/myfolder/src/classes/classname.class.php ); but when I try to instantiate it, get an error that I can't $classname=new Classname(); Why? Thanks, Eddie -Original Message- From: James Harrell [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 3:55 PM To: Edward Peloke; Php-General Subject: RE: [PHP] protecting your source code? Hi Edward, Check out the Zend Encoder: www.zend.com To run encoded/compiled programs, the server will need the (free) Zend Optimizer, available for download at the same location. Zend has a small-business program that if your yearly revenues are less than some magic number, you get a major discount on the Zend Suite which includes the encoder and the development environment. The Zend Development Environment is fantastic- includes a debugger and profiler, code completion, etc. After 10+ years as a vi-guy, I actually made the switch recently. :) James -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 3:50 PM To: Php-General Subject: [PHP] protecting your source code? I wrote a bunch of code that will be used for a local site. I usually do all my hosting with a friend who I trust...the new site will be hosted by another company in town (not my choosing) who I don't necessarily trust to not copy the code and reuse it for other sites. How can I protect the code? I know there are some encoders but I have never used them. Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] protecting your source code?
Check out: Zend encoder www.zend.com SourceGuardian www.sourceguardian.com IonCube www.ioncube.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php and CSS
-Original Message- From: Bruno Santos [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 4:04 PM To: Robert Sossomon Cc: [EMAIL PROTECTED] Subject: Re: [PHP] php and CSS Robert Sossomon wrote: Bruno, Drop some code our way, it's just a guessing game for me without it. Robert -Original Message- From: Bruno Santos [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 3:28 PM To: [EMAIL PROTECTED] Subject: [PHP] php and CSS Hello all. Im deleloping some PHP pages for school work, and now, im trying to put the pages nice, with some colors and images, etc... I found a problem regarding CSS and PHP The same page, with html extension, it works fine, but when the page becames with php extension, the CSS just dont work.. Someone has any idea why this is happening ?? Cheers Well, here is it: ?php require ('funcoes.php'); /* Página de Ajuda. Apartir desta pagina, acede-se a ajuda que e pedida pelo utilizador. Os ficheiros de ajuda estao numa pasta chamada help, e sao txt. */ ? html headtitleAjuda/title LINK rel=StyleSheet type=text/css href=ajuda.css /head body ?php if (isset ($_GET['idhlp'])) { //abrir o ficheiro $fileName = HELP.'/'.$_GET['idhlp'].'.txt'; $fp = fopen ($fileName,'r'); //abrir ficheiro de ajuda /* $contents = fread ($fp, filesize ($fileName)); fclose ($fp); */ //por questoes de seguranca, vamos retirar as tags html do ficheiro //$contents = strip_tags ($contents); //imprimir o html $titulo = fgets ($fp,1024); echo 'table widht=100%'; echo 'tr'; echo 'td class=titulo'.$titulo.'/td'; echo '/tr'; echo 'trtd'; while (!feof($fp)) { $buffer = fgets ($fp,1024); echo $buffer; } echo '/td/tr'; echo 'trtdinput type=button value=fechar onclick=window.close()'; echo '/table'; } else { Header(Location: index.php); } echo '/body/html'; ? has some coments in Portuguese, but, the essential is the first lines. I've always done this way, and always has work... till now... =:( Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: protecting your source code?
Hello, On 06/14/2004 04:49 PM, Edward Peloke wrote: I wrote a bunch of code that will be used for a local site. I usually do all my hosting with a friend who I trust...the new site will be hosted by another company in town (not my choosing) who I don't necessarily trust to not copy the code and reuse it for other sites. How can I protect the code? I know there are some encoders but I have never used them. There are some commercial encoder solutions and some open source like Turck: http://turck-mmcache.sourceforge.net/ But these are not real PHP compilers. The only real PHP compiler that I know is RoadSend: http://www.roadsend.com/ -- 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] PHP en XML een vraag waard
Gegroet, Hoi Ik ben reeds een tijdje bezig met PHP en hier en daar lukt er al eens iets :=)) Maar nu stuit ik toch op een probleempje. Ik moet voor een siteje XML data gaan parsen die bekomen wordt uit een URL. Als ik deze URL in een browser invoer dan krijg ik XML code terug. Mijn vraag is nu: Welke code moet ik gaan in voeren (instuderen) om de aldus bekomen gevens om te zetten in bruikbare data voor het gebruyik in PHP. ik voer in de browser het volgende in: http://www.websiote.com/xml/xmlonl.asp?custid=CustIDprodid=ProdID en dan krijg ik iets in de zin van de data hieronder terug: ?xml version=1.0 ? - RealData MSG ID=0ok/MSG - ITEM ID876607/ID DESCAntec Aluminium Midi Tower 4x5,25 2x3,5 USB amp; IEEE1394 amp; audio 2x120mm fan NO PSU/DESC PRICE CURRENCY=EUR103,3/PRICE QTY32/QTY DELDATE15062004/DELDATE /ITEM /RealData wat ik hieruit nodig heb zijn de volgende gegevens: het veld QTY, PRICE CURRENCY en het veld DELDATE ik heb totaal geen ervaring met de combinatie PHP en XML. Alle hulp is meer dan welkom. Yves, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Function Date
Yes! That's right! Thank you Juan Hello Juan, Monday, June 14, 2004, 6:04:56 PM, you wrote: JPH I am using date(j M Y), the format date is 14 Jun 2004, but i need this JPH format 14 JUN 2004. The unique difference is Jun - JUN. How can i change JPH this?. $date = strtoupper(date('j M Y')); :) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I am not young enough to know everything. - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Online training - Recommendations??
Hello, Anyone have any recommended(reputable) resources for online PHP training/certification? I would like good training but a certificate and course documentation of would be good too. Thank you, -Brian Anderson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: MapServer and PHP/MapScript
René fournier wrote: Anybody have any experience (good or bad) with MapServer? (http://mapserver.gis.umn.edu/) And if so, can you comment on how good or bad PHP/MapScript is? (http://mapserver.gis.umn.edu/doc42/phpmapscript-class-guide.html) I have it running - but I haven't worked out how to make my own map yet :) -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Image Map
Hi! How can i make an image map with image function php? My idea is make a similar concept to http://www.infobae.com/ediciondigital/paginas.php Thank you! Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: MapServer and PHP/MapScript
Can I ask, what platform/OS you are running it on? I am looking to build it for OSX 10.3... ...Rene On Monday, June 14, 2004, at 03:16 PM, Lester Caine wrote: René fournier wrote: Anybody have any experience (good or bad) with MapServer? (http://mapserver.gis.umn.edu/) And if so, can you comment on how good or bad PHP/MapScript is? (http://mapserver.gis.umn.edu/doc42/phpmapscript-class-guide.html) I have it running - but I haven't worked out how to make my own map yet :) -- Lester Caine - L.S.Caine Electronic Services -- 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] Eliminating all lowercase words
Hi folks! I need a function that will examine input for lowercase words. In the processing of that input, I would like to eliminate them (so as to keep all uppercase words). I prototyped a reasonable function using the 'Find: using regex feature' in KWrite, so it works there. $search (([^\bA-Z][a-z]\b*?)*?)); $replace = ; $add = preg_replace($search, $replace, $add); hWhen I tried it, it eliminated all lowercase words, and in the case of the single upper case word, 'Bellingham', it retained only the capital 'B' -- arrgh! Is there access to the internals of ucase function so I can find out how to do this, or is there any easier way? Any ideas, suggestions, and even admonitions would be very welcome! Tia, Andre -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() warnings
Always call the function on the first line of your page. Bye Paoage [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] Larry E . Ullman wrote: When I use session_start function, I receive the following warning messages: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/w4t3c101/public_html/ListClientInfo.php:2) in /home/w4t3c101/public_html/SessionControl.php on line 9 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/w4t3c101/public_html/ListClientInfo.php:2) in /home/w4t3c101/public_html/SessionControl.php on line 9 Can anyone explain why it happens and how to solve the warnings. Thanks :) Something on or about line 2 of ListClientInfo.php is sending data to the Web browser. This could be HTML, plain text, or blank spaces. Get rid of that and you'll get rid of the warnings. Larry Thanks, I got it. I leave a line of space before I use include directive. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] can't change upload_tmp_dir--not sure what's up
I am having some serious troubles uploading files to my server. The ISP cannot provide me with the tmp directory where files are stored so I am trying to change that directory to a specified one. I am editing the php.ini file to read as follows: ; File Uploads ; ; Whether to allow HTTP file uploads. file_uploads = On ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). upload_tmp_dir = ./var/www/html/tmp/ ; Maximum allowed size for uploaded files. upload_max_filesize = 2M alas, when i upload a file, nothing arrives in the specified folder. All permissions are set to full access. below is the php code: HTML HEAD TITLEHandling File Uploads/TITLE /HEAD BODY ?php /* This next conditional determines whether or not to handle the form, depending upon whether or not $File exists. */ if ($File) { print (File name: $File_nameP\n); print (File size: $File_sizeP\n); if (copy ($File, users/$File_name)) { print (Your file was successfully uploaded!P\n); } else { print (Your file could not be copied.P\n); } unlink ($File); } print (Upload a file to the server:\n); print (FORM ACTION=\FileUpload.php\ METHOD=POST ENCTYPE=\multipart/form-data\\n); print (File INPUT TYPE=FILE NAME=\File\ SIZE=20BR\n); print (INPUT TYPE=SUBMIT NAME=\SUBMIT\ VALUE=\Submit!\/FORM\n); ? /BODY /HTML any help would be immensely appreciated Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Cookie Security?
I would suggest (haven't tried to write code in details) to associate a random number in a variable each time you send a cookie (for new cookies anyway) and store the key (randomvariable-cookie) ina database. You should be able to verify the user at next connection verifying the matching key. Michal Migurski [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] [snip} As well as much harder for AOL subscribers (whose IP's change per-request) to use the site. [snip] WHAT?? Are you sure of this? AOL really breaks internet browsing this much? Sorry, I can't believe this. If this was true, many things would break. Not really -- HTTP is stateless, so there's really no reason for each request to come from the same IP. As other posters in this thread have pointed out, AOL uses an army of proxy servers. In the past, they've even cached and re-compressed images for the benefit of those on slow dialup. As you say, wacky stuff. You're on the right track, though - the way to make cookies tougher to crack is to associate the cookie with some other piece of user information. I've toyed with using an encrypted string based on the user agent as part of the cookie, but have never encountered a project where this level of care was called-for while SSL was not. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Eliminating all lowercase words
$search (([^\bA-Z][a-z]\b*?)*?)); $replace = ; $add = preg_replace($search, $replace, $add); hWhen I tried it, it eliminated all lowercase words, and in the case of the single upper case word, 'Bellingham', it retained only the capital 'B' -- arrgh! You could just look for lowercase words, instead of not-uppercase words, like so: /\b[a-z]\w+\b/ - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Combo problems.. Multi Array??
Thanks Mike, I have read up a lot on permutation but I'm not completely sure that this will solve my problem. From what I can gather permutation takes a sample (i.e. ABC) and tells you how many different ways it can arrange the letters, with order mattering. What I need to do is take a variable number of groups (in my example, 3) and then display the combinations of ways that my sample (in my example, 2) can be spread across the groups. I had a go at permutation based on your advice and while I was able to successfully find all the different combinations of ABC it did not help me in my need of dispersing the sample amongst the available groups. After I have my combinations I then need to process the data. The example again is as follows.. A [1][2] BC AB [1][2] C ABC [1][2] A [1]B [2]C AB [1]C [2] A [1]BC [2] A [2]B [1]C A [2]CC [1] AB [2]C [1] Think of the letters as being static amongst all possible combinations, and the numbers as the piece of data which is varying. In my actual code both fields are integers but this isn't really important here. Does anyone have any idea how I can do the above? Thanks so much, Michael. Ford, Mike [LSS] wrote: -Original Message- From: Michael Benbow [mailto:[EMAIL PROTECTED] Sent: 14 June 2004 08:31 To: [EMAIL PROTECTED] Subject: [PHP] Combo problems.. Multi Array?? Hi, I've got a problem which has left me scratching my head for the better part of a week. [...] The outcome, if working properly, should be... A [1][2] BC AB [1][2] C ABC [1][2] A [1]B [2]C AB [1]C [2] A [1]BC [2] A [2]B [1]C A [2]CC [1] AB [2]C [1] Does anyone have any ideas on how I could do this? As I said I'm completely stumped. This is called a permutation. Googling for permutation formula brings up any number of good links; the most succinct is probably http://www.mathwords.com/p/permutation_formula.htm, but most of the other top 10 links will give you the same answer with a bit (or a lot!) more explanation. 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 -- IT Co-ordinator Centre for Learning and Teaching Support Monash University http://www.celts.monash.edu.au
Re: [PHP] Eliminating all lowercase words
Thanks Michal, That's what I thought at first, but it eliminates all lowercase letters in a capitalized word as well. I plugged away at it and got it to work: $search = (\b[a-z][a-z]*?\b); $replace = ; $add = preg_replace($search, $replace, $add); Thanks for the help! Andre On Monday 14 June 2004 06:41 pm, Michal Migurski wrote: $search (([^\bA-Z][a-z]\b*?)*?)); $replace = ; $add = preg_replace($search, $replace, $add); hWhen I tried it, it eliminated all lowercase words, and in the case of the single upper case word, 'Bellingham', it retained only the capital 'B' -- arrgh! You could just look for lowercase words, instead of not-uppercase words, like so: /\b[a-z]\w+\b/ - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP 4.3.7 update - how to
* Thus wrote Alan McDonald ([EMAIL PROTECTED]): I've downloaded the 4.3.7 tar ball and extractted it. I've run configure (after deleting the cache), no errors. I've run make - no errors, I've then run make install.. no errors, it says it's updating and installing. Now I've restarted my httpd service - I've even rebooted but I'm left with phpinfo telling me that version 4.2.2 is running. I'm in RH9 and I have no idea why it doesn't install properly.. Can someone shed some light on this? Not sure if it's relevant, but does httpd.conf point to the new version? It's all I have to tweak in Windows. -- Lester Caine I must be missing something critical here... I was thinking that the make install would overwrite the PHP executables but it obviously doesn't .. Now where in the conf file does the PHP module get mentioned? I;ve searched it with no mention of PHP! take a look at the configure line in the output of your phpinfo() (the third entry in the list) script. Notice the gazillion configure options? There are some options in there that cause a special installation of php. But you're basically right, php's installation usually finds the correct place to put its self, mostly because apaches apxs script tell it where to put the library. From my experience RH seems to try its hardest to keep you from compiling your own source code. Conclusion: RPM's to source upgrade doesn't work very well. But I think you've already have seen that :) Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] protecting your source code?
Surely you can't include files that way, that php file will be process and you will end up include its result. Try include using file system path instead, it will work... About your question about source code protecting, try Turck MMCache, it's a optimizer (the best I known) plus it have encode ability... finally, it's free :P~ Edward Peloke wrote: Thanks James, I have played with the Zend IDE a little...but will take a look. On a simpler scale, I usually have one main directory which then holds the subdirectories for classes, header, etc. then use includes to pull in header, classes, etc. I tried to call my classes from an external folder but can instantiate them..why? I seem to be able to pull them in...example include_once(http://www.peloke.com/myfolder/src/classes/classname.class.php ); but when I try to instantiate it, get an error that I can't $classname=new Classname(); Why? Thanks, Eddie -Original Message- From: James Harrell [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 3:55 PM To: Edward Peloke; Php-General Subject: RE: [PHP] protecting your source code? Hi Edward, Check out the Zend Encoder: www.zend.com To run encoded/compiled programs, the server will need the (free) Zend Optimizer, available for download at the same location. Zend has a small-business program that if your yearly revenues are less than some magic number, you get a major discount on the Zend Suite which includes the encoder and the development environment. The Zend Development Environment is fantastic- includes a debugger and profiler, code completion, etc. After 10+ years as a vi-guy, I actually made the switch recently. :) James -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 3:50 PM To: Php-General Subject: [PHP] protecting your source code? I wrote a bunch of code that will be used for a local site. I usually do all my hosting with a friend who I trust...the new site will be hosted by another company in town (not my choosing) who I don't necessarily trust to not copy the code and reuse it for other sites. How can I protect the code? I know there are some encoders but I have never used them. Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Access Violation at 02B80AFD
I am developing a php app on a win 2003 server with iis6. Unfortunately, I don't know the version of sql server or php. I have been testing code since last Thursday and just started getting this error: PHP has encountered an Access Violation at 02B80AFD This error doesn't happen every time, even if you are just hitting refresh on the same page. It interferes with redirects and all update and insert queries fail (failure to connect) while the select queries run fine (access violation or not). The access violation is always at the same address(??) as far as I can tell. The client's server support thinks it is a permissions issue of some kind but doesn't know how to fix it. The access violation occurs now if I try to run phpinfo()--which is why I don't have the version. Php is not running as a cgi. I would really appreciate any ideas. Kathleen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fw:
- Original Message - From: Sriranganath To: [EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 9:50 AM Dear Sir, I am finding difficulty in inserting a record into a MySQL DB through PHP inpsite of all the privileges given to that database . Can u plz clarify it? Plz let me know what are all the processes that i have to start or include ..;;; in my files: Plz go through my code: and associated erors messages : ?php if (isset($_POST['submit'])) { $conn = mysql_connect(localhost:3308,user,password); mysql_select_db(database); $query = insert into branch (sol_id,sol_desc,ip_address,email_id) values ('.$_POST['solid'].', '.$_POST['brname'].', '.$_POST['ipadd'].', '.$_POST['email'].'); if (mysql_query($query)) echo 'Success'; else echo 'Failed'; } else { ? center form method=post action=?=$_SERVER['PHP_SELF'] ? Sol-ID input type=text name=solidbr Branch Name input type=text name=brnamebr IP-Address input type=text name=ipaddbr E-Mail input type=text name=emailbr input type=submit name=submit value=submit /form/center ? } ? after submitting the inputs; it is giving the following errors: username is the finfaq and database name is also finfaq password and username when i give directly to mysql, it is accepting. Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/www/html/whatnew/a.php on line 3 Warning: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/www/html/whatnew/a.php on line 3 Failed When i try to insert directly into the table, it is allowing:. regards Sriranganath
Re: [PHP] Fw:
$conn = mysql_connect(localhost:3308,user,password); You are connecting as user user with password password in the code, yet the error message references [EMAIL PROTECTED] so I'm pretty confused. cheers, Travis Sriranganath wrote: - Original Message - From: Sriranganath To: [EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 9:50 AM Dear Sir, I am finding difficulty in inserting a record into a MySQL DB through PHP inpsite of all the privileges given to that database . Can u plz clarify it? Plz let me know what are all the processes that i have to start or include ..;;; in my files: Plz go through my code: and associated erors messages : ?php if (isset($_POST['submit'])) { $conn = mysql_connect(localhost:3308,user,password); mysql_select_db(database); $query = insert into branch (sol_id,sol_desc,ip_address,email_id) values ('.$_POST['solid'].', '.$_POST['brname'].', '.$_POST['ipadd'].', '.$_POST['email'].'); if (mysql_query($query)) echo 'Success'; else echo 'Failed'; } else { ? center form method=post action=?=$_SERVER['PHP_SELF'] ? Sol-ID input type=text name=solidbr Branch Name input type=text name=brnamebr IP-Address input type=text name=ipaddbr E-Mail input type=text name=emailbr input type=submit name=submit value=submit /form/center ? } ? after submitting the inputs; it is giving the following errors: username is the finfaq and database name is also finfaq password and username when i give directly to mysql, it is accepting. Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/www/html/whatnew/a.php on line 3 Warning: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/www/html/whatnew/a.php on line 3 Failed When i try to insert directly into the table, it is allowing:. regards Sriranganath -- Travis Low mailto:[EMAIL PROTECTED] http://www.dawnstar.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php