RE: [PHP] 1 is not a valid MySQL-Link resource in /home/guestbook.php on line 112
Check that you have not already close the connection to the mysql database. Or maybe, the mysql_connect returned an error ! -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Envoyé : mardi 4 décembre 2001 08:42 À : [EMAIL PROTECTED] Objet : [PHP] 1 is not a valid MySQL-Link resource in /home/guestbook.php on line 112 any one here can help my problem? (I 'am using hypermart.net hosting, so i am not sure which php version that they provided) Here are the problems: $sqlshow = SELECT * FROM $table ORDER BY id DESC LIMIT $show, $maxshow; $result = mysql_db_query($database, $sqlshow); produce: 1 is not a valid MySQL-Link resource in /home/guestbook.php on line 112 while (($myrow = mysql_fetch_array($result))) produce: Supplied argument is not a valid MySQL result resource in /home/guestbook.php on line 116 mysql_close(); produce: 1 is not a valid MySQL-Link resource in /home/guestbook.php on line 126 thanks. hendro. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] 'Running' a file from PHP script
Hi all, I'm a PHP newbie, my main scipring being done in Blueworld's Lasso. I have used php fro time to time with Lasso to do some file handling. My question is: 'Can I run a file from a PHP script?' The file in question would be a Filemaker database file. I want to be able to open the file in the Filemaker application if the file is not already running. MTIA George in Edinburgh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] 'Running' a file from PHP script
Hi all, I'm a PHP newbie, my main scipring being done in Blueworld's Lasso. I have used php fro time to time with Lasso to do some file handling. My question is: 'Can I run a file from a PHP script?' The file in question would be a Filemaker database file. I want to be able to open the file in the Filemaker application if the file is not already running. MTIA George in Edinburgh _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] New Page Escape Sequence
Hello, Chip wrote: On Monday 03 December 2001 11:02 pm, Robert Samuel White wrote: I wish to take some information out of a database and create a text file with the information, nicely formatted. Does any one know of an escape sequence that works as a new page indicator for printing??? I did some checking into this also, some time back. All the responses I got then were it's not possible to cover all types of printers and OS's available with just a certain escape sequence or other code. If you get a better answer, would you please copy me on it? In theory, the right way to achieve that is to put style attribute in the first paragraph the page that tells to break the page before the paragraph. I know that the attribute exists, but I don't know how many browsers obey it when they print the page. Maybe it is safe to resort to PDF. Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Dynamically created dropdowns
Hope this isn't an inappropriate message to send to this list. I suspect the response will largely concern JavaScript. Is there a way of altering the contents of one drop down menu according to the item selected in another? I'm creating a page allowing users to identify the make and model of computers received by our charity for refurbishment. Ideally I'd like to allow them to select a manufacturer from a drop down menu and for a separate drop down menu to then be populated by the models produced by that manufacturer. I have two separate tables in a MySQL database, one for manufacturers and one for models with the latter containing a field for the manufacturer ID. Is this possible? Michael Egan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Statistic analyze for Apache log
Hi Anyone know a good PHP application that generate statistic from apachelog? Please send me an URL. Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Statistic analyze for Apache log
You can use AWSTATS, it will working and it is very nice. Greetings, Manu - Original Message - From: Johan Holst Nielsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 10:51 AM Subject: [PHP] Statistic analyze for Apache log Hi Anyone know a good PHP application that generate statistic from apachelog? Please send me an URL. Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ldap_connect(URI)?
Hello, my problem is to enable a secure connection between a PHP script an an LDAP directory using SSL. The LDAP server is already recompiled and running with ssl/tsl-support. PHP-4.0.6. is compiled with-openssl. But when I try to use ldap_connect('ldaps://hostname/') like suggested in the manual, the script can't connect the server. Also 'ldap://...' or 'http://..' don't work, so it seems, that PHP doesn't support URIs in this position, but according to the manual it should do. What's wrong with my script or my installation? Thank you for your support. Susanne -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Statistic analyze for Apache log
Yes, I have already seen it. But I would prefer a PHP written application. AWSTATS are written in Perl :o(. Do you know anything like this, in PHP? :o) Regards, Johan Manu Verhaegen wrote: You can use AWSTATS, it will working and it is very nice. Greetings, Manu - Original Message - From: Johan Holst Nielsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 10:51 AM Subject: [PHP] Statistic analyze for Apache log Hi Anyone know a good PHP application that generate statistic from apachelog? Please send me an URL. Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP newbie alert
Hello! Being one not to refuse a challenge, I have been asked to administer and update a PHP based website. I was wondering what a good editor is for such a task. I have been having a look at Dreamweaver as I use that quite a lot but are there any extensions I should be using? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: php_xmldom.dll
Antwnhs T. wrote: I have a problem with this dll, the dll exists on my hd and php does not load it. I have win2k pro with iis5, has anyone any kind of solutions ? Do you remeber to include it in your php.ini file? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Dynamically created dropdowns
You can certainly do what you want in straight PHP if you include a form submission after selecting the manufacturer. There is probably a way of doing it in JavaScript without a form submission, but not one that will read data from a MySQL database on a remote machine. JavaScript can't do that. Michael On Tue, 4 Dec 2001, Michael Egan wrote: Hope this isn't an inappropriate message to send to this list. I suspect the response will largely concern JavaScript. Is there a way of altering the contents of one drop down menu according to the item selected in another? I'm creating a page allowing users to identify the make and model of computers received by our charity for refurbishment. Ideally I'd like to allow them to select a manufacturer from a drop down menu and for a separate drop down menu to then be populated by the models produced by that manufacturer. I have two separate tables in a MySQL database, one for manufacturers and one for models with the latter containing a field for the manufacturer ID. Is this possible? Michael Egan -- Michael Hall [EMAIL PROTECTED] [EMAIL PROTECTED] http://openlearningcommunity.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP newbie alert
If you use Dreamweaver under MacOS I suggest to take a look at BBedit from BareBones (www.versiontracker.com or www.barebones.com). Under Windows I currently use UltraEdit which fits quite fine but needed a few changes to the wordlist.txt which is responsible for syntax-highlighting (if you want that changes just mail me). Another valuable tool is proton - unfortunately I don't have any links for those two. but dreamweaver is IMHO a good chose for itself (using it's built-in code-editor). I myself prefer working on BBedit only (without using dreamweaver). At Job I have to work on a windows machine where I prefere to use UltraEdit. happy coding Stefan Rusterholz, [EMAIL PROTECTED] -- interaktion gmbh Stefan Rusterholz Zürichbergstrasse 17 8032 Zürich -- T. +41 1 253 19 55 F. +41 1 253 19 56 W3 www.interaktion.ch -- - Original Message - From: shaun murphy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 11:25 AM Subject: [PHP] PHP newbie alert Hello! Being one not to refuse a challenge, I have been asked to administer and update a PHP based website. I was wondering what a good editor is for such a task. I have been having a look at Dreamweaver as I use that quite a lot but are there any extensions I should be using? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] URGENT: IIS server doesn't recognize PHP pages
Hello, I am working for a customer whose ISP uses WinNT/IIS. To test the server environment available I have just uploaded the classic test php page with only phpinfo() inside. When I point to that URL (http://mycustomerdomain.com/test.php), netscape just opens the Save as (type application/octet stream) window. This means that the *server* is not set up to fire up the PHP interpreter on files ending with .php, right? What could the reason be? Is it possible that the fault is in the file, for example the CR/LF mess when moving files from Linux to Win**. If it *is* a server problem, what should I suggest to the ISP sysadmin (which is responsive, but knows almost exclusively IIS/ASP/VBScript)? Please help: the customer is starting to scream, and it is really embarassing to be stuck like this when I have a bunch of pages perfectly workiing under Linux just waiting inside my PC. TIA, mweb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ldap_connect(URI)?
Hi again Susanne, I'm on this list too... On Tue, Dec 04, 2001 at 11:13:51AM +0100, Susanne Benkert wrote: The LDAP server is already recompiled and running with ssl/tsl-support. PHP-4.0.6. is compiled with-openssl. But when I try to use ldap_connect('ldaps://hostname/') like suggested in the manual, the script can't connect the server. Also 'ldap://...' or 'http://..' don't work, so it seems, that PHP doesn't support URIs in this position, but according to the manual it should do. What's wrong with my script or my installation? Thank you for your support. This works for me. For ldap_connect(ldap://hostname;) to work, you need OpenLDAP 2.x libs but that's all. Are you sure PHP is using that library? If you use for instance Linux, you could try to check with ldd binary. Also when you configure PHP, you can try --with-ldap=ldapinstalldirectory and not just --with-ldap. When this is working, you can start thinking of ldaps. For ldap_connect(ldaps://hostname) to work, you need to compile the OpenLDAP 2.x libs with SSL/TLS, and also configure PHP with --with-openssl. Stig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP newbie alert
hi! Thanks for replying so quick. I use win2000 and have ultraedit so BBedit isnt really an option. Stefan Rusterholz [EMAIL PROTECTED] wrote in message 02cf01c17caf$bac57bb0$3c01a8c0@quasimodo">news:02cf01c17caf$bac57bb0$3c01a8c0@quasimodo... If you use Dreamweaver under MacOS I suggest to take a look at BBedit from BareBones (www.versiontracker.com or www.barebones.com). Under Windows I currently use UltraEdit which fits quite fine but needed a few changes to the wordlist.txt which is responsible for syntax-highlighting (if you want that changes just mail me). Another valuable tool is proton - unfortunately I don't have any links for those two. but dreamweaver is IMHO a good chose for itself (using it's built-in code-editor). I myself prefer working on BBedit only (without using dreamweaver). At Job I have to work on a windows machine where I prefere to use UltraEdit. happy coding Stefan Rusterholz, [EMAIL PROTECTED] -- interaktion gmbh Stefan Rusterholz Zürichbergstrasse 17 8032 Zürich -- T. +41 1 253 19 55 F. +41 1 253 19 56 W3 www.interaktion.ch -- - Original Message - From: shaun murphy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 11:25 AM Subject: [PHP] PHP newbie alert Hello! Being one not to refuse a challenge, I have been asked to administer and update a PHP based website. I was wondering what a good editor is for such a task. I have been having a look at Dreamweaver as I use that quite a lot but are there any extensions I should be using? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: URGENT: IIS server doesn't recognize PHP pages
Hello, Unfortunately, your ISP doesn't support PHP. They should install PHP Win32 but I think they don't want to install PHP for only your customer's site You should change your ISP to another ISP whic supports PHP Or, the other way is changing your codes from PHP to ASP... But the first way is more easy... Good Luck Emek mikropro.net (coming soon hosting provider with PHP, MySQL support) Mweb [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Hello, I am working for a customer whose ISP uses WinNT/IIS. To test the server environment available I have just uploaded the classic test php page with only phpinfo() inside. When I point to that URL (http://mycustomerdomain.com/test.php), netscape just opens the Save as (type application/octet stream) window. This means that the *server* is not set up to fire up the PHP interpreter on files ending with .php, right? What could the reason be? Is it possible that the fault is in the file, for example the CR/LF mess when moving files from Linux to Win**. If it *is* a server problem, what should I suggest to the ISP sysadmin (which is responsive, but knows almost exclusively IIS/ASP/VBScript)? Please help: the customer is starting to scream, and it is really embarassing to be stuck like this when I have a bunch of pages perfectly workiing under Linux just waiting inside my PC. TIA, mweb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] using semaphores problem
Hello there, I am using semaphores to synchronize access to specific database records. Problem is, it does not seem that the semaphores are being released. Not only am I using sem_release() but the PHP manual says it will release all semaphores that are still acquired at the end of the PHP page loading. Here is my simple code: function writeLock($mid) { if(!$mid) mydi('attempt to lock data 0'); if(!($lock_id = sem_get(2500+200+$mid%100)) || !sem_acquire($lock_id)) mydi('locking match.'); return $lock_id; } =AND= function unwriteLock($lock_id) { if(!$lock_id) mydi('attempt to unlock 0'); if(!sem_release($lock_id)) mydi('unlocking information.'); } Suggestions? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: using semaphores problem
Ok, I got it working so long as sem_release is SPECIFICALLY called. Problem is I have a lot of die calls throughout my scripts and I would rather not have exit hooks on every script (not sure how reliably those will ALWAYS be called, and would be a hassle to store a list of all semaphores to be released later). Why isn't PHP releasing them automatically like the manual says it should? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ldap_connect(URI)?
Hi Stig, Unknown Sender wrote: This works for me. For ldap_connect(ldap://hostname;) to work, you need OpenLDAP 2.x libs but that's all. Are you sure PHP is using that library? I'm quite sure, because other ldap functions work properly such as ldap_connect(hostname); or ldapsearch()... I already have a few PHP websites which are using these functions without problems. Only the newer ones like ldap_set_option() or ldap_start_tls() or (as mentioned) ldap_connect() with an URI don't work, although I use a PHP version that should support these things. Are there any additional libs for that? Bye, Susanne -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] : IIS server doesn't recognize PHP pages
Even if your code was duff, you wouldn't get the save as if IIS was correctly configured. Get your ISP to check that for your site, IIS has a scriptmap for .php mapped onto php.exe. If he needs more detailed instructions, they are in the online php manual at www.php.net or in the install.txt file supplied with the windows distribution of php. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] : IIS server doesn't recognize PHP pages
So, the problem is config problem... Maybe you can try to change extension from .php to .php3 or .php4 etc. Then please inform us again... Emek Mweb [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Tuesday 04 December 2001 12:04, Emek TUZUN wrote: Hello, Unfortunately, your ISP doesn't support PHP. They should install PHP Win32 but I think they don't want to install PHP for only your customer's site Emek, I have a message in my mailbox from the sysadmin (CC'd to the customer) saying that they *DO* support PHP (otherwise I would not have accepted the job..) I am almost sure that the problem is simply that the guy is very expert with NT/IIS/ASP/VBScript, and at a basic level on other topics, included this one. So, it must be a config issue, but which one? What should I tell him? Unless, of course, there is something really screwed in my code, (but for Heaven's sake, I just put a phpinfo() statement, in there) or in the way I uploaded it, its permissions, whatever. Any suggestion is HIGLY appreciated!! mweb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ASP to PHP ...
I have been asked to convert an ASP/MS Access system to PHP. I would be interested in hearing the thoughts of anyone with exp. of this. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP LDAP
On Tue, Dec 04, 2001 at 07:41:14AM +0800, Hafiz Malik wrote: hi there.. i'm succesfully add ldap entry(jpegphoto) using PHP via below codes.. but failed to modify it.. any ideas? Not really. Could you check what ldap_modify() returns, did you get any warnings from PHP? Turn on more debugging if necessary. Could you also try to do the same operation with ldap_modify on the command line? It might also be good to check your LDAP server logs (turn on more debugging if necessary). Stig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ldap_connect(URI)?
On Tue, Dec 04, 2001 at 12:19:24PM +0100, Susanne Benkert wrote: This works for me. For ldap_connect(ldap://hostname;) to work, you need OpenLDAP 2.x libs but that's all. Are you sure PHP is using that library? I'm quite sure, because other ldap functions work properly such as ldap_connect(hostname); or ldapsearch()... I already have a few PHP websites which are using these functions without problems. Only the newer ones like ldap_set_option() or ldap_start_tls() or (as mentioned) ldap_connect() with an URI don't work, although I use a PHP version that should support these things. Are there any additional libs for that? It really sounds like you are using PHP with another LDAP library than OpenLDAP 2.x or Netscape. If you could recompile PHP, could you try to see what LDAP library is used in the compilation? Maybe you can see it by grepping for ldap in config.log. Could you check if you have the file ldap.h in several locations. Has all the ldap.h you find got something like this inside them: #define LDAP_API_VERSION 2004 PHP checks for this to determine if ldap_set_option() etc. should be included. If the ldap.h comes from OpenLDAP 2.x, LDAP_API_VERSION should be defined. Stig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] URGENT: IIS server doesn't recognize PHP pages
First of all, thanks to John, Emek and Phil. Glad to see unanimity about it being a server config problem. However: I have tried .php and .php4 extension without any luck. Didn't try .php3 because was giving for granted their setup is newer than two years ;-)) OK, I'll try that too have you tried it with a PERL-style shebang line at the top of your scripts? Give something like: #!/usr/bin/php -q On a WinNT/IIS box? I'll try, but never read anything like this... Anyway, the sysadmin just emailed that he is going to check: we'll see. In the meantime, anybody with a working php.ini file for IIS please send it (to me of course, not the list) TIA, mweb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] URGENT: IIS server doesn't recognize PHP pages
have you tried it with a PERL-style shebang line at the top of your scripts? Give something like: #!/usr/bin/php -q On a WinNT/IIS box? I'll try, but never read anything like this... Ah yes, good point :-) Your path may be more like c:\progra~1\php\php.exe -q I don't even know if it's possible to compile PHP as a CGI on Windows, but it might be, so it's probably worth a try. Cheers Jon ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Cannot use a scalar value as an array
Hello all, I have a problem with a php script, which I want to use to fetch two data (integer) from a MySQL table, divide the first by the second, and store the value resulting in an double array. That seems not very difficult, but I always have the error 'Cannot use a scalar value as an array' when I use my script. Here it is : $result = mysql_query(SELECT timestamp_c,connectes,num FROM stats_serveurs WHERE timestamp_c LIKE '.$date.%' AND serveur='. $serveur.', $link); $max = 0; $reps = mysql_num_rows($result); for($i = 1; $i=$reps; $i++){ $row = mysql_fetch_row($result); $serveur[$i]['heure'] = $row[0]; $serveur[$i]['connectes'] = (int) ($row[1] / $row[2]); // Error! $max = max($max, $serveur[$i]['connectes']); } Any help is welcome ! :-) -- Xavier. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to use gd/php without freetype?
Hello and thanks for your time. After endless searching, I am still lost let's just assume I can't install freetype, and it looks like that for matters I won't get into. (linux, raq 3) I obviously need gd to create images and create text onto them But I want to be able to use normal standard fonts besides the default font that is used with text strings am I to believe without freetype, I can't do this? Am I just stuck with the default text font without freetype? Or is there another solution? Or do I just look for a fonts directory and call it during a php script using gd? MIght seem like a simple q but to this newbie, it's vital and I cannot find documentation on non freetype solutions Thanks so much Joel
[PHP] URGENT: IIS server now OK, but MS access DB not reachable
Still me. Thank you all, you were right!! The sysadmin did find out that the server config was wrong. Now php is OK. However, I have to access an MS access database with those pages. The sysadmin says relevant data are: DSN: domain Absolute path: c:\domini\domain_name.net\domaindata.mdb To give you an idea of the environment, a previous working ASP version was like this: Set conn = Server.CreateObject(ADODB.Connection) Set rs = Server.CreateObject(ADODB.Recordset) conn.Open Provider = Microsoft.Jet.OLEDB.4.0; Data Source = Server.MapPath(.) \domain.mdb; Persist Security Info = False The following snippet of code (copied from phpbuilder) fails as pasted at the end of the message. Now this must be even stupider than the other problem, but again any help is appreciated mweb ### MY CODE: $DB_PATH=c:\domini\domain_name.net\domaindata.mdb; $DSN=domain; / function Output_Entries() { //Make the connection to the database. The syntax is odbc_connect( 'SYSTEM_DSN' , 'USER', 'PASSWORD' ); //$cnx will hold the //pconnect is used to establish a persistent database connection to the Database //until the procedure is completed. $cnx = odbc_connect( $DSN , '', '' ); ## ERROR MESSAGE: Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\domini\domain_name.net\test.php on line 20 Error in odbc_connect Warning: Supplied argument is not a valid ODBC-Link resource in C:\domini\domain_name.net\test.php on line 52 Warning: Supplied argument is not a valid ODBC-Link resource in C:\domini\domain_name.net\test.php on line 52 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: ASP to PHP ...
Never done that... perhaps this link could help: http://asp2php.naken.cc/ John Meadows [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have been asked to convert an ASP/MS Access system to PHP. I would be interested in hearing the thoughts of anyone with exp. of this. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] URGENT: IIS server now OK, but MS access DB not reachable
Scope problem? Try this: function Output_Entries() { global $DB_PATH, $DSN; // rest of function } Cheers Jon -Original Message- From: mweb [mailto:[EMAIL PROTECTED]] Sent: 04 December 2001 12:28 To: [EMAIL PROTECTED] Subject: [PHP] URGENT: IIS server now OK, but MS access DB not reachable Still me. Thank you all, you were right!! The sysadmin did find out that the server config was wrong. Now php is OK. However, I have to access an MS access database with those pages. The sysadmin says relevant data are: DSN: domain Absolute path: c:\domini\domain_name.net\domaindata.mdb To give you an idea of the environment, a previous working ASP version was like this: Set conn = Server.CreateObject(ADODB.Connection) Set rs = Server.CreateObject(ADODB.Recordset) conn.Open Provider = Microsoft.Jet.OLEDB.4.0; Data Source = Server.MapPath(.) \domain.mdb; Persist Security Info = False The following snippet of code (copied from phpbuilder) fails as pasted at the end of the message. Now this must be even stupider than the other problem, but again any help is appreciated mweb ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] BEST Book for Learning PHP/MySQL
Also go to Amazon or BN and look through there and see the recomendations. --- Kurt Lieber [EMAIL PROTECTED] wrote: There's dozens upon dozens of messages in the archive about this topic, which comes up at least once per month. I believe there's also a blurb or two about PHP books on the PHP web site, php.net. Please check those resources. --kurt On Monday 03 December 2001 08:35 pm, Monty wrote: I'm a PHP and MySQL beginner. What's the best book I can buy that will get me started using both these technologies? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] = Dan McCullough --- Theres no such thing as a problem unless the servers are on fire! h: 603.444.9808 w: McCullough Family w: At Work __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] URGENT: IIS server now OK, but MS access DB not reachab le
On Tuesday 04 December 2001 13:29, Jon Haworth wrote: Scope problem? Try this: function Output_Entries() { global $DB_PATH, $DSN; // rest of function } YESS! (and an excellent demonstration that one should not code too many hours in a row :-(( ) Thanks to Jon and all the others, you were really precious. mweb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] A few questions on switching redoing site in PHP
If everyone could gather around for a minute or two. We are looking at switching from a propriatary JSP/JS/Java based system and going to PHP as our ecommerce system. We currently have Oracle db and hosted on Sun equiptment, which we are in for another 3 years, although upgrades are planned. We hate the current system, it was picked for us in a closed room environment. We have been looking to get off ever since we launched, actually even before we launched. I have been developing in PHP before I got this job and advised against the vendor that we had, now I want to develop my own system. This is the backend systems we have. One system that I'm not to sure of is MQ Series, can PHP tie into that, or would we have to work around that, MQ messages back and forth with our legacy system to give a real-time connection to our actual customer and inventory and order processing pieces, although some C++ code sits between that and the JS layer. Another concern is how well does Sun and PHP get along, we have these nice boxes that is actually handleing the memory hog that we have now, and I know that we couldnt just dump the servers. Anyone have an idea on a site that processes between 150-250 orders and averages $65k a day, if PHP and MySQL can handle that, or would I have to go to something like MSSQL (I know I know MS and PHP .. hahahahahaha). All and any suggestions are welcome. dan mccullough web technology 603.823.5545 x 1119 There is no such thing as a problem, unless the servers are on fire. Sometimes great opportunity comes brilliantly disguised as bad news. __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Statistic analyze for Apache log
If you find this out off list could you let me know as well. I can only find C++ and Perl scripts. Ok, thinking about programming if it don't exists. So I let you know when it's ready :o) Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php vbulletin and postgres
hey, me again. I am going to set up a vbulletin site and I understand it uses php along with mysql. I can get php and postgres hosting so I was wondering what the differences are in postgres as opposed to mysql. are they different enough to cause any problems? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php vbulletin and postgres
Well, they're both use SQL ... Problems? It's all relative, isn't it? You would have to change code relating to db connections and queries, etc, but not program logic, so it all depends how much code changing you have to do to get it working. That would depend on how the program was written in the first place. Michael On Tue, 4 Dec 2001, shaun murphy wrote: hey, me again. I am going to set up a vbulletin site and I understand it uses php along with mysql. I can get php and postgres hosting so I was wondering what the differences are in postgres as opposed to mysql. are they different enough to cause any problems? -- Michael Hall [EMAIL PROTECTED] [EMAIL PROTECTED] http://openlearningcommunity.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] freetype+gd+php not working
I have been trying to get FreeType working with PHP but have had no luck. In Apache's error log i'm getting: PHP Warning: libgd was not built with TrueType font support Here's the lines that are probably pertinent from my web server compilation script. Any suggestions on how to fix this would be greatly appreciated. FreeType 2.05 - make setup CFG=--prefix=/usr/local make make install GD 1.8.4 Changed lines in Makefile to: CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE LIBS=-lgd -lpng -lz -lm -lfreetype INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 \ -I/usr/X11R6/include/X11 -I/usr/local/include \ -I/usr/local/src/jpeg-6b -I/usr/local/include/freetype2 # /usr/local/src/jpeg-6b is the source location for jpeg-6b. # /usr/include/freetype2 doesn't exist, but the script i use # for the installation doesn't remove it and since it doesn't # exist, no harm should be done. Same with the X11 directories. make make install PHP 4.0.6 - ./configure --with-apache=../apache_1.3.22 --with-openssl \ --with-imap=/usr/local/src/imap-2000c \ --with-pgsql=/usr/local/pgsql --with-mysql=/usr/local/mysql \ --with-dbase --with-ms-sql --with-sybase=/usr/local/freetds \ --with-config-file-path=/etc/httpd --enable-track-vars \ --disable-debug --enable-pic --enable-inline-optimization \ --enable-ftp --with-xml \ --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local \ --with-freetype-dir=/usr/local/freetype-2.0.5 --with-zlib \ --enable-gd-native-tt --with-freetype make make install Apache 1.3.22 - SSL_BASE=SYSTEM ./configure --prefix=/usr/local/apache \ --with-layout=RedHat --enable-module=most --enable-module=ssl \ --activate-module=src/modules/perl/libperl.a \ --activate-module=src/modules/php4/libphp4.a make make certificate TYPE=dummy make install Dan Ramaley Digital Media Library Specialist (515) 271-1934 Cowles Library 140, Drake University -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] problem with ImageCreateJPEG ...
Hello , sorry for taking your time, but I still dont understand why I got errors with pjeg... I use the following code on other machine with jpeg support to , and it works, while in my machine I got an empty jpeg file ? Header(Content-type: image/jpeg); $im=ImageCreate(400,200); $bcg = ImageColorAllocate($im,240,240,240); $prt = ImageColorAllocate($im,0,0,0); $rd = ImageColorAllocate($im,255,0,0); ImageFill($im,400,200,$bcg); ImageLine($im,110,85,280,85,$rd); ImageString($im,5,130,90,--- OK ---,$prt); ImageLine($im,110,110,280,110,$rd); ImageJPEG($im,a.jpg); ? html body img src=a.jpg /body /html Is it possible that, even when see result of phpinfo(); and see that I have jpeg support , jpeg library isnt well compiled or gd?? if I use PNG instead I got no problems Jim wrote: It is difficult to know where your problem is without more information. It would appear that your jpeg file is not valid. Try another .jpg file. Post the problem code, too. Hello all, anyone can help me in line command to configure php : './configure' '--with-mysql' '--with-apache=/usr/src/packages/SOURCES/apache_1.3.9/' '--with-zlib-dir=/usr/src/packages/SOURCES/zlib/' '--with-png-dir=/usr/src/packages/SOURCES/libpng/' '--with-jpeg-dir=/usr/src/packages/SOURCES/jpeg-6b/' '--with-gd=/usr/src/packages/SOURCES/gd' '--enable-track-vars' in result of phpinfo() : gd GD Support enabled GD Version 1.6.2 or higher JPG Support enabled PNG Support enabled WBMP Support enabled zlib ZLib Support enabled 'zlib:' fopen wrapper enabled Compiled Version 1.1.3 Linked Version 1.1.3 ,but when use ImageCreateFromJPEG: br bWarning/b: imagecreatefromjpeg: .../testout.jpg' is not a valid JPEG file in b../a.php/b on line b4/bbr br bWarning/b: Supplied argument is not a valid Image resource in b../a.php/b on line b14 = ImageJPEG() what is my problem -- Best Regards Miguel Joaquim Rodrigues Loureiro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- Best Regards Miguel Joaquim Rodrigues Loureiro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] problem with ImageCreateJPEG ...
sorry for taking your time, but I still dont understand why I got errors with pjeg... I use the following code on other machine with jpeg support to , and it works, while in my machine I got an empty jpeg file ? Header(Content-type: image/jpeg); $im=ImageCreate(400,200); $bcg = ImageColorAllocate($im,240,240,240); $prt = ImageColorAllocate($im,0,0,0); $rd = ImageColorAllocate($im,255,0,0); ImageFill($im,400,200,$bcg); ImageLine($im,110,85,280,85,$rd); ImageString($im,5,130,90,--- OK ---,$prt); ImageLine($im,110,110,280,110,$rd); ImageJPEG($im,a.jpg); ? html body img src=a.jpg /body /html Try to remove all html, and instead make a ImageJPEG($img); You should then only get the JPEG file? You set a header, and the browser doesn't understand the HTML... regards Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: A few questions on switching redoing site in PHP
Some philosophical observations: My personal opinion would be to stick to a unix environment (Sun, Linux, FreeBSD...) and hold on to the Oracle part. I find that JSP is a bit cumbersome to maintain and program. An alternative to Oracle would be Postgres/SQL as they handle transactions relatively similarly. There was an article in Webtechniques which described the general security of using Postgres instead of MySQL when you can't afford Oracle. So you should check into that since you'll be handling sensitive information which can't get lost if someone unplugs the server or there's a power failure, or some other general disaster. The point being, the article explained how Postgres can handle data recovery (something stops in the middle of a process) while with MySQL, I wouldn't be so sure. (Personally, I love MySQL... because its so easy to use, but I wouldn't rely on it when it comes to sensitive stuff like keeping track of purchased goods... I could be wrong. Although I do use it for relatively indifferent needs! Subscriptions other traditional database stuff.). As far as Windows goes, great to play with but I wouldn't trust it with my life. Something to think about: basic security on Windows is a a hassle. The OS doesn't behave well when you create .htaccess files (just one example), I've been able to get past these quite easily using Windows. This on the otherhand is quite straight forward in unix. And if you forget Windows, you can then forget about the general head-ache of configuring PHP with IIS and the SQL server that exists. Consider hiring a professional unix system manager, someone with Linux or FreeBSD experience perhaps... Hope this helps. Dan McCullough [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... If everyone could gather around for a minute or two. We are looking at switching from a propriatary JSP/JS/Java based system and going to PHP as our ecommerce system. We currently have Oracle db and hosted on Sun equiptment, which we are in for another 3 years, although upgrades are planned. We hate the current system, it was picked for us in a closed room environment. We have been looking to get off ever since we launched, actually even before we launched. I have been developing in PHP before I got this job and advised against the vendor that we had, now I want to develop my own system. This is the backend systems we have. One system that I'm not to sure of is MQ Series, can PHP tie into that, or would we have to work around that, MQ messages back and forth with our legacy system to give a real-time connection to our actual customer and inventory and order processing pieces, although some C++ cdode sits between that and the JS layer. Another concern is how well does Sun and PHP get along, we have these nice boxes that is actually handleing the memory hog that we have now, and I know that we couldnt just dump the servers. Anyone have an idea on a site that processes between 150-250 orders and averages $65k a day, if PHP and MySQL can handle that, or would I have to go to something like MSSQL (I know I know MS and PHP .. hahahahahaha). All and any suggestions are welcome. dan mccullough web technology 603.823.5545 x 1119 There is no such thing as a problem, unless the servers are on fire. Sometimes great opportunity comes brilliantly disguised as bad news. __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: A few questions on switching redoing site in PHP
I forgot to add: Remember that Windows markets itself as an over-all solution to everything: Windows Server + ASP + IIS + SQL Server. It depends on whether you want to be outside the box! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] problem with ImageCreateJPEG ...
also, are you sure both versions of php were compiled the same way with the same options and support? -Original Message- From: Johan Holst Nielsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 9:22 AM To: Miguel Loureiro; [EMAIL PROTECTED] Subject: Re: [PHP] problem with ImageCreateJPEG ... sorry for taking your time, but I still dont understand why I got errors with pjeg... I use the following code on other machine with jpeg support to , and it works, while in my machine I got an empty jpeg file ? Header(Content-type: image/jpeg); $im=ImageCreate(400,200); $bcg = ImageColorAllocate($im,240,240,240); $prt = ImageColorAllocate($im,0,0,0); $rd = ImageColorAllocate($im,255,0,0); ImageFill($im,400,200,$bcg); ImageLine($im,110,85,280,85,$rd); ImageString($im,5,130,90,--- OK ---,$prt); ImageLine($im,110,110,280,110,$rd); ImageJPEG($im,a.jpg); ? html body img src=a.jpg /body /html Try to remove all html, and instead make a ImageJPEG($img); You should then only get the JPEG file? You set a header, and the browser doesn't understand the HTML... regards Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Help required
I can help, send me an email. For some reason I cant send directly to you from my account. --- MrBaseball34 [EMAIL PROTECTED] wrote: I would like to know if someone could help create: (All mySQL Tables already created) 1. A Registration page. Needed fields: UID UserName UserPwd UserLevel EmailAddr TeamName (select box loaded from a TeamNames Table) 2. A login page whereby a user enters UserName and UserPwd and gets redirected to form to fill in scores for baseball games. 3. Will select game from games list (loaded from Games Table) ordered by user's teamname. Scores page (already done) to be stored in Games table. Games Table Fields: GameID GameNum GameDate HomeTeam HomeScore VisitorTeam VistorScore Field Division 4. Then when the score is entered for the game that was selected, we will then update the standings (Standings Table), depending upon who won the game. Standings Table Fields: ID TeamName Wins Losses Ties Points (3 points for win and 1 point for tie) {we allow ties} Division The Standings table will already be populated with 0 wins, 0 losses, 0 ties and 0 points The Games Table will already be populated with the season schedule. The Teams Table will already be populated with the TeamNames and Divisions. I already have the Scores page HTML done. I am beginning to work on the Storing of the scores to the Games Table and updating the Standings. I just need help with the Registration and Login pages. I am also currently modifying XMBForum to use on our site, listed below, to replace an EZBoard. It is a very good opportunity to learn PHP, too. Mind you, that I am a somewhat new PHP user but I have done programming before in Clipper, VB, Delphi, ColdFusion and several others. This project will have to go online by 3/31. Our season usually starts the first weekend of April. I will need some testing time to test and debug anything that is written. What would you require to participate in this project? Regards, Eddie Shipman (MrBaseball34 on XMBForum.com forums) Austin Metro Baseball League http://www.austinmetrobaseball.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] = dan mccullough Theres no such thing as a problem unless the servers are on fire! __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] URGENT: IIS server now OK, but MS access DB not reachable
mweb, Are you using a File or User DSN? You DSN domain needs to be a working System DSN, succesfully tested in your ODBC Adminsistrator. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: mweb [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 7:28 AM To: [EMAIL PROTECTED] Subject: [PHP] URGENT: IIS server now OK, but MS access DB not reachable Still me. Thank you all, you were right!! The sysadmin did find out that the server config was wrong. Now php is OK. However, I have to access an MS access database with those pages. The sysadmin says relevant data are: DSN: domain Absolute path: c:\domini\domain_name.net\domaindata.mdb To give you an idea of the environment, a previous working ASP version was like this: Set conn = Server.CreateObject(ADODB.Connection) Set rs = Server.CreateObject(ADODB.Recordset) conn.Open Provider = Microsoft.Jet.OLEDB.4.0; Data Source = Server.MapPath(.) \domain.mdb; Persist Security Info = False The following snippet of code (copied from phpbuilder) fails as pasted at the end of the message. Now this must be even stupider than the other problem, but again any help is appreciated mweb ### MY CODE: $DB_PATH=c:\domini\domain_name.net\domaindata.mdb; $DSN=domain; / // // function Output_Entries() { //Make the connection to the database. The syntax is odbc_connect( 'SYSTEM_DSN' , 'USER', 'PASSWORD' ); //$cnx will hold the //pconnect is used to establish a persistent database connection to the Database //until the procedure is completed. $cnx = odbc_connect( $DSN , '', '' ); ## ERROR MESSAGE: Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\domini\domain_name.net\test.php on line 20 Error in odbc_connect Warning: Supplied argument is not a valid ODBC-Link resource in C:\domini\domain_name.net\test.php on line 52 Warning: Supplied argument is not a valid ODBC-Link resource in C:\domini\domain_name.net\test.php on line 52 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Stuck on array, need a little help.
I still can't get this to do what I want: $bikes = array( Road = array( Trek = array( Trek 5200 = road.php?brand=t5200 ), LeMond = array( Zurich = road.php?brand=zurich, Chambery = road.php?brand=chambery, Alpe d'Huez = road.php?brand=alpe, BuenosAries = road.php?brand=bueno, Tourmalet = road.php?brand=tourmalet ), Moots = array( VaMoots = road.php?brand=vamoots ) ), ); if ($cat == 'bikes') { while (list($key, $val)=each($bikes[$sub_cat])) { echo TDIMG SRC=\images/spacer.gif\ WIDTH=\25\ HEIGHT=\1\ ALT=\\ BORDER=\0\/TD\n; echo TDA HREF=\$val\ CLASS=\menu\$key/A/TD\n; while (list($sub_key, $sub_val) = each($val)) { echo TDA HREF=\$sub_val\ CLASS=\menu\$sub_key/a/td\n; } } } Will produce: Trek Trek 5200 LeMond Zurich Chambery Alpe d'Huez BuenosAries Tourmalet Moots VaMoots as it should... But, I need it to produce: Trek LeMond Moots Trek 5200 Zurich Chambery Alpe d'Huez BuenosAries Tourmalet VaMoots And I need to get the value of $sub_val in the nested while loop to where $val is in the outer loop. I'm really stuck, any suggestions?? -Brian ** -Original Message- From: Jim Musil [mailto:[EMAIL PROTECTED]] Sent: Friday, November 30, 2001 5:26 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Stuck on array, need a little help. The script is still working right, you just need to nest another while loop into your current while loop. Like so ... if ($cat == 'bikes' $sub_cat != 'Road') { while (list($val, $key)=each($bikes[$sub_cat])) { echo trtd$val/td; while (list($sub_val, $sub_key) = each($key)) { echo TDIMG SRC=\images/spacer.gif\ WIDTH=\25\ HEIGHT=\1\ ALT=\\ BORDER=\0\/td\n; echo TDA HREF=\$sub_key\ CLASS=\menu\$sub_val/a/td\n; } } } alternatively, if you know specifically what you want you could do this ... if ($cat == 'bikes' $sub_cat != 'Road') { while (list($val, $key)=each($bikes[$sub_cat][Trek])) { echo TDIMG SRC=\images/spacer.gif\ WIDTH=\25\ HEIGHT=\1\ ALT=\\ BORDER=\0\/td\n; echo TDA HREF=\$key\ CLASS=\menu\$val/a/td\n; } } No, all that will do is reverse the placement of the values. So now it prints out Array and puts the item in the URL. Still the same problem. -Original Message- From: Jim Musil [mailto:[EMAIL PROTECTED]] Sent: Friday, November 30, 2001 4:54 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Stuck on array, need a little help. Your script is working like you are asking it to ... Change ... while (list($val, $key)=each($bikes[$sub_cat])) { To ... while (list($key, $val)=each($bikes[$sub_cat])) { and it should work like you WANT it to ... I'm stuck. $key returns Array how can I get at each level of this array? if ($cat == 'bikes' $sub_cat != 'Road') { while (list($val, $key)=each($bikes[$sub_cat])) { echo TDIMG SRC=\images/spacer.gif\ WIDTH=\25\ HEIGHT=\1\ ALT=\\ BORDER=\0\/TD\n; echo TDA HREF=\$key\ CLASS=\menu\$val/A/TD\n; $bikes = array( Road = array( Trek = array( Trek 5200 = road.php?brand=t5200 ), LeMond = array( Zurich = road.php?brand=zurich, Chambery = road.php?brand=chambery, Alpe d'Huez = road.php?brand=alpe, BuenosAries = road.php?brand=bueno, Tourmalet = road.php?brand=tourmalet ), Moots = array( VaMoots = road.php?brand=vamoots ) ), Mountain = array( Trek = array( Fuel 100 = mountain.php?brand=tfuel90, Fuel 90 = mountain.php?brand=schhg ), Klein = array( bike 1 = URL, bike 2 = URL ), Gary Fisher = array( bike 1 = URL, bike 2 = URL ), Moots = array( bike 1 = URL, bike 2 = URL ) ), -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia -
Re: [PHP] Why are slashes automatically stripped from db result?
On Monday, December 3, 2001, at 06:16 PM, Tyler Longren wrote: I believe you're correct Martin. I think newer versions of MySQL automatically strip them out. Just use php's stripslashes() and addslashes() functions when you need them. Interesting. A bit unnerving at first, though. Thanks. -Steve Good luck Steve, Tyler Longren - Original Message - From: Martin Towell [EMAIL PROTECTED] To: 'Steve Cayford' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 03, 2001 6:04 PM Subject: RE: [PHP] Why are slashes automatically stripped from db result? maybe mysql is stripping the slashes and not php ?? -Original Message- From: Steve Cayford [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 10:57 AM To: [EMAIL PROTECTED] Subject: [PHP] Why are slashes automatically stripped from db result? Hey all. I'm storing some jpeg images in a mysql database using the PEAR classes. Before inserting the image into the db I call addslashes() on the data, I was, accordingly, calling stripslashes() on the data after pulling the image back out of the database, but the image was getting mangled. I finally realized that the slashes were already stripped from my query results so stripping them again was removing legitimate slashes. The question is: why are the slashes already stripped out of the db results? I call set_magic_quotes_runtime(0) at the beginning of the scripts to turn off magic quoting. What else would cause this? Thanks for any suggestions. -Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: php-list- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Multidimensional array construction
Good day, Thanks to all who replied. This isn't quite what I needed, though. I _have_ the array (or delimited list would do, too). What I need to do is _CREATE_ the array element $myarray['foo']['bar']['green']['apple'] and set it to some value. Actually traversing said array isn't hard, as you pointed out. foreach() doesn't work, as it just uses a copy of the original array. I think there might be some way to use variable references, but I haven't gotten one to work yet. Any other suggestions? Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: Mike Eheler [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 5:30 PM To: Martin Towell Cc: 'Darren Gamble'; PHP List Subject: Re: [PHP] Multidimensional array construction I did something like this recently. Here's how I did it: $some_value1 = 'Hello World'; $myarray['foo']['bar']['green']['apple'] = $some_value1; function get_opt($arr, $keys,$sep=':') { $var = $arr; $tmp = split($sep,$keys); foreach ($tmp as $k = $v) { $var = $var[$v]; } if (isset($var)) return $var; return ''; } echo get_opt($myarray, 'foo:bar:green:apple'); It needs refining, but it should do the job. That's entirely from memory, mind you.. it should work, though. Mike Martin Towell wrote: I was thinking that you could use a pointer to var, eg: $var = 'myarray[foo][bar][red][apple]'; // this would obviously be created dynamically, hard coded for testing $$var = $some_value1; echo $myarray[foo][bar][red][apple]; but when I tried it, it didn't work :( looks like eval() to the rescue... -Original Message- From: Darren Gamble [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 10:37 AM To: PHP List Subject: [PHP] Multidimensional array construction Here's a question for the list: I have a two-dimensional array; essentially a list of arrays. Each element (an array) can have any number of elements. As a small example: ( ( foo , bar , red , apple ), ( foo , bar , red , car), ( foo , green ) ) I would like to traverse this array and place all of the data into another multidimensional array. The following statements illustrate how I'd like to do this from the example: $myarray[foo][bar][red][apple] = $some_value1; $myarray[foo][bar][red][car] = $some_value2; $myarray[foo][green] = $some_value3; Is there any way to easily do this in PHP? I could cheat and use eval(), but there is probably a better way. I have thought of using each() or references, but nothing has come to mind so far. Any ideas? Should I just use eval() ? Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP Help required
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I would like to know if someone could help create: I was kind looking for someone to help show me the way. Not really to do it all. I was just notified by the league pres. that we do not have the budget to pay for anyone else to perform work on the site. We are a not-for-profit league and most all the work done on the site is done for free including our hosting. Sorry if I misled anyone in the NG. Now, if anyone still wants to help... Regards, Eddie Shipman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 'Running' a file from PHP script
On Tuesday, December 4, 2001, at 02:22 AM, George Pitcher wrote: Hi all, I'm a PHP newbie, my main scipring being done in Blueworld's Lasso. I have used php fro time to time with Lasso to do some file handling. My question is: 'Can I run a file from a PHP script?' The file in question would be a Filemaker database file. I want to be able to open the file in the Filemaker application if the file is not already running. If you mean can you open the Filemaker application on the client's machine using PHP, then no. Keep in mind that PHP is only running on the server(*), all the client machine sees is the HTML output from your PHP script. Maybe you could use javascript to do this, but I haven't used javascript much. -Steve (*) Assuming you're using PHP in its normal web-server scripting mode. MTIA George in Edinburgh _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 'Running' a file from PHP script
Steve, Thanks for the response, but it's a server-side 'run' I'm looking for, not client-side (they get web access to the db). Basically I want to be able to test that the db is running and if it isn't then I want to 'run' it. Platform is NT, server is IIS4 George - Original Message - From: Steve Cayford [EMAIL PROTECTED] To: George Pitcher [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 3:39 PM Subject: Re: [PHP] 'Running' a file from PHP script On Tuesday, December 4, 2001, at 02:22 AM, George Pitcher wrote: Hi all, I'm a PHP newbie, my main scipring being done in Blueworld's Lasso. I have used php fro time to time with Lasso to do some file handling. My question is: 'Can I run a file from a PHP script?' The file in question would be a Filemaker database file. I want to be able to open the file in the Filemaker application if the file is not already running. If you mean can you open the Filemaker application on the client's machine using PHP, then no. Keep in mind that PHP is only running on the server(*), all the client machine sees is the HTML output from your PHP script. Maybe you could use javascript to do this, but I haven't used javascript much. -Steve (*) Assuming you're using PHP in its normal web-server scripting mode. MTIA George in Edinburgh _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Cannot use a scalar value as an array
On Tuesday, December 4, 2001, at 06:04 AM, Xavier Antoviaque wrote: Hello all, I have a problem with a php script, which I want to use to fetch two data (integer) from a MySQL table, divide the first by the second, and store the value resulting in an double array. That seems not very difficult, but I always have the error 'Cannot use a scalar value as an array' when I use my script. Here it is : $result = mysql_query(SELECT timestamp_c,connectes,num FROM stats_serveurs WHERE timestamp_c LIKE '.$date.%' AND serveur='. $serveur.', $link); $max = 0; $reps = mysql_num_rows($result); for($i = 1; $i=$reps; $i++){ $row = mysql_fetch_row($result); $serveur[$i]['heure'] = $row[0]; $serveur[$i]['connectes'] = (int) ($row[1] / $row[2]); // Error! $max = max($max, $serveur[$i]['connectes']); } How does the operator precedence work in the statement ($row[1] / $row[2]) ? You might try (($row[1]) / ($row[2])) instead, or pull those into scalar variables before trying the division. -Steve Any help is welcome ! :-) -- Xavier. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] sizeof($array) with a twist
I'd like to count the number of rows in a 2 dimensional array that have the same data in their fifth field. Is there a PHP function that does this? Sizeof() appears to lack condition parameters... ...Rene --- René Fournier [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Dynamically created dropdowns
But, you can use PHP to dynamically create your .js file that your HTML file calls. Load each of your options and sub options into js arrays and write a js function that swaps out the pull down options on the onChange event of the previous pull down. Depending on the number of options you have, this may be an okay solution. At least with this method, your javascript will have up to date data. script src=js.php type=text/javascript language=Javascript/script You can certainly do what you want in straight PHP if you include a form submission after selecting the manufacturer. There is probably a way of doing it in JavaScript without a form submission, but not one that will read data from a MySQL database on a remote machine. JavaScript can't do that. Michael On Tue, 4 Dec 2001, Michael Egan wrote: Hope this isn't an inappropriate message to send to this list. I suspect the response will largely concern JavaScript. Is there a way of altering the contents of one drop down menu according to the item selected in another? I'm creating a page allowing users to identify the make and model of computers received by our charity for refurbishment. Ideally I'd like to allow them to select a manufacturer from a drop down menu and for a separate drop down menu to then be populated by the models produced by that manufacturer. I have two separate tables in a MySQL database, one for manufacturers and one for models with the latter containing a field for the manufacturer ID. Is this possible? Michael Egan -- Michael Hall [EMAIL PROTECTED] [EMAIL PROTECTED] http://openlearningcommunity.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] small window scripts in Javascript?
Hi all, How could i get rid of the white space and show the picture exactly same size as the window, so it would be perfect fit. What else do I miss in the codes to make the perfect fit size? Also, how can I have the small window close automatically after user clicking on the picture's hyperlink? Any helps will be greatly appreciated. Thanks. Script !-- function displayWindow(url, width, height) { window.open(url,displayWindow,'width=' + width + ',height=' + height +',resizable=0,scrollbars=no,menubar=no,status=no,topmargin=0,leftmargin=0') ; self.close(); } //-- /script a href=javascript:displayWindow('../JPeg/big%20jpeg/Untitled-1.jpg',750,530) regards, Calvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 'Running' a file from PHP script
Ah, well, can't help you there, sorry. -Steve On Tuesday, December 4, 2001, at 09:40 AM, George Pitcher wrote: Steve, Thanks for the response, but it's a server-side 'run' I'm looking for, not client-side (they get web access to the db). Basically I want to be able to test that the db is running and if it isn't then I want to 'run' it. Platform is NT, server is IIS4 George - Original Message - From: Steve Cayford [EMAIL PROTECTED] To: George Pitcher [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 3:39 PM Subject: Re: [PHP] 'Running' a file from PHP script On Tuesday, December 4, 2001, at 02:22 AM, George Pitcher wrote: Hi all, I'm a PHP newbie, my main scipring being done in Blueworld's Lasso. I have used php fro time to time with Lasso to do some file handling. My question is: 'Can I run a file from a PHP script?' The file in question would be a Filemaker database file. I want to be able to open the file in the Filemaker application if the file is not already running. If you mean can you open the Filemaker application on the client's machine using PHP, then no. Keep in mind that PHP is only running on the server(*), all the client machine sees is the HTML output from your PHP script. Maybe you could use javascript to do this, but I haven't used javascript much. -Steve (*) Assuming you're using PHP in its normal web-server scripting mode. MTIA George in Edinburgh _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: php-list- [EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sizeof($array) with a twist
array_count_values() does something like this. It groups together values and tells you how many times they occur in an array... example $array = array( array(foo,bar,rex), array(foo,bar,zip), array(foo,bar,zoo), array(foo,bar,rex)); /* put all elements into one array */ foreach($array as $val) { $temp_array[] = $val[2];} /* count values. see php.net/array_count_values */ $count = array_count_values($temp_array); printpre; print_r($count); print/pre; this produces ... Array ( [rex] = 2 [zip] = 1 [zoo] = 1 ) I'd like to count the number of rows in a 2 dimensional array that have the same data in their fifth field. Is there a PHP function that does this? Sizeof() appears to lack condition parameters... ...Rene --- René Fournier [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] 'Running' a file from PHP script
Basically I want to be able to test that the db is running and if it isn't then I want to 'run' it. Platform is NT, server is IIS4 It's a database, right? So surely it should be running as an NT service, in which case it should be set to start automatically when the computer starts. Your best bet to test for the existence is to try and connect to it with a known good username and password - if that fails, it's likely that the service isn't running. If it's not running automatically and all the time, then you don't have a database server, you have a computer that happens to have database software installed on it, in which case you should change your ISP. You can't use the key inside the locked box to unlock the box. Cheers Jon ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Extract data
Hello guys I'm making poll script that stores data like this: 0|0|0|0|0 But i'm getting this error all the time: Warning: unexpected regex error (14) in c:\program files\apache group\apache\htdocs\eztatic\poll.php on line 25 25: list(q1,q2,q3,q4,q5)= split (|, $answer, 5); Could any help Thank you very much in advance - Hot Mobiil - helinad, logod ja piltsõnumid! http://www.hot.ee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ASP to PHP ...
This really depends how complicated your ASP system is. Presumably, your current system has many components that make it work correctly with the server and MS Access. The hardest part will be getting PHP to function as expected in that environment. The actual code is easy to translate, but you'll probably end up rewriting everything from scratch to take advantage of PHP's strengths. Just don't forget your semicolons! PHP can link up well with MS Access, but there aren't a lot of example scripts out there to work with. Little things can drive you nuts -- like trying to find the unique id of your last db insert. I have been asked to convert an ASP/MS Access system to PHP. I would be interested in hearing the thoughts of anyone with exp. of this. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 'Running' a file from PHP script
Jon, Not quite as simple as that. I can run the db application without any problem, but the db files tend to fall over occasionally. I have a script which cxhecks every 5 mins and boots them up if they are down. I'm looking for a way to get them up if the db search detects that they are down. I can do the detection bit, it's the getting the db file up and running bit I can't do. George - Original Message - From: Jon Haworth [EMAIL PROTECTED] To: 'George Pitcher' [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 4:44 PM Subject: RE: [PHP] 'Running' a file from PHP script Basically I want to be able to test that the db is running and if it isn't then I want to 'run' it. Platform is NT, server is IIS4 It's a database, right? So surely it should be running as an NT service, in which case it should be set to start automatically when the computer starts. Your best bet to test for the existence is to try and connect to it with a known good username and password - if that fails, it's likely that the service isn't running. If it's not running automatically and all the time, then you don't have a database server, you have a computer that happens to have database software installed on it, in which case you should change your ISP. You can't use the key inside the locked box to unlock the box. Cheers Jon ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: calling all set vars
In article 20011204074346.PCP1236.viefep14-int.chello.at@[127.0.0.1], [EMAIL PROTECTED] (Christian Donhofer) wrote: is there a way of calling all vars at once to analize there details, i. e. prefixes or value? http://www.php.net/manual/en/function.get-defined-vars.php -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] 1 is not a valid MySQL-Link resource in /home/guestbook.php on line 112
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 1:42 AM To: [EMAIL PROTECTED] Subject: [PHP] 1 is not a valid MySQL-Link resource in /home/guestbook.php on line 112 any one here can help my problem? (I 'am using hypermart.net hosting, so i am not sure which php version that they provided) Here are the problems: $sqlshow = SELECT * FROM $table ORDER BY id DESC LIMIT $show, $maxshow; $result = mysql_db_query($database, $sqlshow); produce: 1 is not a valid MySQL-Link resource in /home/guestbook.php on line 112 Where is your $database variable getting its value? --- Mark Roedel | Nothing in life is so bad that it cannot be Systems Programmer| made much, much worse by the addition of LeTourneau University |lots of spikes and razors. Longview, Texas, USA |-- Sean Kozma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Extract data
The pipe | is a regex special character that allows you to specify multiple options (as in 1|0 will find 1 or 0. Your code will work if you escape the pipe as such... 25: list(q1,q2,q3,q4,q5)= split (\|, $answer, 5); But, it won't work unless you put the $ in front of your variables in your list constructor Jim Content-type: text/plain; Content-encoding: base64 Hello guys I'm making poll script that stores data like this: 0|0|0|0|0 But i'm getting this error all the time: Warning: unexpected regex error (14) in c:\program files\apache group\apache\htdocs\eztatic\poll.php on line 25 25: list(q1,q2,q3,q4,q5)= split (|, $answer, 5); Could any help Thank you very much in advance - Hot Mobiil - helinad, logod ja piltsõnumid! http://www.hot.ee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Extract data
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Dan) wrote: Warning: unexpected regex error (14) in c:\program files\apache group\apache\htdocs\eztatic\poll.php on line 25 25: list(q1,q2,q3,q4,q5)= split (|, $answer, 5); Split() takes a regex as the first argument. The pipe character (|) is a special character in regex, so it needs to be escaped if you intend to use it as a string literal. But, as noted in the docs http://www.php.net/manual/en/function.split.php: ...if you don't require the power of regular expressions, it is faster to use explode(), which doesn't incur the overhead of the regular expression engine. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] 'Running' a file from PHP script
Aha, I understand :-) Have you looked at exec() and passthru()? Start with http://www.php.net/manual/en/ref.exec.php, there are some notes relating to Windows there... Cheers Jon -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: 04 December 2001 16:51 To: Jon Haworth Cc: [EMAIL PROTECTED] Subject: Re: [PHP] 'Running' a file from PHP script Jon, Not quite as simple as that. I can run the db application without any problem, but the db files tend to fall over occasionally. I have a script which cxhecks every 5 mins and boots them up if they are down. I'm looking for a way to get them up if the db search detects that they are down. I can do the detection bit, it's the getting the db file up and running bit I can't do. George ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 'Running' a file from PHP script
Jon, Of course not, I'm a newbie! George - Original Message - From: Jon Haworth [EMAIL PROTECTED] To: 'George Pitcher' [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 5:03 PM Subject: RE: [PHP] 'Running' a file from PHP script Aha, I understand :-) Have you looked at exec() and passthru()? Start with http://www.php.net/manual/en/ref.exec.php, there are some notes relating to Windows there... Cheers Jon -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: 04 December 2001 16:51 To: Jon Haworth Cc: [EMAIL PROTECTED] Subject: Re: [PHP] 'Running' a file from PHP script Jon, Not quite as simple as that. I can run the db application without any problem, but the db files tend to fall over occasionally. I have a script which cxhecks every 5 mins and boots them up if they are down. I'm looking for a way to get them up if the db search detects that they are down. I can do the detection bit, it's the getting the db file up and running bit I can't do. George ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] small window scripts in Javascript?
NOT a php question, but the only solution I know of is making a HTML page for the picture with the margin's set to zero (and whatever options u want)... This would mean you would have to create 100 HTML pages if you had 100 Popup images... Another solution would be to use PHP to make 1 page, which would allow you to pass the image to it as a variable, For example: image.php?img=myPicture.jpg Hope this helps Andrew - Original Message - From: Wee Chua [EMAIL PROTECTED] To: 'Michael Rudel' [EMAIL PROTECTED] Cc: PHP (E-mail) [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 4:16 PM Subject: [PHP] small window scripts in Javascript? Hi all, How could i get rid of the white space and show the picture exactly same size as the window, so it would be perfect fit. What else do I miss in the codes to make the perfect fit size? Also, how can I have the small window close automatically after user clicking on the picture's hyperlink? Any helps will be greatly appreciated. Thanks. Script !-- function displayWindow(url, width, height) { window.open(url,displayWindow,'width=' + width + ',height=' + height +',resizable=0,scrollbars=no,menubar=no,status=no,topmargin=0,leftmargin=0') ; self.close(); } //-- /script a href=javascript:displayWindow('../JPeg/big%20jpeg/Untitled-1.jpg',750,530) regards, Calvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] banner management system
Hello, any idea of a free and simple banner management system written in PHP. I appreciate your help. --- Ali Reza Sajedi http://www.bupnet.de/info/mitarbeiter.php3?id=1action=einzelheit BUP Am Leinekanal 4 37073 Göttingen Germany --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] header(Location:blah...) - passing variables
Hi, I wonder if someone could tell me whether or not the following is possible? I have an HTML form which passes a username and password to a PHP script for validation. If either is not valid, I would like it to return to the previous page - carrying with it a variable plus the submitted form information... =-=-=-=-=-=-=-=-= if (strlen ($password1) 4 ) { $err = Password must be more than 4 characters long; header(Location:http://somelocation.php;); // ^-- at the location, the $err and form variables will be available exit; } =-=-=-=-=-=-=-=-= Is it possible to this without using an HTML form? Thanks very much in advance. - Best regards, Lee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: header(Location:blah...) - passing variables
You should really try to do it and see if it's possible, before asking on the mailing list... mainly because you will be satisfied with the results... -- Julio Nobrega Don't eat the yellow snow. Lee Philip Reilly [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I wonder if someone could tell me whether or not the following is possible? I have an HTML form which passes a username and password to a PHP script for validation. If either is not valid, I would like it to return to the previous page - carrying with it a variable plus the submitted form information... =-=-=-=-=-=-=-=-= if (strlen ($password1) 4 ) { $err = Password must be more than 4 characters long; header(Location:http://somelocation.php;); // ^-- at the location, the $err and form variables will be available exit; } =-=-=-=-=-=-=-=-= Is it possible to this without using an HTML form? Thanks very much in advance. - Best regards, Lee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] header(Location:blah...) - passing variables
There are many different ways to do this ... 1. Have the same PHP script that validates generate the login page. This way the script always has the correct data and you don't need to pass anything. 2. Header(Location: login.php?err=$erruser=$userpass=$pass); This will work, but the bad password will be visible in the query string. 3. Start a session at the login page and register the variables you need to use on the login page. Jim Hi, I wonder if someone could tell me whether or not the following is possible? I have an HTML form which passes a username and password to a PHP script for validation. If either is not valid, I would like it to return to the previous page - carrying with it a variable plus the submitted form information... =-=-=-=-=-=-=-=-= if (strlen ($password1) 4 ) { $err = Password must be more than 4 characters long; header(Location:http://somelocation.php;); // ^-- at the location, the $err and form variables will be available exit; } =-=-=-=-=-=-=-=-= Is it possible to this without using an HTML form? Thanks very much in advance. - Best regards, Lee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] header(Location:blah...) - passing variables
Set the form receiver to $PHP_SELF. When data is posted (use $HTPP_POST_VARS to check if is) check it for correctness. If everything is ok, use Header(Location: work_for_authorized.php) otherwise show the current (i.e. login page) with $user, $pass available... Zliy PEs, http://www.zliypes.com.ua - Original Message - From: Lee Philip Reilly [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 7:46 PM Subject: [PHP] header(Location:blah...) - passing variables Hi, I wonder if someone could tell me whether or not the following is possible? I have an HTML form which passes a username and password to a PHP script for validation. If either is not valid, I would like it to return to the previous page - carrying with it a variable plus the submitted form information... =-=-=-=-=-=-=-=-= if (strlen ($password1) 4 ) { $err = Password must be more than 4 characters long; header(Location:http://somelocation.php;); // ^-- at the location, the $err and form variables will be available exit; } =-=-=-=-=-=-=-=-= Is it possible to this without using an HTML form? Thanks very much in advance. - Best regards, Lee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] You owe it to yourself to read this...
Dear Fellow Entrepreneur, Are you achieving the results that you are trying to achieve with your online business? If your current business is offering a product that is a quick and simple solution to a problem that concerns most people, most of the time, then you would be very happy, and wealthy. WELL DONE. If it is not, than unfortunately you are probably not making much money, and presumably won't. Unfortunately if your product is not a quick and simple solution to a problem that concerns most people, most of the time, then you won't be able to market to the majority of the Internet population out their will you. Anyone who is making any real money out there would have to have a quick and simple solution to a problem that concerns most people, most of the time wouldn't they. Sorry for repeating it so often, but if you truly want to make any money through the Internet, then you will need to know this sentence (a quick and simple solution to a problem that concerns most people, most of the time) off by heart. If you really want to make money using the Internet, than I may be able to help you. I say maybe because this business is not for anyone who is not going to be committed to making $40,000 in 6 weeks, (Quicksmart, which is shown below) and then working towards making $1,000,000 in 180 days using a very effective program called Infoshare. Both these programs WILL make you money as long as you are committed to making them successful. Others just like you and myself ARE making this kind of money as you read this. If you are committed enough to do exactly as I say, then you WILL succeed. It is very VERY simple, and I will help you with everything you need to know to become successful. I am not successful unless you are, so I will not leave you in the dark like others often do. I will do everything I can to help you. Discover how to make true wealth using the same secrets that the millionaires are using to achieve results and success on the Web. Remember the old saying If you can't beat them, join them. Well this is the same thing. You are about to Learn how the big guns are making all that easy money, and how YOU TOO can live a life of good health, love, and have all the time in the world to give to yourself and your family. Once if I receive your $5, I will send you the URL address of the Lazyman's Guide to Success in Phase 2. Once there you will be able to learn all the secrets to success on the Web. You will also have access to 3 sensational programs for free, which you will use to send out hundreds of E-mail every day. This is what makes this program so different to the ones that are very hard to make successful. Advertising at various classified sites really does not work, does it? So we need to find another way to advertise our business, and sending out bulk E-mail every day to a targeted population does work. This program is probably the easiest to set up and run, and also the quickest to make great money. In Phase 2 you will send out bulk E-mail using 3 very effective programs. The first you will use to extract E-mail addresses from various free classified web sites. The second will sort out your E-mail list that you have just extracted so that you will have a clean list of E-mail addresses to send your offer to. Finally your third program will send out your Bulk E-mail. Do you agree that this is a much more effective way of advertising then placing ads all over different classified web sites, and just receiving counter offers in your inbox? From now on you will still have plenty of E-mail, but it will be people wanting to sign up. Now that is what I call results. The last thing, and the most important to be successful, is to DREAM. Dream and make goals of what you want to buy for yourself, your family and friends. Dream about where you want to live, go on a holiday, and what kind of car you have always wanted, and of course, what life will be like when you ARE a MILLIONAIRE. This is the most important ingredient to success. Every successful person does it. Why? Success WILL NOT come unless you dream and set goals. The reason that we set goals and dream is for the simple fact that if you come across a problem, then you should think about your goal or dream. This will make you determined enough to seek help and move on. I will be here to help you, so that you can get passed any problem that you may come across. No business is perfect, but you can not find a much easier one than this one. Once you have fixed the problem, you will move forward and be $1,000,000 richer, and your goals and dreams all come true.And of course you will set higher goals and dreams for yourself. LET'S GET STARTED SHALL WE!!! Yes right now, not tomorrow. Because I know you are keen to be successful. Save this E-mail to your hard drive and read it OFFLINE so that you are not wasting valuable money on the Internet, and do exactly as it says. Once
[PHP] Re: PHP Help required
Eddie, There are some good books to get you started running - literally - with PHP and a database (usually MySQL). I would recommend PHP Fast and Easy (blue cover with red writing). Each chapter focuses on a given task... building tables, then adding to table, then selecting from a table and - ofcourse - displaying the results. If you sepnd a week just getting used to PHP (if statements, c) or you are already familiar with these constructs, you will very quickly get involved with MySQL. Mrbaseball34 [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I would like to know if someone could help create: I was kind looking for someone to help show me the way. Not really to do it all. I was just notified by the league pres. that we do not have the budget to pay for anyone else to perform work on the site. We are a not-for-profit league and most all the work done on the site is done for free including our hosting. Sorry if I misled anyone in the NG. Now, if anyone still wants to help... Regards, Eddie Shipman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] phpinfo() returning Zero Sized Reply
phpinfo() is a function itself. It needn't echo: ? phpinfo(); ? Zliy Pes, http://www.zliypes.com.ua - Original Message - From: Brian C. Doyle [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 8:07 PM Subject: [PHP] phpinfo() returning Zero Sized Reply hello all, I have a script with ? echo phpinfo(); ? and getting Zero Sized Reply i have increased my timeout in php.ini and no change. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] header(Location:blah...) - passing variables
I cheat and just include the original form on error ... Almost all my input values are set to PHP variables in the form. The 1st time through none are set, so the values are blank. After submitting the form, I check for validity. If there are errors I mark the errors, generate an error string, and include the form. That way all previously typed in data remains in the form without me having to tell the user to hit the back button, and there's no horribly long URL string resetting all those values. There's a bit more work than that (using htmlspecialchars et al.) but if you start creating forms with error checking indication in mind it's really easy to do validation and redisplay if necessary. Mark C. Hi, I wonder if someone could tell me whether or not the following is possible? I have an HTML form which passes a username and password to a PHP script for validation. If either is not valid, I would like it to return to the previous page - carrying with it a variable plus the submitted form information... =-=-=-=-=-=-=-=-= if (strlen ($password1) 4 ) { $err = Password must be more than 4 characters long; header(Location:http://somelocation.php;); // ^-- at the location, the $err and form variables will be available exit; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] phpinfo() returning Zero Sized Reply
Okay so i got rid of the echo and still no go.. I am using version 4.0.6 At 08:11 PM 12/4/2001 +0200, Valentin V. Petruchek wrote: phpinfo() is a function itself. It needn't echo: ? phpinfo(); ? Zliy Pes, http://www.zliypes.com.ua - Original Message - From: Brian C. Doyle [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 8:07 PM Subject: [PHP] phpinfo() returning Zero Sized Reply hello all, I have a script with ? echo phpinfo(); ? and getting Zero Sized Reply i have increased my timeout in php.ini and no change. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Dynamically created dropdowns
That's true, but you could use PHP and the MySQL data to generate the JavaScript arrays for the dynamic menus... you can escape into PHP within the SCRIPT tags of an HTML page just as easily as you can within the HEAD or BODY tags. -Andy -Original Message- From: Michael Hall [mailto:[EMAIL PROTECTED]] Subject: Re: [PHP] Dynamically created dropdowns You can certainly do what you want in straight PHP if you include a form submission after selecting the manufacturer. There is probably a way of doing it in JavaScript without a form submission, but not one that will read data from a MySQL database on a remote machine. JavaScript can't do that. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mad .... again jpeg files...
Hello all, I still having problem when use jpeg functions... I got: testout.jpg is not a valid JPEG file in .. , with follow code: Header(Content-type: image/jpeg); $img=ImageCreateFromJPEG(testout.jpg); ImageJPEG($img,a.jpg); ImageDestroy($img); testout.jpg was one image created by jpeg-6b after make test, I see image directly in browser (machine_name/directory/where/have/code/testout.jpg) the image, my phpinfo gives me information that gd had support for jpeg enabled I try with other *.jpeg files I try this code: Header(Content-type: image/jpeg); $im=ImageCreate(400,200); $bcg = ImageColorAllocate($im,240,240,240); $prt = ImageColorAllocate($im,0,0,0); $rd = ImageColorAllocate($im,255,0,0); ImageFill($im,400,200,$bcg); ImageLine($im,110,85,280,85,$rd); ImageString($im,5,130,90,--- OK ---,$prt); ImageLine($im,110,110,280,110,$rd); ImageJPEG($im,a.jpg); ImageDestroy($im); and the result was an empty a.jpg file . a. If anyone has any idea ... I already dont know what to do T.Y. -- Best Regards Miguel Joaquim Rodrigues Loureiro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] header(Location:blah...) - passing variables
My approach has been to pass an error code back to the original form. form.php: ?php print(form aciton=\formVerify.php\); print(a buncha form crap); if ($errcode==1) print (Your user id is wrong. You suck); if ($errcode==2) print (Your password is wrong. You really suck); print(/form); ? Then in formVerify.php: ?php ...error checking code... if (userID invalid) header(Location: form.php?errcode=1); if (password invalid) header(Location: form.php?errcode=2); else header(Location: goodpage.php); ? You could probably also use cookies to pass the error code back and forth, but that's probably overkill and unreliable. (Sorry if the pseudo-code I used above offends anyone with the use of the word suck; the futile job search has got me really annoyed right now.) At 10:25 AM 12/4/2001, Mark Charette wrote: I cheat and just include the original form on error ... Almost all my input values are set to PHP variables in the form. The 1st time through none are set, so the values are blank. After submitting the form, I check for validity. If there are errors I mark the errors, generate an error string, and include the form. That way all previously typed in data remains in the form without me having to tell the user to hit the back button, and there's no horribly long URL string resetting all those values. There's a bit more work than that (using htmlspecialchars et al.) but if you start creating forms with error checking indication in mind it's really easy to do validation and redisplay if necessary. Mark C. Hi, I wonder if someone could tell me whether or not the following is possible? I have an HTML form which passes a username and password to a PHP script for validation. If either is not valid, I would like it to return to the previous page - carrying with it a variable plus the submitted form information... =-=-=-=-=-=-=-=-= if (strlen ($password1) 4 ) { $err = Password must be more than 4 characters long; header(Location:http://somelocation.php;); // ^-- at the location, the $err and form variables will be available exit; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Sliante, Richard S. Crawford http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupéry Push the button, Max! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mad .... again jpeg files...
Try to specify absolute path to the jpeg - possible php do not look up for jpeg in current folder... (or use './image.jpg') Zliy Pes, http://zliypes.com.ua - Original Message - From: Miguel Loureiro [EMAIL PROTECTED] To: php-gen [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 8:46 PM Subject: [PHP] mad again jpeg files... Hello all, I still having problem when use jpeg functions... I got: testout.jpg is not a valid JPEG file in .. , with follow code: Header(Content-type: image/jpeg); $img=ImageCreateFromJPEG(testout.jpg); ImageJPEG($img,a.jpg); ImageDestroy($img); testout.jpg was one image created by jpeg-6b after make test, I see image directly in browser (machine_name/directory/where/have/code/testout.jpg) the image, my phpinfo gives me information that gd had support for jpeg enabled I try with other *.jpeg files I try this code: Header(Content-type: image/jpeg); $im=ImageCreate(400,200); $bcg = ImageColorAllocate($im,240,240,240); $prt = ImageColorAllocate($im,0,0,0); $rd = ImageColorAllocate($im,255,0,0); ImageFill($im,400,200,$bcg); ImageLine($im,110,85,280,85,$rd); ImageString($im,5,130,90,--- OK ---,$prt); ImageLine($im,110,110,280,110,$rd); ImageJPEG($im,a.jpg); ImageDestroy($im); and the result was an empty a.jpg file . a. If anyone has any idea ... I already dont know what to do T.Y. -- Best Regards Miguel Joaquim Rodrigues Loureiro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] I'm a n00b scum...
And I've just read the tutorial on webmonkey.com on php and now I'm hooked, where can I get more stuff like that on webmonkey? Or would I be better off buying a book on php and if so which do you recommend? -- It's not the job I enjoy, it's the people I run into - Bus Driver. - www.gamerseurope.com - We redesign and the world stops, see the revolution this February. - ICQ: 118713900 MSN: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] header(Location:blah...) - passing variables
It has been my idea to make a function, and pass the fields, then register a global feedback var and then check one by one each required field, or what ever you are trying to verify in the fields. function formCheck ($username,$password,$smellycat) { global $feedback, $username, $password; if (!$username) { $feedback .= Yo! This ain't right ... fix it!; return false; } blah blah blah ... --- Richard S. Crawford [EMAIL PROTECTED] wrote: My approach has been to pass an error code back to the original form. form.php: ?php print(form aciton=\formVerify.php\); print(a buncha form crap); if ($errcode==1) print (Your user id is wrong. You suck); if ($errcode==2) print (Your password is wrong. You really suck); print(/form); ? Then in formVerify.php: ?php ...error checking code... if (userID invalid) header(Location: form.php?errcode=1); if (password invalid) header(Location: form.php?errcode=2); else header(Location: goodpage.php); ? You could probably also use cookies to pass the error code back and forth, but that's probably overkill and unreliable. (Sorry if the pseudo-code I used above offends anyone with the use of the word suck; the futile job search has got me really annoyed right now.) At 10:25 AM 12/4/2001, Mark Charette wrote: I cheat and just include the original form on error ... Almost all my input values are set to PHP variables in the form. The 1st time through none are set, so the values are blank. After submitting the form, I check for validity. If there are errors I mark the errors, generate an error string, and include the form. That way all previously typed in data remains in the form without me having to tell the user to hit the back button, and there's no horribly long URL string resetting all those values. There's a bit more work than that (using htmlspecialchars et al.) but if you start creating forms with error checking indication in mind it's really easy to do validation and redisplay if necessary. Mark C. Hi, I wonder if someone could tell me whether or not the following is possible? I have an HTML form which passes a username and password to a PHP script for validation. If either is not valid, I would like it to return to the previous page - carrying with it a variable plus the submitted form information... =-=-=-=-=-=-=-=-= if (strlen ($password1) 4 ) { $err = Password must be more than 4 characters long; header(Location:http://somelocation.php;); // ^-- at the location, the $err and form variables will be available exit; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Sliante, Richard S. Crawford http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupéry Push the button, Max! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] = dan mccullough Theres no such thing as a problem unless the servers are on fire! __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: I'm a n00b scum...
I strongly reccomend the book called PHP Essentials by Julie C Meloni It's written very simple and at the same time you learn quite good level of PHP Alfredo Markmi6 wrote: And I've just read the tutorial on webmonkey.com on php and now I'm hooked, where can I get more stuff like that on webmonkey? Or would I be better off buying a book on php and if so which do you recommend? -- It's not the job I enjoy, it's the people I run into - Bus Driver. - www.gamerseurope.com - We redesign and the world stops, see the revolution this February. - ICQ: 118713900 MSN: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Extract all fields of a table to vars of same name
Someone came with a very clever solution to simplify the extraction of all fields when doing aselect * from table it's a command that passes all values from the fields on the table to variables of the same name than the field on that table. No need to program it manually, creates all variables with same names as the table fields. Could someone tell me how to do this? Alfredo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Extract all fields of a table to vars of same name
that would be extract() -- http://www.php.net/extract On Tue, Dec 04, 2001 at 01:09:27PM -0700, Baloo :0) wrote: Someone came with a very clever solution to simplify the extraction of all fields when doing aselect * from table it's a command that passes all values from the fields on the table to variables of the same name than the field on that table. No need to program it manually, creates all variables with same names as the table fields. Could someone tell me how to do this? Alfredo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Hank Marquardt [EMAIL PROTECTED] http://web.yerpso.net GPG Id: 2BB5E60C Fingerprint: D807 61BC FD18 370A AC1D 3EDF 2BF9 8A2D 2BB5 E60C *** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD *** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild *** Beginning PHP -- Starts January 7, 2002 *** See http://www.hwg.org/services/classes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] session in https
I am trying to set some sessions variables in an https (SSL): session_start(); ... $row = $results[0]; session_register(myses); if(session_is_registered(myses)){ $myses=array(id=$row[user_id],username=$row[username],password= $row[password]); $myses=serialize($myses); } the to go to another php script in where I want to call my vars i use: a href='.SECURE.delivery.php?sid=.$PHPSESSID.'Please continue/a in the delivery.php I want to call the session vars: session_start(); ... $myses=unserialize($myses); echo Session ID: .$PHPSESSID .NL; echo ID... .$myses[id] . NL; echo username... .$myses[username] . NL; I receive blanks ... although the session is set in the /temp directory. It has a value in it but I don't have permission to read the value of my sess. By the way... I use php4.06 Please help THX Luc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Extract all fields of a table to vars of same name
I do this ... $query = mysql_query(SELECT * FROM foo); $data = mysql_fetch_assoc($query); extract($data); if you need all the rows from the query, do ... $query = mysql_query(SELECT * FROM foo); while($data = mysql_fetch_assoc($query) { extract($data); } Jim Someone came with a very clever solution to simplify the extraction of all fields when doing aselect * from table it's a command that passes all values from the fields on the table to variables of the same name than the field on that table. No need to program it manually, creates all variables with same names as the table fields. Could someone tell me how to do this? Alfredo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] New Page Escape Sequence
On Tuesday 04 December 2001 12:30 am, Manuel Lemos wrote: Hello, Chip wrote: On Monday 03 December 2001 11:02 pm, Robert Samuel White wrote: I wish to take some information out of a database and create a text file with the information, nicely formatted. Does any one know of an escape sequence that works as a new page indicator for printing??? I did some checking into this also, some time back. All the responses I got then were it's not possible to cover all types of printers and OS's available with just a certain escape sequence or other code. If you get a better answer, would you please copy me on it? In theory, the right way to achieve that is to put style attribute in the first paragraph the page that tells to break the page before the paragraph. I know that the attribute exists, but I don't know how many browsers obey it when they print the page. Maybe it is safe to resort to PDF. Regards, Manuel Lemos I know it exists also, it is supposedly supported by the two 'main' browsers, but it doesn't work as expected. I tried the style sheet method, inline and external, and found it works with IE more often then Netscape, and then only sometimes on some printers, but not always, so YMMV. -- Chip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] header(Location:blah...) - passing variables
I'd recommend urlencoding those variables if you're going to do it that way, otherwise you may get some non-sense characters resulting in a bad URL. J Jim wrote: There are many different ways to do this ... 1. Have the same PHP script that validates generate the login page. This way the script always has the correct data and you don't need to pass anything. 2. Header(Location: login.php?err=$erruser=$userpass=$pass); This will work, but the bad password will be visible in the query string. 3. Start a session at the login page and register the variables you need to use on the login page. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: small window scripts in Javascript?
To close the window when the user clicks on the hiperlink type in your HTML tag for Body Body onUnload=Window.close() This will close the present window when the user clicks on the hiperlink. When you close the present window, you need to open a new window (or an existing one) where you will display the new page. Alfredo Wee Chua wrote: Hi all, How could i get rid of the white space and show the picture exactly same size as the window, so it would be perfect fit. What else do I miss in the codes to make the perfect fit size? Also, how can I have the small window close automatically after user clicking on the picture's hyperlink? Any helps will be greatly appreciated. Thanks. Script !-- function displayWindow(url, width, height) { window.open(url,displayWindow,'width=' + width + ',height=' + height +',resizable=0,scrollbars=no,menubar=no,status=no,topmargin=0,leftmargin=0') ; self.close(); } //-- /script a href=javascript:displayWindow('../JPeg/big%20jpeg/Untitled-1.jpg',750,530) regards, Calvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Extract all fields of a table to vars of same name
Someone came with a very clever solution to simplify the extraction of all fields when doing aselect * from table it's a command that passes all values from the fields on the table to variables of the same name than the field on that table. No need to program it manually, creates all variables with same names as the table fields. Could someone tell me how to do this? Alfredo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session in https
Unless you have an unstated purpose for serializing/unserializing, it's not necessary because PHP automatically serializes and unserializes your session variables. Can you see the correct values if you insert the phpinfo() command? If you can that should give you a clue as to how to reference them, if you can't then you aren't setting them correctly. I am trying to set some sessions variables in an https (SSL): session_start(); ... $row = $results[0]; session_register(myses); if(session_is_registered(myses)){ $myses=array(id=$row[user_id],username=$row[username],password= $row[password]); $myses=serialize($myses); } the to go to another php script in where I want to call my vars i use: a href='.SECURE.delivery.php?sid=.$PHPSESSID.'Please continue/a in the delivery.php I want to call the session vars: session_start(); ... $myses=unserialize($myses); echo Session ID: .$PHPSESSID .NL; echo ID... .$myses[id] . NL; echo username... .$myses[username] . NL; I receive blanks ... although the session is set in the /temp directory. It has a value in it but I don't have permission to read the value of my sess. By the way... I use php4.06 Please help THX Luc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Extract data
For a split this simple, I'd recommend using explode(|, $data). split() uses a regex for the first character (and as others have said, the pipe is a metacharacter in a regex, so you'll need to use \| instead of |), whereas explode() is simply literal. explode() will probably be slightly faster, too, since it doesn't need to compile the regex, etc., although the difference will probably be infintesimal. J Dan wrote: Hello guys I'm making poll script that stores data like this: 0|0|0|0|0 But i'm getting this error all the time: Warning: unexpected regex error (14) in c:\program files\apache group\apache\htdocs\eztatic\poll.php on line 25 25: list(q1,q2,q3,q4,q5)= split (|, $answer, 5); Could any help Thank you very much in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session in https
Hi Jim, I included a phpinfo in my script, where can I see the values of them? (in PHPINFO) Luc Jim [EMAIL PROTECTED] wrote in message news:p05101026b832d339af13@[192.168.1.17]... Unless you have an unstated purpose for serializing/unserializing, it's not necessary because PHP automatically serializes and unserializes your session variables. Can you see the correct values if you insert the phpinfo() command? If you can that should give you a clue as to how to reference them, if you can't then you aren't setting them correctly. I am trying to set some sessions variables in an https (SSL): session_start(); ... $row = $results[0]; session_register(myses); if(session_is_registered(myses)){ $myses=array(id=$row[user_id],username=$row[username],password= $row[password]); $myses=serialize($myses); } the to go to another php script in where I want to call my vars i use: a href='.SECURE.delivery.php?sid=.$PHPSESSID.'Please continue/a in the delivery.php I want to call the session vars: session_start(); ... $myses=unserialize($myses); echo Session ID: .$PHPSESSID .NL; echo ID... .$myses[id] . NL; echo username... .$myses[username] . NL; I receive blanks ... although the session is set in the /temp directory. It has a value in it but I don't have permission to read the value of my sess. By the way... I use php4.06 Please help THX Luc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session in https
$HTTP_SESSION_VARS shows you this. I don't remember precisely if or where it appears on phpinfo();, but you can try this to see all registered session variables: pre ?php print_r($HTTP_SESSION_VARS); ? /pre That's a nice way to see any array, BTW. Including $HTTP_SERVER_VARS, $HTTP_POST_VARS, GET, etc... nice one. -- Julio Nobrega Don't eat the yellow snow. Php Geko [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Jim, I included a phpinfo in my script, where can I see the values of them? (in PHPINFO) Luc Jim [EMAIL PROTECTED] wrote in message news:p05101026b832d339af13@[192.168.1.17]... Unless you have an unstated purpose for serializing/unserializing, it's not necessary because PHP automatically serializes and unserializes your session variables. Can you see the correct values if you insert the phpinfo() command? If you can that should give you a clue as to how to reference them, if you can't then you aren't setting them correctly. I am trying to set some sessions variables in an https (SSL): session_start(); ... $row = $results[0]; session_register(myses); if(session_is_registered(myses)){ $myses=array(id=$row[user_id],username=$row[username],password= $row[password]); $myses=serialize($myses); } the to go to another php script in where I want to call my vars i use: a href='.SECURE.delivery.php?sid=.$PHPSESSID.'Please continue/a in the delivery.php I want to call the session vars: session_start(); ... $myses=unserialize($myses); echo Session ID: .$PHPSESSID .NL; echo ID... .$myses[id] . NL; echo username... .$myses[username] . NL; I receive blanks ... although the session is set in the /temp directory. It has a value in it but I don't have permission to read the value of my sess. By the way... I use php4.06 Please help THX Luc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Extract all fields of a table to vars of same name
If you have this select statement: $Query = SELECT First, Second, Third FROM Table1; and you execute the statement like this: $Result = mysql_query($Query); and retrieve a row like this: $Row = mysql_fetch_assoc($Result); then extract the row like this: extract ($Row); you end up with these variables: $First, $Second, $Third containing the value of the respective fields. Fred Baloo :0) [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Someone came with a very clever solution to simplify the extraction of all fields when doing aselect * from table it's a command that passes all values from the fields on the table to variables of the same name than the field on that table. No need to program it manually, creates all variables with same names as the table fields. Could someone tell me how to do this? Alfredo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session in https
Only the old session vars show up when I do print_r($HTTP_SESSION_VARS); In the unsecure http I already registered a session var called $newses. when I go to the secure part I use the same sessionid - session_id($sid); where $sid was part of the url a href=https://domain.com/gotosecure.php?sid=$PHPSESID;Go to secure part/a Once I am in the secure part (Login) I want to register a new sessvar. session_register(myses); if(session_is_registered(myses)){ $myses=array(id=$row[user_id],username=$row[username],password= $row[password]); } and it is this one that I cant get! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]