Re: [PHP] meet problem while use imap_close
Let me answer my question myself my os is installed redhat 9.0 and use imap rpm after I start deamon imap and imaps (I didn't start imaps deamon at startup) everything goes well~! but it still need to add /notls behind protocol Frederick Kuo 6/3 Php Maillist wrote: hello everybody, I need help for using imap functions in php I refer the imap functions from the book Professional PHP4 it introduces the imap server from telnet it to writing a brief scripts it teach me that type telnet localhost 143 behind prompts and I got the right response from my imap server I can fetch my email by command line and watch the correct content but when I processed to the next step, writing a test PHP script for connecting to my imap serverI got error Warning: Couldn't open stream {127.0.0.1:143)INBOX in /var/www/html/imap_test.php on line 2 I installed the imap module for php by rpm, this error seens but for module include error, but it just can't connect to my imap server I searched imap in php maillist, someone discuss that the first parameter should expressed as {127.0.0.1:143/imap/notls} etc... but i tried a lot of different ways..It still couldn't work I didn't know to much about my imap server ..I just confirm that I can use any mailing software to connect to my imap server for recesiving mail correctly query my rpms I got this: [EMAIL PROTECTED] yhvh]$ rpm -qa|grep imap php-imap-4.2.2-17 imap-2001a-18 is there anyone could give me a hand?..I really confused... thanx a lot~! PS: I looking for imap functions in squirrelmail..I found that he connect to imap server by fsockopen?! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
AW: [PHP] how to insert form data // BigMark
BigMark wrote $sql = INSERT INTO whosaid (name,quote) VALUES ('$name', '$quote'); //$sql = INSERT INTO whosaid (name,quote) VALUES ('','$name', '$quote'); //if you have auto_incrementing id $result = mysql_qeury($sql); Try this way! Best regards Raja shahed -Ursprüngliche Nachricht- Von: BigMark [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 3. Juni 2004 05:13 An: [EMAIL PROTECTED] Betreff: [PHP] how to insert form data I am trying to learn how to take the value of $name and $quote from a form and put it in the database -whosaid but obviuosly i have it all wrong. Can anyone point out what im doing wrong. thx in advance ?php include(connect.php); $name = $_POST['name']; $quote = $_POST['quote']; $sql = INSERT INTO whosaid values (name='$name',quote='$quote'); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php raja @christine nothdurfter . it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Alternative to freetype?
Hi! Since it's almost impossible to find a web server which has freetype installed, I wonder which the alternatives are to put text on an image? Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [PHP-General] - LOC/FP for PHP.
Hi all, I have a question about PHP in relation with software engineering, and in particular, in order to apply COCOMO metod in a web-oriented software. I want to do a cost estimation of a software write in PHP-MySQL (and Linux-Apache) for a LAN. I know the teory about the software enginnering and especially of the model for estimation cost. I have many books and online materials about this, but in all I haven't table that show the coefficient of LOC/FP or SLOC/UFP (for COCOMOII) of PHP (in these tables there are coefficient for C, C++, Java, Lisp, Basic, ADA, Assembly, but not about PHP or scripting languages). Anyone know anything about this arguments? Thanks in advance and regards to all folks. Francesco [EMAIL PROTECTED]
Re: [PHP] Re: Can session.save_path data be saved to a database instead of a file system?
Caleb Walker wrote: This is how I would do it and would require no additional changes to the code - just set your auto prepend in a .htaccess file if you're using Apache. This sounds interesting. Could you elaborate a little more? I mean what is the auto prepend and what is the syntax for the .htaccess? Thanks very much. Caleb The manual says it all: http://sk2.php.net/manual/en/configuration.changes.php http://sk2.php.net/manual/en/configuration.directives.php#ini.sect.data-handling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sophisticated rss builder class
Hi there, I am wanting to know if there is any good rss builder classes, that is similar to what the PEAR XML_Tree class can do. Sadly there is no pear rss builder out there, and the ones on PHP classes are dodgy. Please let me know thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and HVCI
Hi, does anybody have an idea how to implement HBCI-functionality to a PHP-Site? greetings Arndt Touby -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: how to insert form data
On 03 June 2004 03:57, Ligaya Turmelle wrote: shouln't be QUOTE: input type = textarea name=quote... If that was a question, then: No, it shouldn't. Some versions of a certain browser may have supported this, but it has never been part of any HTML standard. 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
[PHP] (Newbie question) Advice on comment system (no db!) design issues
Hi! I am about to write a comment system in PHP, but as i am not any good at PHP i am seeking some advice. This is what i want from the system: * Flexibility! I want to be able to attach it where i want let the user give comments easily. For example comments could be on a blog entry or on a downloadable file, whatever i like it to be. * I will moderate all comments from all commentpoints before they are published. * Not use a database. I am wondering what the best approach is? I thought of this: Use an object oriented approach, and have a class called CommentSystem. When i create an instance of the class the commentpoint id (some integer/string) is passed and the comments are read into the object. After the object creation i can display all comments using something similar to: aCommantSystem-outputHTML() in my code. The inner datastructure holding the comments should be an array, perhaps multidimensional with different data in each column? When a comment is added using something similar to aCommantSystem-addComment($username,$comment,$date) the array has one element appended to it. Persistent storage of the commentsystem is done through serialize and unserialize and saved to a file with equal name to the specific commentpoint id. I will have some way to list all new comments from all commentpoints so that i can moderate them (accept/refuse) before they are to be viewed in public. I haven´t thought of some good way to do this though. Does the above sound like a good solution? Or should i do it in some other way? All feedback would be appreciated! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] IMPORTANT MASSAGE FROM THE BANK
FROM:Mr DAVIES HARRIES bills and exchange director GUARANTY TRUST BANK PLC Email:[EMAIL PROTECTED] Fax No:14134519233 Dear Sir, I am Mr.Davies Harries the bills and exchange director at the GUARANTY TRUST BANK PLC, I am writing this letter to solicit for support and assistance from you to carry out this business opportunity in my department. Lying in an inactive account is the sum of us$34.7million belonging to a foreign customer(mr James Kelly) who happens to be deceased. he died with his wife and two children in a plane crash on board an ADC airline flight at the Egirin river Lagos Nigeria in november 1997. Ever since he died the bank has been expecting his next of kin to come and claim these fund. To this effect, we can not release the money unless someone applies for it as next of kin, as indicated in our banking guideline. Unfortunately he has no family member in Nigeria or Over-sea who are aware of the existence of the money(as he was a contractor with the federal Republic of Nigeria). At this juncture i have decided to do business with you.To this effect I solicit your assistance in applying as the next of kin then the money will be released to you. As I do not want this money to go into the bank treasury as an unclaimed bill. The banking law and guideline stipulates that if such money(s) remains unclaimed for a period of up to 8 years(8yrs)the money will be transferred into the banks treasury as an unclaimed bill.My request for a foreigner as next of kin is occasioned by the fact that the customer was a foreigner and a Nigerian cannot stand as next of kin. Sir, 20% of the money will be your share as a foreign partner and your assistance to actualise this business,5% for any expenses incured. Thereafter i will visit your country with your help once the money hits your account for disbursement according to the percentage indicated. To effect the immediate transfer of the fund to you as agreed,you must apply first to the bank as the next of kin to the deceased,then we will follow up all formalities for the transaction. Upon receipt of your reply, i will send to you by fax or email the text of the application you are to send to the bank, as soon as you receive the text i will further clarify you in other issues as to affect the business. Awaiting to hear from you. Best Regards Davies Harries REPLY ME ON MY PERSONAL EMAIL:[EMAIL PROTECTED]
[PHP] Class Syntax Help or Globals issue
Hi All I am new to classes and are trying to work out whether they will make my coding experience easier. I have written the following test class which is trying to take three variables from a mssql query and add them as variables in a new class. This isnt working as i keep getting an error that says ; Warning: Missing argument 1 for app() in /var/www/htdocs/temp3.php on line 13 Warning: Missing argument 2 for app() in /var/www/htdocs/temp3.php on line 13 Warning: Missing argument 3 for app() in /var/www/htdocs/temp3.php on line 13 the code . //a basic class to store basic appointment details in class App { var $name; var $the_date; var $result; //add values to the variables function App($app1name,$appdate,$appresult){ $this-name=$app1name; $this-the_date=$appdate; $this-result=$appresult; } } $query=select app1name,appdate,appresult from appresult where appdate 'jun 01 2004'; $qresult=mssql_query($query,$numero);//get the number of rows returned $numrow=mssql_num_rows($qresult); if($row=mssql_fetch_array($qresult)){ $i=0; do{ $j=$i; $j= new App; $j-App($row[app1name],$row['appdate'],$row['appresult']); } while($row=mssql_fetch_array($qresult)); } ? Is there a syntax problem with the way im trying to pass the value of the $row array cells into the class function? I have looked at the online manual for classes but find it a bit confusing on how to input and extract variables data in classes. Any help or pointing in the direction of some good docs would be greatly appreciated! thanks for any help in advance. Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Class Syntax Help or Globals issue
bob pilly wrote: Hi All I am new to classes and are trying to work out whether they will make my coding experience easier. I have written the following test class which is trying to take three variables from a mssql query and add them as variables in a new class. This isnt working as i keep getting an error that says ; Warning: Missing argument 1 for app() in /var/www/htdocs/temp3.php on line 13 Warning: Missing argument 2 for app() in /var/www/htdocs/temp3.php on line 13 Warning: Missing argument 3 for app() in /var/www/htdocs/temp3.php on line 13 the code . //a basic class to store basic appointment details in class App { var $name; var $the_date; var $result; //add values to the variables This is the function's constructor, it's called when you create a class instance using new operator: function App($app1name,$appdate,$appresult){ $this-name=$app1name; $this-the_date=$appdate; $this-result=$appresult; } } $query=select app1name,appdate,appresult from appresult where appdate 'jun 01 2004'; $qresult=mssql_query($query,$numero);//get the number of rows returned $numrow=mssql_num_rows($qresult); if($row=mssql_fetch_array($qresult)){ $i=0; do{ $j=$i; So instead of: $j= new App; $j-App($row[app1name],$row['appdate'],$row['appresult']); you have to suply the arguments to the contructor this way: $j= new App($row[app1name],$row['appdate'],$row['appresult']); } while($row=mssql_fetch_array($qresult)); } ? Is there a syntax problem with the way im trying to pass the value of the $row array cells into the class function? I have looked at the online manual for classes but find it a bit confusing on how to input and extract variables data in classes. Any help or pointing in the direction of some good docs would be greatly appreciated! thanks for any help in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 4.3.7 Released
PHP Development Team is proud to announce the release of PHP 4.3.7. This is a maintenance release that in addition to several non-critical bug fixes, addresses an input validation vulnerability in escapeshellcmd() and escapeshellarg() functions on the Windows platform. Users of PHP on Windows are encouraged to upgrade to this release as soon as possible. Aside from the above mentioned issues this release includes the following important fixes: Synchronized bundled GD library with GD 2.0.23. Fixed a bug that prevented compilation of GD extensions against FreeType 2.1.0-2.1.2. Fixed thread safety issue with informix connection id. Fixed incorrect resolving of relative paths by glob() in windows. Fixed mapping of Greek letters to html entities. Fixed a bug that caused an on shutdown crash when using PHP with Apache 2.0.49. Fixed a number of crashes inside pgsql, cpdf and gd extensions. All in all this release fixes over 30 bugs that have been discovered and resolved since the 4.3.6 release. Enjoy, PHP Development Team. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail() problem
I would also suggest adding the following headers to the message, as they are supposed to help keep the spam filters from recognizing a message as spam: X-Priority: 3 X-MSMail-Priority: Normal Of course, you can read up on the various priority levels and change them if you want, but these settings are for normal priority mail and will help to pass it through the spam filters, from what I understand. They've worked for us so far. Stephen Lake wrote: Another suggestion is if its an HTML format mail, make sure you use properie making sure all tags are closed that kind of stuffsome software will block if the HTML is not well formed Rick [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All, Does anyone know a good format for sending email using the mail() function that doesnt get stopped by antispam software? I need to send and email from my sever when a new member creates an account, this ive done but my email gets binned straight away? must be the headers? Regards Rick -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php installation verification
Did you fix this problem yet? The lines below are fine for your apache httpd.conf file. The only thing that appears out of the ordinary is the location of libphp4.so. In my setup (I'm also using Red Hat and Apache 2.0), when I compile PHP, it places libphp4.so in the modules directory (/etc/httpd/modules), which is where I would think it should be on your system, so try changing that line to: LoadModule php4_module modules/libphp4.so Of course, check to make sure the file is in that location first, as I could be way off. Then, restart apache and try to access your test.php script. Long P Nguyen wrote: OK - I tried that and what came up on the browser was the content of the test.php file. I checked in my httpd.conf file I do have the following: AddType application/x-httpd-php .php AddType application/x-http-php-source .phps LoadModule php4_module libexec/libphp4.so Any thoughts? thank you. -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Best way to sort?
I'm not sure if this is a complex SQL query or a PHP array sorting thing, but what's the best way to take this data: Tom Greg Brian Tom Brian Tom And return the following results, sorted by number of records: Tom - 3 Brian - 2 Greg - 1 Any thoughts? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best way to sort?
Brian Dunning wrote: I'm not sure if this is a complex SQL query or a PHP array sorting thing, but what's the best way to take this data: Tom Greg Brian Tom Brian Tom And return the following results, sorted by number of records: Tom - 3 Brian - 2 Greg - 1 Any thoughts? MySQL's DISTINCT, in conjuction with COUNT -- 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] Best way to sort?
select thename, count(thename) from tablename order by thename asc group by thename Try this -Original Message- From: Brian Dunning [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP] Best way to sort? I'm not sure if this is a complex SQL query or a PHP array sorting thing, but what's the best way to take this data: Tom Greg Brian Tom Brian Tom And return the following results, sorted by number of records: Tom - 3 Brian - 2 Greg - 1 Any thoughts? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Disclaimer This e-mail transmission contains confidential information, which is the property of the sender. The information in this e-mail or attachments thereto is intended for the attention and use only of the addressee. Should you have received this e-mail in error, please delete and destroy it and any attachments thereto immediately. Under no circumstances will the Cape Technikon or the sender of this e-mail be liable to any party for any direct, indirect, special or other consequential damages for any use of this e-mail. For the detailed e-mail disclaimer please refer to http://www.ctech.ac.za/polic or call +27 (0)21 460 3911 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
I removed the line AddType application/x-httpd-php .php and add Files *.php SetOutputFilter PHP SetInputFilter PHP /Files restarted httpd and didn't work - what displayed on the browser was: ?php phpinfo(); ? -Original Message- From: R'twick Niceorgaw [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 4:51 PM Cc: [EMAIL PROTECTED] Subject: RE: [PHP] php installation verification Quoting Nguyen, Long P (Mission Systems) [EMAIL PROTECTED]: could it be something in my httpd.conf file? Remove the line AddType application/x-httpd-php .php and add Files *.php SetOutputFilter PHP SetInputFilter PHP /Files HTH R'twick -- This is a signature This message was sent using IMP, the Internet Messaging Program. -- 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: IMPORTANT MASSAGE FROM THE BANK
wonders if this is the exact same scam that cost millions of dollars in Canada last year as I do not see a LEGIT bank URL or email address besides what is this BS doing here??? this a PHP MAIL LIST!!! Not a scam list!!! Davies Harries [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] FROM:Mr DAVIES HARRIES bills and exchange director GUARANTY TRUST BANK PLC Email:[EMAIL PROTECTED] Fax No:14134519233 Dear Sir, I am Mr.Davies Harries the bills and exchange director at the GUARANTY TRUST BANK PLC, I am writing this letter to solicit for support and assistance from you to carry out this business opportunity in my department. Lying in an inactive account is the sum of us$34.7million belonging to a foreign customer(mr James Kelly) who happens to be deceased. he died with his wife and two children in a plane crash on board an ADC airline flight at the Egirin river Lagos Nigeria in november 1997. Ever since he died the bank has been expecting his next of kin to come and claim these fund. To this effect, we can not release the money unless someone applies for it as next of kin, as indicated in our banking guideline. Unfortunately he has no family member in Nigeria or Over-sea who are aware of the existence of the money(as he was a contractor with the federal Republic of Nigeria). At this juncture i have decided to do business with you.To this effect I solicit your assistance in applying as the next of kin then the money will be released to you. As I do not want this money to go into the bank treasury as an unclaimed bill. The banking law and guideline stipulates that if such money(s) remains unclaimed for a period of up to 8 years(8yrs)the money will be transferred into the banks treasury as an unclaimed bill.My request for a foreigner as next of kin is occasioned by the fact that the customer was a foreigner and a Nigerian cannot stand as next of kin. Sir, 20% of the money will be your share as a foreign partner and your assistance to actualise this business,5% for any expenses incured. Thereafter i will visit your country with your help once the money hits your account for disbursement according to the percentage indicated. To effect the immediate transfer of the fund to you as agreed,you must apply first to the bank as the next of kin to the deceased,then we will follow up all formalities for the transaction. Upon receipt of your reply, i will send to you by fax or email the text of the application you are to send to the bank, as soon as you receive the text i will further clarify you in other issues as to affect the business. Awaiting to hear from you. Best Regards Davies Harries REPLY ME ON MY PERSONAL EMAIL:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php installation verification
Please reply to the list so that everyone can benefit from the conversation. I am running Apache 2.0.49 and PHP 4.3.7, but that shouldn't make too much difference. Did you check to make sure that libphp4.so is, in fact, in your modules directory? Also, use the AddType statements instead of the SetOutputFilter and SetInputFilter statements. Just make sure that you're using the AddType statements /after/ you load the module with LoadModule. I do not believe they should come before the LoadModule statement in the httpd.conf file. Here's how it looks in my file: LoadModule php4_module modules/libphp4.so AddType application/x-httpd-php php AddType application/x-httpd-php-source phps Nguyen, Long P (Mission Systems) wrote: Ben, I edited the httpd.conf file with the entry below and restarted the httpd and tried bringing up test.php and the only think displayed on the browser were the source code. LoadModule php4_module modules/libphp4.so Do you have apache v2.0.48 running with php v4.3.6? Any thoughts? -Original Message- From: Ben Ramsey [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 9:31 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] php installation verification Did you fix this problem yet? The lines below are fine for your apache httpd.conf file. The only thing that appears out of the ordinary is the location of libphp4.so. In my setup (I'm also using Red Hat and Apache 2.0), when I compile PHP, it places libphp4.so in the modules directory (/etc/httpd/modules), which is where I would think it should be on your system, so try changing that line to: LoadModule php4_module modules/libphp4.so Of course, check to make sure the file is in that location first, as I could be way off. Then, restart apache and try to access your test.php script. Long P Nguyen wrote: OK - I tried that and what came up on the browser was the content of the test.php file. I checked in my httpd.conf file I do have the following: AddType application/x-httpd-php .php AddType application/x-http-php-source .phps LoadModule php4_module libexec/libphp4.so Any thoughts? thank you. -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php installation verification
I also noticed that you're using .php and .phps in your AddType statement. Take out the dot (.) so that it's just php and phps. That may be the cause of the problem. Ben Ramsey wrote: Please reply to the list so that everyone can benefit from the conversation. I am running Apache 2.0.49 and PHP 4.3.7, but that shouldn't make too much difference. Did you check to make sure that libphp4.so is, in fact, in your modules directory? Also, use the AddType statements instead of the SetOutputFilter and SetInputFilter statements. Just make sure that you're using the AddType statements /after/ you load the module with LoadModule. I do not believe they should come before the LoadModule statement in the httpd.conf file. Here's how it looks in my file: LoadModule php4_module modules/libphp4.so AddType application/x-httpd-php php AddType application/x-httpd-php-source phps Nguyen, Long P (Mission Systems) wrote: Ben, I edited the httpd.conf file with the entry below and restarted the httpd and tried bringing up test.php and the only think displayed on the browser were the source code. LoadModule php4_module modules/libphp4.so Do you have apache v2.0.48 running with php v4.3.6? Any thoughts? -Original Message- From: Ben Ramsey [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 9:31 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] php installation verification Did you fix this problem yet? The lines below are fine for your apache httpd.conf file. The only thing that appears out of the ordinary is the location of libphp4.so. In my setup (I'm also using Red Hat and Apache 2.0), when I compile PHP, it places libphp4.so in the modules directory (/etc/httpd/modules), which is where I would think it should be on your system, so try changing that line to: LoadModule php4_module modules/libphp4.so Of course, check to make sure the file is in that location first, as I could be way off. Then, restart apache and try to access your test.php script. Long P Nguyen wrote: OK - I tried that and what came up on the browser was the content of the test.php file. I checked in my httpd.conf file I do have the following: AddType application/x-httpd-php .php AddType application/x-http-php-source .phps LoadModule php4_module libexec/libphp4.so Any thoughts? thank you. -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] weird error
Hi guys, I recently installed easy-php on my laptop so i could work on the go without having to upload my scripts to the server to test them out. The problem is that when i tried one of my scripts on it, i get some weird errors, and the script works fine on the online server. Here are some example errors: Notice: Use of undefined constant REMOTE_ADDR - assumed 'REMOTE_ADDR' in c:\win2kapp\easyphp1-7\www\index.php on line 35 Notice: Undefined variable: HTTP_REFERER in . I have register globals on. (was off so i turned them on thinking that might be the problem..didnt work either way) Big thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best way to sort?
Angelo Zanetti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] select thename, count(thename) from tablename order by thename asc group by thename or... to sort by number of records select name, count(name) as ncnt from table group by name order by ncnt desc -- Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $_FILES passed by value
If I pass a $_FILES to an object by value. Does it create a copy of the actual posted files as well? In other words if I post a 2MB file to save.php and in turn pass $_FILES to an object $file-fileis($_FILES); Does that create 4MB of data in memory? Thanks Danny __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] weird error
Better if you use $_SERVER['REMOTE_ADDR'] and so on... pagongski wrote: Hi guys, I recently installed easy-php on my laptop so i could work on the go without having to upload my scripts to the server to test them out. The problem is that when i tried one of my scripts on it, i get some weird errors, and the script works fine on the online server. Here are some example errors: Notice: Use of undefined constant REMOTE_ADDR - assumed 'REMOTE_ADDR' in c:\win2kapp\easyphp1-7\www\index.php on line 35 Notice: Undefined variable: HTTP_REFERER in . I have register globals on. (was off so i turned them on thinking that might be the problem..didnt work either way) Big thanks. -- Miguel J. Jiménez ISOTROL, S.A. (Área de Internet) Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA) mjjimenez AT isotrol DOT com --- http://www.isotrol.com ICQ# 12670750 TLFNO. 955036800 ext. 111 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: weird error
Pardon me for asking, but what is easy-php? Pagongski wrote: Hi guys, I recently installed easy-php on my laptop so i could work on the go without having to upload my scripts to the server to test them out. The problem is that when i tried one of my scripts on it, i get some weird errors, and the script works fine on the online server. Here are some example errors: Notice: Use of undefined constant REMOTE_ADDR - assumed 'REMOTE_ADDR' in c:\win2kapp\easyphp1-7\www\index.php on line 35 Notice: Undefined variable: HTTP_REFERER in . I have register globals on. (was off so i turned them on thinking that might be the problem..didnt work either way) Big thanks. -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
I think I know what I did wrong... I should place the test.php file under the Document_Root directory and I should be bringing up the test.php file on the browser address as: http://localhost/test.php right??? What I was doing before was just going to the browser's File -- Open -- and specified the path to /tmp/php/test.php Please let me know, thank you. -Original Message- From: Ben Ramsey [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 10:46 AM To: Nguyen, Long P (Mission Systems) Subject: Re: [PHP] php installation verification I also noticed that you're using .php and .phps in your AddType statement. Take out the dot (.) so that it's just php and phps. That may be the cause of the problem. Ben Ramsey wrote: Please reply to the list so that everyone can benefit from the conversation. I am running Apache 2.0.49 and PHP 4.3.7, but that shouldn't make too much difference. Did you check to make sure that libphp4.so is, in fact, in your modules directory? Also, use the AddType statements instead of the SetOutputFilter and SetInputFilter statements. Just make sure that you're using the AddType statements /after/ you load the module with LoadModule. I do not believe they should come before the LoadModule statement in the httpd.conf file. Here's how it looks in my file: LoadModule php4_module modules/libphp4.so AddType application/x-httpd-php php AddType application/x-httpd-php-source phps Nguyen, Long P (Mission Systems) wrote: Ben, I edited the httpd.conf file with the entry below and restarted the httpd and tried bringing up test.php and the only think displayed on the browser were the source code. LoadModule php4_module modules/libphp4.so Do you have apache v2.0.48 running with php v4.3.6? Any thoughts? -Original Message- From: Ben Ramsey [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 9:31 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] php installation verification Did you fix this problem yet? The lines below are fine for your apache httpd.conf file. The only thing that appears out of the ordinary is the location of libphp4.so. In my setup (I'm also using Red Hat and Apache 2.0), when I compile PHP, it places libphp4.so in the modules directory (/etc/httpd/modules), which is where I would think it should be on your system, so try changing that line to: LoadModule php4_module modules/libphp4.so Of course, check to make sure the file is in that location first, as I could be way off. Then, restart apache and try to access your test.php script. Long P Nguyen wrote: OK - I tried that and what came up on the browser was the content of the test.php file. I checked in my httpd.conf file I do have the following: AddType application/x-httpd-php .php AddType application/x-http-php-source .phps LoadModule php4_module libexec/libphp4.so Any thoughts? thank you. -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: weird error
Pardon me for asking, but what is easy-php? Easy-php is a simple solution to install apache+php+mysql+phpmyadmin, all in a nice simple to admin package. Its great to test locally your scripts and DB access. Sorry, i sound like a salesman, i am in no ways affilliated to it, just a happy user. :-) You can take a look at: http://www.easyphp.org/ Pagongski -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: weird error
Pagongski [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] snipped / Here are some example errors: Notice: Use of undefined constant REMOTE_ADDR - assumed 'REMOTE_ADDR' in c:\win2kapp\easyphp1-7\www\index.php on line 35 These aren't exactly 'errors.' If this is all your seeing, your scripts should be completing. If not, you have some other problems. What is happening here is just a 'notice' that you didn't put quotation marks around a string. Try adding or ' around those strings ('REMOTE_ADDR', etc.) and these warnings should disappear. You can alternatively adjust your error reporting settings in php.ini to not display notices, but it's better to just fix the code. -- Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php installation verification
Yes, you should be accessing it through http://localhost/test.php That's most definitely the cause of the problem. Long P Nguyen wrote: I think I know what I did wrong... I should place the test.php file under the Document_Root directory and I should be bringing up the test.php file on the browser address as: http://localhost/test.php right??? What I was doing before was just going to the browser's File -- Open -- and specified the path to /tmp/php/test.php Please let me know, thank you. -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: $_FILES passed by value
Daniel Guerrier [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If I pass a $_FILES to an object by value. Does it create a copy of the actual posted files as well? In other words if I post a 2MB file to save.php and in turn pass $_FILES to an object $file-fileis($_FILES); Does that create 4MB of data in memory? $_FILES is a super global. You really shouldn't have to pass it anywhere... It doesn't contain the actual file, just information about the file. IE. size name tmp_name type So if you do make a copy if it, you aren't copying the actual file that was uploaded, just an array of information. -- Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
OK - thanks for all the help everyone!! -Original Message- From: Ben Ramsey [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 11:02 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] php installation verification Yes, you should be accessing it through http://localhost/test.php That's most definitely the cause of the problem. Long P Nguyen wrote: I think I know what I did wrong... I should place the test.php file under the Document_Root directory and I should be bringing up the test.php file on the browser address as: http://localhost/test.php right??? What I was doing before was just going to the browser's File -- Open -- and specified the path to /tmp/php/test.php Please let me know, thank you. -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- 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] FW: Your Request
Is anyone else getting this email whenever you send an email to the [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] list? I get this whenever I send a post. -Original Message- From: Information Desk [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 11:09 AM To: Nguyen, Long P (Mission Systems) Subject: Your Request Thanks for contacting Astral Security and Finance BV. Your request is being processed, we will get back to you shortly. Information Desk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $_FILES passed by value
From: Daniel Guerrier [EMAIL PROTECTED] If I pass a $_FILES to an object by value. Does it create a copy of the actual posted files as well? In other words if I post a 2MB file to save.php and in turn pass $_FILES to an object $file-fileis($_FILES); Does that create 4MB of data in memory? No. The actual file data is not in the $_FILES array. There is just an element that contains the name of the temporary file, but not the actual data. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] weird error
From: pagongski [EMAIL PROTECTED] Notice: Use of undefined constant REMOTE_ADDR - assumed 'REMOTE_ADDR' in c:\win2kapp\easyphp1-7\www\index.php on line 35 Notice: Undefined variable: HTTP_REFERER in . I have register globals on. (was off so i turned them on thinking that might be the problem..didnt work either way) The second error shows you did not turn on register globals. Look at a phpinfo() page to confirm you edited the right php.ini. You must restart your webserver after the change, also. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: $_FILES passed by value
Rob Adams wrote: Daniel Guerrier [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If I pass a $_FILES to an object by value. Does it create a copy of the actual posted files as well? In other words if I post a 2MB file to save.php and in turn pass $_FILES to an object $file-fileis($_FILES); Does that create 4MB of data in memory? $_FILES is a super global. You really shouldn't have to pass it anywhere... It doesn't contain the actual file, just information about the file. IE. size name tmp_name type So if you do make a copy if it, you aren't copying the actual file that was uploaded, just an array of information. -- Rob And the uploaded file is not kept in memory but in temporary file: $_FILES['uploadedfile']['tmp_name'] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] weird error
John W. Holmes wrote: From: pagongski [EMAIL PROTECTED] Notice: Use of undefined constant REMOTE_ADDR - assumed 'REMOTE_ADDR' in c:\win2kapp\easyphp1-7\www\index.php on line 35 Notice: Undefined variable: HTTP_REFERER in . I have register globals on. (was off so i turned them on thinking that might be the problem..didnt work either way) The second error shows you did not turn on register globals. Look at a phpinfo() page to confirm you edited the right php.ini. You must restart your webserver after the change, also. ---John Holmes... Or he typed the url into the location bar, or selected a bookmark, or... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] When did mysql_query quit allowing multiple queries separated by a semicolon
Hi PHP gurus, Asked this question on the PHP-DB list, no response there. Hoping someone here may have the answer. :) Mostly a research question. I recall (a long time ago - php3?) that some php packages could be compromised by injecting a secondary query though GET/POST variables when they were not properly sanitized. ex: $query=select a from $b; mysql_query($query); Inject $b=tablename; insert into a set col='c' Even the current PHP manual includes a fairly recent comment warning of such attacks, though the manual clearly states that only one query can be issued and a semicolon should not be included. My testing confirms that the second query isn't executed. Some web research leads me to believe this was changed, though I cannot find when. I'm pretty certain it was there at one point, since I found a vulnerability like this in an application I was auditing for security. Anyone recall or know if this change occurred in a specific PHP version? Is it reasonable to assume it will not be added back in? Thanks, James Harrell http://www.copernicusllc.com http://celestia.cbstech.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] weird error
On 03 June 2004 15:52, pagongski wrote: Hi guys, I recently installed easy-php on my laptop so i could work on the go without having to upload my scripts to the server to test them out. The problem is that when i tried one of my scripts on it, i get some weird errors, and the script works fine on the online server. Here are some example errors: Notice: Use of undefined constant REMOTE_ADDR - assumed 'REMOTE_ADDR' in c:\win2kapp\easyphp1-7\www\index.php on line 35 Notice: Undefined variable: HTTP_REFERER in . I have register globals on. (was off so i turned them on thinking that might be the problem..didnt work either way) These Notices will not prevent your script running to completion -- they merely point out places where your code can potentially be improved. Looks like error_reporting on your laptop is turned all the way up to E_ALL, whereas on on the server E_NOTICE level messages are excluded. This is actually a *good* configuration -- on your test server, you get to see all the nitty-gritty warnings about the minor errors that PHP will ignore or automatically correct for you, whilst on your live service they are suppressed. You can then decide, on a fully-informed basis, whether you want to adjust your code to be comletely notice-free, or whether you're prepared to leave them as is and let PHP take care of them. 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] Best way to sort?
SELECT DISTINCT person_name, count(*) FROM table_name GROUP BY person_name ORDER BY 2 DESC I'm not sure if this is a complex SQL query or a PHP array sorting thing, but what's the best way to take this data: Tom Greg Brian Tom Brian Tom And return the following results, sorted by number of records: Tom - 3 Brian - 2 Greg - 1 Any thoughts? -- 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] weird error
From: Marek Kilimajer [EMAIL PROTECTED] The second error shows you did not turn on register globals. Look at a phpinfo() page to confirm you edited the right php.ini. You must restart your webserver after the change, also. Or he typed the url into the location bar, or selected a bookmark, or... True... That's what I get for ASSuming things. :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] FW: Variables within Variables
I've had no luck on the smarty list. does anyone else know? _ From: Nunners [mailto:[EMAIL PROTECTED] Sent: 03 June 2004 16:22 To: '[EMAIL PROTECTED]' Subject: Variables within Variables (Sorry for the naff subject - that's the only way I could describe it.!) I'm trying to setup an application that uses various things, including Smarty, PEAR:DB and anything else I think I can fit in I've got to a point where I want to dynamically create a menu item, with two layers of information. The first is establishing the url of the link, which might be in the form of: /travel.php?id=$agent_idpassword=$password Then, using a saved cookie (a reference to call customer details), also pass $agent_id and $password according to the customer's details (i.e. the cookie). Is that easily possible? As further reference/guide, the url is saved as a variable within the Smarty setup, and then appears in the template accordingly.
Re: [PHP] When did mysql_query quit allowing multiple queries separated by a semicolon
From: James Harrell [EMAIL PROTECTED] Mostly a research question. I recall (a long time ago - php3?) that some php packages could be compromised by injecting a secondary query though GET/POST variables when they were not properly sanitized. ex: $query=select a from $b; mysql_query($query); Inject $b=tablename; insert into a set col='c' Even the current PHP manual includes a fairly recent comment warning of such attacks, though the manual clearly states that only one query can be issued and a semicolon should not be included. My testing confirms that the second query isn't executed. Some web research leads me to believe this was changed, though I cannot find when. I'm pretty certain it was there at one point, since I found a vulnerability like this in an application I was auditing for security. Anyone recall or know if this change occurred in a specific PHP version? Is it reasonable to assume it will not be added back in? This is more than likely a limitation of the underlying MySQL C API, more than PHP. mysql_query() in the C API only accepts a single query for versions from 3.20.0 (or least I couldn't find a note in the mysql changelog that referenced this and it goes back to vesion 3.20.0). MySQL 4.1+ actually allows more than one query and the mysqli extension for PHP provides implementation to handle more than one query per mysql_query() call. So, it's reasonable to assume that this feature will actually be added back in. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OT (Re: IMPORTANT MASSAGE FROM THE BANK)
On Thu, Jun 03, 2004 at 11:14:29AM -0300, Stephen Lake wrote: wonders if this is the exact same scam that cost millions of dollars in Canada last year as I do not see a LEGIT bank URL or email address besides what is this BS doing here??? this a PHP MAIL LIST!!! Not a scam list!!! http://419eater.com/ This is way off topic, but still interesting... -Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best way to sort?
The best way is: SELECT person_name, count(*) FROM table_name GROUP BY person_name ORDER BY 2 DESC - Original Message - From: Daniel Clark [EMAIL PROTECTED] To: Brian Dunning [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, June 03, 2004 10:30 AM Subject: Re: [PHP] Best way to sort? SELECT DISTINCT person_name, count(*) FROM table_name GROUP BY person_name ORDER BY 2 DESC I'm not sure if this is a complex SQL query or a PHP array sorting thing, but what's the best way to take this data: Tom Greg Brian Tom Brian Tom And return the following results, sorted by number of records: Tom - 3 Brian - 2 Greg - 1 Any thoughts? -- 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] When did mysql_query quit allowing multiple queries separated by a semicolon
James Harrell wrote: Hi PHP gurus, Asked this question on the PHP-DB list, no response there. Hoping someone here may have the answer. :) Mostly a research question. I recall (a long time ago - php3?) that some php packages could be compromised by injecting a secondary query though GET/POST variables when they were not properly sanitized. ex: $query=select a from $b; mysql_query($query); Inject $b=tablename; insert into a set col='c' Even the current PHP manual includes a fairly recent comment warning of such attacks, though the manual clearly states that only one query can be issued and a semicolon should not be included. My testing confirms that the second query isn't executed. Some web research leads me to believe this was changed, though I cannot find when. I'm pretty certain it was there at one point, since I found a vulnerability like this in an application I was auditing for security. Anyone recall or know if this change occurred in a specific PHP version? Is it reasonable to assume it will not be added back in? Variables passed to sql query should be always sanitazed, there are also other ways of attack. Search for advanced sql injection. In the case above you can use: $allowed_tables = array('table1', 'table2', 'table3'); if(!in_array($b, $allowed_tables)) die('sql attack'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Asuming query without the ?
Is it possible to configure PHP/.htAccess/etc. for assuming a query when the users enters a path like this: www.myserver.com/path/154-- assumes www.myserver.com/path/index.php?code=154 The only thing I could do is avoid writing index.php but I still have to write the ?: www.myserver.com/path/?154 Any idea? Thanks. Gus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Asuming query without the ?
Robert Winter wrote: Is it possible to configure PHP/.htAccess/etc. for assuming a query when the users enters a path like this: www.myserver.com/path/154-- assumes www.myserver.com/path/index.php?code=154 The only thing I could do is avoid writing index.php but I still have to write the ?: www.myserver.com/path/?154 Any idea? Thanks. Gus mod_rewrite -- 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] Fatal Error Help
Can someone verify that the solution to this problem is to change my php.ini file's memory_limit = 8M; line to memory_limit = 16M;? My script was working fine (file uploading) before. Then, last night I upgraded to php 4.3.6 and installed Turck mmcache. Now I get the following error: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 6400 bytes) in /home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/sitesetup.php on line 31 Line 31: $imageToResize = imagecreatefromjpeg($img_source); // get the image pointer to the original image
Re: [PHP] Fatal Error Help
Ryan Schefke wrote: Can someone verify that the solution to this problem is to change my php.ini file's memory_limit = 8M; line to memory_limit = 16M;? What about verifying it yourself? Yes, that should help. If not, try higher values. Don't forget to restart the webserver. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Asuming query without the ?
Robert Winter wrote: Is it possible to configure PHP/.htAccess/etc. for assuming a query when the users enters a path like this: www.myserver.com/path/154-- assumes www.myserver.com/path/index.php?code=154 The only thing I could do is avoid writing index.php but I still have to write the ?: www.myserver.com/path/?154 Any idea? Thanks. Gus RewriteRule ^/path/([0-9]+)$/path/index.php?code=$1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Fatal Error Help
I will try it but I wanted to make sure that was the best way to solve the issue. Why would the same script work before (with memory_limit = 8MB) and now it has that error? That's where I'm confused. -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 12:48 PM To: Ryan Schefke Cc: Php-General-Help Subject: Re: [PHP] Fatal Error Help Ryan Schefke wrote: Can someone verify that the solution to this problem is to change my php.ini file's memory_limit = 8M; line to memory_limit = 16M;? What about verifying it yourself? Yes, that should help. If not, try higher values. Don't forget to restart the webserver. -- 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] Fatal Error Help
Ryan Schefke wrote: I will try it but I wanted to make sure that was the best way to solve the issue. Why would the same script work before (with memory_limit = 8MB) and now it has that error? That's where I'm confused. depends on the data you are working with. What about verifying it yourself? Yes, that should help. If not, try higher values. Don't forget to restart the webserver. -- 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
[PHP] Re: PHP and HVCI
Hi, google for 'php pear hbci'. You'll find some useful sites. Regards, Torsten Roehr Arndt Touby [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, does anybody have an idea how to implement HBCI-functionality to a PHP-Site? greetings Arndt Touby -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sophisticated rss builder class
Hello, On 06/03/2004 06:28 AM, Electroteque wrote: Hi there, I am wanting to know if there is any good rss builder classes, that is similar to what the PEAR XML_Tree class can do. Sadly there is no pear rss builder out there, and the ones on PHP classes are dodgy. Please let me know thanks. Did you try this? What do you mean by dodgy? http://www.phpclasses.org/rsswriter -- 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] Call JS Function with PHP Header()?
Hi everyone, I am trying to work within someone elses modular system so my flexibility is rather limited. I'm trying to do this: header(Location: javascript:this.print()); Which of course does not work. Anyone know how I might do it? Many thanks... -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Call JS Function with PHP Header()?
Nick Wilson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi everyone, I am trying to work within someone elses modular system so my flexibility is rather limited. I'm trying to do this: header(Location: javascript:this.print()); Which of course does not work. Anyone know how I might do it? Many thanks... -- Nick W Hi Nick, try this: echo script language=\JavaScript\ !-- this.print(); //-- /script; You have to put it into a valid HTML page. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Call JS Function with PHP Header()?
Nick Wilson wrote: Hi everyone, I am trying to work within someone elses modular system so my flexibility is rather limited. I'm trying to do this: header(Location: javascript:this.print()); Which of course does not work. Anyone know how I might do it? Many thanks... You can't call JS functions from PHP. Server side vs. Client side thing. You could header ( Location: mypage.html ); -\ mypage.html \- head title/title script language=JavaScript function print() { code... code... window.close(); } /script head body onLoad=JavaScript:print() /body /html -- 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: Call JS Function with PHP Header()?
* and then Torsten Roehr declared header(Location: javascript:this.print()); Which of course does not work. Anyone know how I might do it? try this: echo script language=\JavaScript\ !-- this.print(); //-- /script; Thanks Torsten, I have managed to do that, but it's in the body like this: !-- script type=text/javascript this.print(); /script //-- Right in the middle of the body. It doesnt work LoL! - Seems to me that it should do...? -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Call JS Function with PHP Header()?
* and then Nick Wilson declared !-- script type=text/javascript this.print(); /script //-- Right in the middle of the body. It doesnt work LoL! - Seems to me that it should do...? Ah... XHTML Strict - Gotta remove the comment tags ;-) Thanks mate.. -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imploding a multi-dimensional array
Hi, I want to implode a multi-dimensional array into 1 string. I use the next code to put it into the array: $spots = Array(); $rows = explode( @, $row['spots'] ); foreach( $rows as $rij ) { $spots[] = explode( , $rij ); } ( After the implode, you should get a string that looks like this: 12[EMAIL PROTECTED]0[EMAIL PROTECTED]21 ) I'm having trouble with imploding them, can somebody help please? Grtz, RC [EMAIL PROTECTED]/ http://www.wuyts.org/tom/phpbb2/
Re: [PHP] Re: Call JS Function with PHP Header()?
You should be able to use the comment tags, just put them inside the script tags: echo script language=\javascript\ type=\text/javascript\ !-- this.print() //-- /script; I don't believe you need a semi-colon after this.print within the javascript script. [Original Message] From: Nick Wilson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: 06/03/2004 11:02:57 AM Subject: Re: [PHP] Re: Call JS Function with PHP Header()? * and then Nick Wilson declared !-- script type=text/javascript this.print(); /script //-- Right in the middle of the body. It doesnt work LoL! - Seems to me that it should do...? Ah... XHTML Strict - Gotta remove the comment tags ;-) Thanks mate.. -- Nick W -- 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] Re: Call JS Function with PHP Header()?
* and then Dennis Seavers declared You should be able to use the comment tags, just put them inside the script tags: echo script language=\javascript\ type=\text/javascript\ !-- this.print() //-- /script; I don't believe you need a semi-colon after this.print within the javascript script. Cool, thanks Dennis that's great ;-) -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imploding a multi-dimensional array
From: Tom Wuyts [EMAIL PROTECTED] I want to implode a multi-dimensional array into 1 string. Any reason you need to implode() instead of serialize() the array? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CAUTION FRAUD: IMPORTANT MASSAGE FROM THE BANK
Some time ago, I was working for a governement departament, and I asked about this kind of messages. The answer was clear and explicit: This kind of message are a FRAUD (I don't now how they do the fraud) and are investigated and are INVESTIGATED and PERSECUTED by the Spanish Police in collaboration with INTERPOL. So, the advice of the police here is to NOT believe any line of it and redirect the message to the nearest police department in your country. Davies Harries wrote: FROM:Mr DAVIES HARRIES bills and exchange director GUARANTY TRUST BANK PLC Email:[EMAIL PROTECTED] Fax No:14134519233 [Rest of message deleted] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php as user apache
I have a problem regarding using my php scripts to write files to my account. We know that php runs as user apache. Now giving write permissions to apache for uploading files to my account essentially means that I have to give write permissions for apache (i.e. o+w). Now, does that not mean that any user which is can run php scripts can have access to my account? Is there any configuration setting that I'm missing. Nirnimesh. IIIT-Hyd. India. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php as user apache
From: Nirnimesh [EMAIL PROTECTED] I have a problem regarding using my php scripts to write files to my account. We know that php runs as user apache. Now giving write permissions to apache for uploading files to my account essentially means that I have to give write permissions for apache (i.e. o+w). Now, does that not mean that any user which is can run php scripts can have access to my account? Yes (well, has access to that directory). Is there any configuration setting that I'm missing. Safe mode, open_basedir, etc. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php as user apache
John W. Holmes wrote: From: Nirnimesh [EMAIL PROTECTED] I have a problem regarding using my php scripts to write files to my account. We know that php runs as user apache. Now giving write permissions to apache for uploading files to my account essentially means that I have to give write permissions for apache (i.e. o+w). Now, does that not mean that any user which is can run php scripts can have access to my account? Yes (well, has access to that directory). Is there any configuration setting that I'm missing. Safe mode, open_basedir, etc. Is there a way to cause PHP scripts to run as the user and group associated with the apache virtual host? cheers, Travis -- 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
Re: [PHP] php as user apache
From: Travis Low [EMAIL PROTECTED] John W. Holmes wrote: From: Nirnimesh [EMAIL PROTECTED] I have a problem regarding using my php scripts to write files to my account. We know that php runs as user apache. Now giving write permissions to apache for uploading files to my account essentially means that I have to give write permissions for apache (i.e. o+w). Now, does that not mean that any user which is can run php scripts can have access to my account? Yes (well, has access to that directory). Is there any configuration setting that I'm missing. Safe mode, open_basedir, etc. Is there a way to cause PHP scripts to run as the user and group associated with the apache virtual host? If you use PHP as a CGI, you can do this. I believe I've also heard that Apache2 has ways of doing this also (with PHP as a module), but I don't know the details. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] image resize looks horrible..
I am using the below function which does seem to resize the image yet the colors in the resized image look horrible. How can I resize the image yet keep the colors in tact? Thanks, Eddie Justin-I tried your code but it didn't seem to do anything...I will just use this function if the color will work. function createthumb($name,$filename,$new_w,$new_h){ global $gd2; $system=explode(.,$name); $src_img=imagecreatefromjpeg($name); $old_x=imageSX($src_img); $old_y=imageSY($src_img); if ($old_x $old_y) { $thumb_w=$new_w; $thumb_h=$old_y*($new_h/$old_x); } if ($old_x $old_y) { $thumb_w=$old_x*($new_w/$old_y); $thumb_h=$new_h; } if ($old_x == $old_y) { $thumb_w=$new_w; $thumb_h=$new_h; } if ($gd2==){ $dst_img=ImageCreate($thumb_w,$thumb_h); imagecopyresized($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y); }else{ $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h); imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y ); } if (preg_match(/png/,$system[1])){ imagepng($dst_img,$filename); } else { imagejpeg($dst_img,$filename); } imagedestroy($dst_img); imagedestroy($src_img); } 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] PHP Debugger 4 Linux?
Hi everyone, Can anyone recommend a good debugger for *nix? Many thx! -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cron Job in vDeck
Hey guys. I was wondering if anyone knows how to go about creating a cron job using vDeck (that's what is installed on the server) that just accesses a PHP file and runs everything in the PHP file. Does anyone know how to go about doing something like this? Thanks, Matt http://sweetphp.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Asuming query without the ?
Where and how do I set this? I'm to Unix and PHP. Marek Kilimajer [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Robert Winter wrote: Is it possible to configure PHP/.htAccess/etc. for assuming a query when the users enters a path like this: www.myserver.com/path/154-- assumes www.myserver.com/path/index.php?code=154 The only thing I could do is avoid writing index.php but I still have to write the ?: www.myserver.com/path/?154 Any idea? Thanks. Gus RewriteRule ^/path/([0-9]+)$/path/index.php?code=$1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Asuming query without the ?
Where and how do I set this? I'm to Unix and PHP. John Nichel [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Robert Winter wrote: Is it possible to configure PHP/.htAccess/etc. for assuming a query when the users enters a path like this: www.myserver.com/path/154-- assumes www.myserver.com/path/index.php?code=154 The only thing I could do is avoid writing index.php but I still have to write the ?: www.myserver.com/path/?154 Any idea? Thanks. Gus mod_rewrite -- 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] Asuming query without the ?
I think it's in the Apache config file. Where and how do I set this? I'm to Unix and PHP. Marek Kilimajer [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Robert Winter wrote: Is it possible to configure PHP/.htAccess/etc. for assuming a query when the users enters a path like this: www.myserver.com/path/154-- assumes www.myserver.com/path/index.php?code=154 The only thing I could do is avoid writing index.php but I still have to write the ?: www.myserver.com/path/?154 Any idea? Thanks. Gus RewriteRule ^/path/([0-9]+)$/path/index.php?code=$1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help needed with tiger tree hashes
I am trying to generate tiger tree hashes the same way as directconnect does, but I am failing. I checked the output from php with the reference vectors from http://www.cs.technion.ac.il/~biham...ssie-format.dat and they appear to be different! echo bin2hex(mhash(MHASH_TIGER, 'abc')).br/\n; outputs f258c1e88414ab2a527ab541ffc5b8bf935f7b951c132951 instead of 2AAB1484E8C158F2BFB8C5FF41B57A525129131C957B5F93 and, for example, echo bin2hex(mhash(MHASH_TIGER, 'message digest')).br/\n; outputs 951a2078cbf881d91c441e754830cf0df6295aa51aca7f51 instead of D981F8CB78201A950DCF3048751E441C517FCA1AA55A29F6 What am I doing wrong here? begin 666 frown.gif M1TE.#EA#P`/`-4_`/_XH-++?L[(?-7/@-_8AO_WF__[SO_XI__YL=W6A/_\ MW/_ZO?_WG?_XJ_KREO_[TO_YL/_\U?WUF.[GC__XHO_[Q\K#?_[RO'JD.] M=?!=^;?BO_ZP/_WF?_XI?_[R=S5A/[VF/_[T?_\W?_[R__ZO/_XJO;NE/_\ MV*\=?CPEKCC/_\V/_YK__YMO%OGQE?_[QO_ZO__XH__YM.CAB^':A]3- [EMAIL PROTECTED]/B,[= ```*2DI'Y! $``#\`+ `/``\```:3 MP)]0ZL6A\A?4%Z7#A'I$\Q\D4,,1_DX!OZ6BKH2*C^1B.KO+A$Y%P.U# MX,[EMAIL PROTECTED]LU-D4+R5%``P%11L)`T4(T-% 4=$BK0$O11XS% `% M$CHP$P0!BE%(0XJ)T9%`AD]/73*SX\! #%CZT:CX;!#DW`A:SM+5`P(: .RLIJ7K_044E*L$E!`#L` ` end begin 666 confused.gif M1TE.#EA#P`6`-4_`,.]=?GQE?#HD/_XH=++?O_WF_'JD;?BL[(?.KCC,?! M=__XJ__[Q__[RO_\W-7.@/_YL?_YL-W6A/_[TOKREO_WG=_8AO_\U?WUF/_\ MV?_YM?_XHO_[SO_ZO?_ZN__XI^[GC__XI?3MD_;ND__ZP/_[QLK#GBC/[V MF/_\V/_[RO%O_ZO/_YM/_XJO_XH__YK][7A?_\T__\U^':A__ZPO_ZO__W MF?_\W?_XJ/STE_;NE/_\V\[= ```*2DI'Y! $``#\`+ `/`!8```:E MP-_/)Q02B\A4GDD)I?(O1)E5JOTBH2R\7ZOE_NUY:-$CAK /'[EMAIL PROTECTED] MZ9ME,FZK96K4)H3,E\U'AI?% 9.# TJ7Q$NSX)S1?'1TL@L#%04Z!@2 M#U\0$# +P4W,[EMAIL PROTECTED]P,%#H!(!8$@!?*!0!.R([EMAIL PROTECTED] `]/4X@ @[EMAIL PROTECTED]@6/@\()LL^S'3:M343T/XVE7TN5!`#L` ` end -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Asuming query without the ?
Robert Winter mailto:[EMAIL PROTECTED] on Thursday, June 03, 2004 4:31 PM said: Where and how do I set this? I'm to Unix and PHP. just look up mod_rewrite and you'll get some answers. http://www.engelschall.com/pw/apache/rewriteguide/ chris. p.s. please don't respond to two different messages with exactly the same one-word-missing response. it's very annoying. at least for me... and maybe some others... i can think of one person. but i wont name names. NED: Elaine, when my father was black listed he couldn't work for years. He and his friends used to sit at Hop Sing's every day figuring out how to survive. ELAINE: You're father was blacklisted? NED: Yes he was, and you know why? Because he was betrayed by people he trusted. They named names. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Asuming query without the ?
Robert Winter wrote: Where and how do I set this? I'm to Unix and PHP. in .htaccess file RewriteRule ^/path/([0-9]+)$/path/index.php?code=$1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Bulk table updates
I am looking for a tutorial or a already created class or file that I can use to learn how to create a form that is populated from a database table that can be edited in every row and column and takes only 1 SAVE button to upload all the changes. Thanks, Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bulk table updates
Use a SELECT query to get the values (SELECT * FROM table) and a table that has form input fields in the cells. The values for the form fields would be based on the array you get from the SELECT query. The form could be something like form action=?=$PHP_SELF ? method=post. In the script, before the body, you would have an if statement to check whether the submit button for the form is set; if it is set, it will run an INSERT INTO query: if (isset ($submit)) { $query = INSERT INTO . . . ; $query_result = @mysql_query ($query); } If the form is submitted, then the values in all the form fields (including any changes) will go into the database. If it's not submitted, the current values will be displayed in the tabled-embedded form. Actually, I think if the form is submitted, it will redisplay with the new values as defaults. Hopefully this will work, or lead you in the right direction. -Original Message- From: Robert Sossomon [EMAIL PROTECTED] Sent: Jun 3, 2004 6:23 PM To: [EMAIL PROTECTED] Subject: [PHP] Bulk table updates I am looking for a tutorial or a already created class or file that I can use to learn how to create a form that is populated from a database table that can be edited in every row and column and takes only 1 SAVE button to upload all the changes. 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] Bulk table updates
Robert Sossomon wrote: I am looking for a tutorial or a already created class or file that I can use to learn how to create a form that is populated from a database table that can be edited in every row and column and takes only 1 SAVE button to upload all the changes. Look on phpclasses.org or in PEAR; I know there are classes that do this. If all else fails, install PHPMyAdmin, which allows you do this. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Current URL
I've wondered for quite some time, and search just as long it seems like, for a way to get the current URL directory. For example, let's say you were at www.example.com/files. The script is executing in this directory, and it's calling an include script from the base (www.example.com or maybe even www.example.com/includes). In this included file are some links and maybe some images. These images and links are set up to be called from the base directory, so basically all the links inside the file say something like images/bob.gif or something of that nature. How could you dynamicaly change this in relation to where the included script is? If I were to include it in that files in /files, it would look for the images in /files/images/bob.gif which would not be there. One solution I have thought of is just putting the / at the beginning (/images/) but that wouldn't be the safest solution if the script were running in a subfolder to begind with (like the entire site is in www.example.com/site1). I hope you understand what I'm trying to say. Any ideas? Thanks, Stephen Craton http://www.melchior.us http://www.melchior.us/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Current URL
On Thu, 2004-06-03 at 23:15, Stephen Craton wrote: I've wondered for quite some time, and search just as long it seems like, for a way to get the current URL directory. For example, let's say you were at www.example.com/files. The script is executing in this directory, and it's calling an include script from the base (www.example.com or maybe even www.example.com/includes). In this included file are some links and maybe some images. These images and links are set up to be called from the base directory, so basically all the links inside the file say something like images/bob.gif or something of that nature. How could you dynamicaly change this in relation to where the included script is? If I were to include it in that files in /files, it would look for the images in /files/images/bob.gif which would not be there. One solution I have thought of is just putting the / at the beginning (/images/) but that wouldn't be the safest solution if the script were running in a subfolder to begind with (like the entire site is in www.example.com/site1). I hope you understand what I'm trying to say. Any ideas? In a configuration file shared by the project's scripts have a constant or global variable like follows: $GLOBALS['imageBase'] = '/site1/'; Now wherever in your site you use an image you can use this value to prepend the image path. Cheers, Blobbie. -- .. | 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
[PHP] Problem with PHP + WML + Post method
Hi, I'm having problem with the Post method in my PHP + WML file. Note that I have No problem with the Get method. When I click Login, The Error: Malformed server response I'm using Win2k + PHP436 for testing. And I have set the MIME type in the IIS: .wml application/x-httpd-php = index.php = ? header(Content-type: text/vnd.wap.wml); echo ?xml version=\1.0\?; echo !DOCTYPE wml PUBLIC \-//WAPFORUM//DTD WML 1.1//EN\ . \http://www.wapforum.org/DTD/wml_1.1.xml\;; ? wml card id=card1 title=Home p User ID: input name=myuserid size=15 value=/br/ Password: input type=password name=mypwd size=15 value=/br/ do type=accept name=next label=Login go href=index.php method=post postfield name=myuserid2 value=$myuserid/ /go /do /p /card /wml Is there anything I miss out? By the way, when I test with Win2003 server + PHP436, there is no problem. Does the problem lie with the Win2k server? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Problem with PHP + WML + Post method
hey, don't you need a page thats after that and will check the info, if you have it will help use see what your problem with the $_POST[] is. From: Shelby [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP] Problem with PHP + WML + Post method Date: Fri, 4 Jun 2004 11:46:10 +0800 Hi, I'm having problem with the Post method in my PHP + WML file. Note that I have No problem with the Get method. When I click Login, The Error: Malformed server response I'm using Win2k + PHP436 for testing. And I have set the MIME type in the IIS: .wml application/x-httpd-php = index.php = ? header(Content-type: text/vnd.wap.wml); echo ?xml version=\1.0\?; echo !DOCTYPE wml PUBLIC \-//WAPFORUM//DTD WML 1.1//EN\ . \http://www.wapforum.org/DTD/wml_1.1.xml\;; ? wml card id=card1 title=Home p User ID: input name=myuserid size=15 value=/br/ Password: input type=password name=mypwd size=15 value=/br/ do type=accept name=next label=Login go href=index.php method=post postfield name=myuserid2 value=$myuserid/ /go /do /p /card /wml Is there anything I miss out? By the way, when I test with Win2003 server + PHP436, there is no problem. Does the problem lie with the Win2k server? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage! http://join.msn.click-url.com/go/onm00200362ave/direct/01/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with PHP + WML + Post method
Hi, the href property is going back to index.php. It is going back to itself. Tyler Replogle [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hey, don't you need a page thats after that and will check the info, if you have it will help use see what your problem with the $_POST[] is. From: Shelby [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP] Problem with PHP + WML + Post method Date: Fri, 4 Jun 2004 11:46:10 +0800 Hi, I'm having problem with the Post method in my PHP + WML file. Note that I have No problem with the Get method. When I click Login, The Error: Malformed server response I'm using Win2k + PHP436 for testing. And I have set the MIME type in the IIS: .wml application/x-httpd-php = index.php = ? header(Content-type: text/vnd.wap.wml); echo ?xml version=\1.0\?; echo !DOCTYPE wml PUBLIC \-//WAPFORUM//DTD WML 1.1//EN\ . \http://www.wapforum.org/DTD/wml_1.1.xml\;; ? wml card id=card1 title=Home p User ID: input name=myuserid size=15 value=/br/ Password: input type=password name=mypwd size=15 value=/br/ do type=accept name=next label=Login go href=index.php method=post postfield name=myuserid2 value=$myuserid/ /go /do /p /card /wml Is there anything I miss out? By the way, when I test with Win2003 server + PHP436, there is no problem. Does the problem lie with the Win2k server? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage! http://join.msn.click-url.com/go/onm00200362ave/direct/01/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Current URL
Hi, You could use $_SERVER['DOCUMENT_ROOT'] Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Thu, 2004-06-03 at 23:15, Stephen Craton wrote: I've wondered for quite some time, and search just as long it seems like, for a way to get the current URL directory. For example, let's say you were at www.example.com/files. The script is executing in this directory, and it's calling an include script from the base (www.example.com or maybe even www.example.com/includes). In this included file are some links and maybe some images. These images and links are set up to be called from the base directory, so basically all the links inside the file say something like images/bob.gif or something of that nature. How could you dynamicaly change this in relation to where the included script is? If I were to include it in that files in /files, it would look for the images in /files/images/bob.gif which would not be there. One solution I have thought of is just putting the / at the beginning (/images/) but that wouldn't be the safest solution if the script were running in a subfolder to begind with (like the entire site is in www.example.com/site1). I hope you understand what I'm trying to say. Any ideas? In a configuration file shared by the project's scripts have a constant or global variable like follows: $GLOBALS['imageBase'] = '/site1/'; Now wherever in your site you use an image you can use this value to prepend the image path. Cheers, Blobbie. -- .. | 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] Current URL
On Fri, 2004-06-04 at 01:38, Aidan Lister wrote: Hi, You could use $_SERVER['DOCUMENT_ROOT'] That doesn't work... as the OP mentioned, the URLs might need to refer locally within a subsite built as a subdirectory within the document root. Cheers, Rob. Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Thu, 2004-06-03 at 23:15, Stephen Craton wrote: I've wondered for quite some time, and search just as long it seems like, for a way to get the current URL directory. For example, let's say you were at www.example.com/files. The script is executing in this directory, and it's calling an include script from the base (www.example.com or maybe even www.example.com/includes). In this included file are some links and maybe some images. These images and links are set up to be called from the base directory, so basically all the links inside the file say something like images/bob.gif or something of that nature. How could you dynamicaly change this in relation to where the included script is? If I were to include it in that files in /files, it would look for the images in /files/images/bob.gif which would not be there. One solution I have thought of is just putting the / at the beginning (/images/) but that wouldn't be the safest solution if the script were running in a subfolder to begind with (like the entire site is in www.example.com/site1). I hope you understand what I'm trying to say. Any ideas? In a configuration file shared by the project's scripts have a constant or global variable like follows: $GLOBALS['imageBase'] = '/site1/'; Now wherever in your site you use an image you can use this value to prepend the image path. Cheers, Blobbie. -- .. | 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 -- .. | 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