RE: [PHP] mysql_connect does not connect
This whole thread has degraded to the point of: YHBT. YHL. HAND. and I'm not helping it. -Original Message- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 2:33 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] mysql_connect does not connect * Thus wrote Sam Hobbs: > I appreciate your attempts to help, but you must understand that when > attempts to help just cause time to be wasted, then it might be appropriate :sigh: Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php smime.p7s Description: S/MIME cryptographic signature
RE: [PHP] mysql_connect does not connect
:^) too many free cycles. -Original Message- From: Jennifer Goodie [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 2:10 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] mysql_connect does not connect -- Original message from "John Holmes" : -- > Whatever happened to those monthly stat posts? most posts, most posts per > thread, etc...?? Who was doing that? I haven't seen one in a while. > > ---John Holmes... > Bill Doerrfeld http://marc.theaimsgroup.com/?a=9211645541&r=1&w=2 STFA!!! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] inserting timestamp into mysql field
If you are working with a timestamp in some other format, this works well: $ts = date("Y-m-d H:i:s",strtotime($sring_with_timestamp)); If you want to create a timestamp at the execution time, this works well: $ts = date("Y-m-d H:i:s"); Both will generate mysql compatiable date/time stamps. Then do the sql insert/update of your record. -Original Message- From: Chris Dowell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 21, 2004 10:00 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] inserting timestamp into mysql field Not really a MySQL question - the answer happens to be MySQL, but the question asks how to do it in PHP This might still be necessary if the OP is using something like DB_DataObject, as you can't really use NOW() in that situation Try strftime [ http://uk.php.net/strftime - RTFM :) ] - a good format string would be "%Y-%m-%d %H:%M:%S" which will produce -00-00 00:00:00 Marek Kilimajer wrote: > [EMAIL PROTECTED] wrote: > >> Subject: inserting timestamp into mysql field >> >> hi there, >> >> i need to insert a current timestamp into a mysql field when a form is >> posted. >> can anyone suggest a simple way of doing this? i would like to set a >> variable >> in my php script to add into the insert statement. it needs to be in the >> format 00-00-00 00:00:00. > > > insert table set .., date_added = NOW() > > mysql question by the way... > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php smime.p7s Description: S/MIME cryptographic signature
RE: [PHP] Cannot write data in session file
1. logon to the linux image. 2. determine the userid that the webserver runs as (for apache, look in httpd.conf) 3. su to that user 4. cd /tmp. 5. touch temp_file. If the touch works, then contact your sysadm If the touch doesn't work, contact your sysadm to grant write access to /tmp for the user. -Original Message- From: Bo Deng [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 12:24 AM To: [EMAIL PROTECTED] Subject: [PHP] Cannot write data in session file I just move the web pages from windows to linux. But the session variable doesn't work. And I found that in the \tmp directoy, it has sess_(MD5) file,but with empty contents,just 0 byte. BTW, I run a linux virtual host under IBM s390. the code works well in windows and other linux systems(not virtual host). So how to fix it ? Thank you! - Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Strange errors when PHP script called from CRON
Typically problems with scripts failing to run from cron can be tracked back to environment variables. When you run it from the shell, you have the users env variables set. When it runs from cron, it (typically) has a slightly different environment. A simple way to test it is to get your shell environment vars with the 'set' command And then run the 'set' command via cron (or at). You can do something like "at now", enter 'set' and cntl-d. The output will be mailed back to the user that ran the command. Look for differences. They probally are the source. -Original Message- From: Pablo Gosse [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 2:35 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Strange errors when PHP script called from CRON Marek Kilimajer wrote: [snip] >>> Perhaps. Could the data being utilized by the code occasionally have >>> characters that should be escaped, by aren't? Are you escaping all >>> of the escapable characters, especially quotes, both single and >>> double? >> >> >> That's what I was thinking initially, but all code that is submitted >> to or extracted from the database is encoded using the translation >> table from get_html_translation_table plus an additional translation >> which I manually apply to replace ' with \'. >> >> Also, I'm reluctant to think that the problem lies here because once >> a page has been scheduled to be published, it is not removed from >> this schedule unless the owner of the page does so. >> >> Basically, if a page is scheduled to be published, and some data in >> the page caused the error, the error should show up indefinitely, or >> until the person has removed the scheduled publishing of the page, >> since the page will not be removed from the publishing schedule due >> to the error causing the script to stop executing. >> >> Also, if you take a look at the error below in particular, >> >> Parse error: parse error, expecting `')'' in >> /u0/path/to/classes/adodb/adodb-time.inc.php on line 850 LINE 850: >> $_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); >> >> You'll see that this is a portion of code that utilizes no external >> data whatsoever, and is actually in a file (adodb-time.inc.php) which >> is never called by my script, but is called internally by ADODB. >> >> In nearly four years of working with PHP, this is the first time I've >> ever been completely stumped. >> >> Any other ideas? > Is any of the files updated at all? It could be a race condition, > happened to me few times - I upload a file to the server, impatiently > reload the page and get parse error. I reload once again and > everything is fine. [/snip] The files from the ADODB class which are throwing errors have NEVER been updated. The files which I wrote have been updated maybe once or twice in the past four months, but the errors have occurred both before and after the updates. One file threw an error for the first time this morning when including another file, and there are no functions in this file which accept any data as all the data needed is pulled from the database, so that one's really got me thrown for a loop. Any other ideas? Cheers and TIA, Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Good xml to array class?
I've had good success with this one: http://www.devdump.com/phpxml.php -Original Message- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 12:04 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Good xml to array class? * Thus wrote Brent Clements: > I've done searching on google for "xml parsers" and xml to array using php and honestly there are S many. Most of the classes I've taken a look at either aren't finished, or require dom to work. > Converting xml to an array isn't an easy of a task. given: value value How is one to make this into an array? > Either I write my own or I get help from you guys. If you have an sample xml file you wish to convert, you might consider posting. Someone might be able to recognize your pattern and come up with a way to convert it. > > I need it to not rely on DOM since the php which I am dealing with, only has expat compiled in. DOM and expat are two completly differnt things. Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php smime.p7s Description: S/MIME cryptographic signature
RE: [PHP] Virtual Host problem
scan your apache httpd.conf file for the following: User apache Group apache Note the userid and groupid (I use apache). Verify that the index.php files are readable by the apache "User" and "Group". Correct the file ownership and/or change the User/Group that apache runs as. -Original Message- From: Jason Davidson [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 11:42 AM To: a.k.a kioto; [EMAIL PROTECTED] Subject: Re: [PHP] Virtual Host problem your problem, as correctly outputted, is permission based, and as far as i can tell, has nothing to do with PHP.. Jason "a.k.a kioto" <[EMAIL PROTECTED]> wrote: > > Hi all i've try to configure Apache with Virtual Host in the main > configuration file of Apache i have modify like this: > > #NameVirtualHost *:80 > NameVirtualHost * > # > # VirtualHost example: > # Almost any Apache directive may go into a VirtualHost container. > # The first VirtualHost section is used for requests without a known > # server name. > # > > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /usr/local/apache/users/default > ServerName mordoch > > > > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /usr/local/apache/users/mysite > ServerName mysite > > > > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /usr/local/apache/users/brothersite > ServerName brother > > > I have insert a file index.php in all main folder of virtaul host: > /usr/local/apache/users/default/index.php > /usr/local/apache/users/mysite/index.php > /usr/local/apache/users/brothersite/index.php > I have modified the file hosts in etc/hosts. > > 39.244.88.126 mordoch > 127.0.0.1 mordoch > 127.0.0.1 localhost > 127.0.0.1 mysite > 127.0.0.1 brother > > When i try to view with my browser i type on my addressbar > http://localhost i receive a message error like this: > > Warning: Unknown(/usr/local/apache_1.3.31/users/default/index.php): > failed to open stream: Permission denied in Unknown on line 0 > > Warning: (null)(): Failed opening > '/usr/local/apache_1.3.31/users/default/index.php' for inclusion > (include_path='.:/usr/local/php/lib/php') in Unknown on line 0 > > I receive this error for all virtual host that i have create. > The chmod of all folder is set to 777. > What are the reason ? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php smime.p7s Description: S/MIME cryptographic signature
[PHP] Scaling select lists
When working with select lists that grow over time, what are some solutions people have applied to the problem of massive select lists? This is pretty cumbersome for the users to navigate. They end up scrolling up and down and getting annoyed. Example: fred bob ... 800 more I've considered going to dual select boxes like the one @ http://www.philwebb.com/code/list_box.asp Has anyone applied a solution that users appreciated to overcome massive select lists ? _____ Chris Gregors We have the courage to innovate Potestatem Obscuri Lateris Nescis smime.p7s Description: S/MIME cryptographic signature