Re: [PHP] RE: Cannot access file on Network Drive (Windows 2003)
I've been trying to run various entry level functions on the file, like file_exists(), isreadable() etcetera But no matter what I do, I pretty much get the cannot open warnings without much specification as to Why cannot open. So when I do the dbase_open() function, and I've tried all different combinations of paths, backslashes and all, I always get this: Warning: dbase_open() [function.dbase-open]: unable to open database test.dbf in ... *followed by whatever path I put in*. I'm still going to try some more testing using text files, but this is what I'm really get at. On 5/23/07 3:32 PM, Jared Farrish [EMAIL PROTECTED] wrote: Try to simply include() and var_dump() or something. Start from just checking you can access the file first (I'd even start with a test.txtfile), before you inflate the db... Let us know what the error is exactly, as well. What happens? Error? Warning? Blank page? What tells you the script doesn't work? On 5/23/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Tried that too. Used \\Servername\sharename\test.dbf Also used additional backslashes for the escape issue: Servername\\sharename\\test.dbf Still doesn't work! I'm not getting a permissions related issue and I'm doubting it is a permissions issue. I have Full Control given to the system all this is on. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Weird behaviour with move_uploaded_file on CGI version of PHP.
Platform : FreeBSD 6.2 Release with Apache 2.0.59 running PHP 5.2.1_3 CGI under SuExec in FastCGI mode. Issue: move_uploaded_file ALWAYS crfeates uploaded files with Unix permissions 600 (read and write for user only) regardless of ownership, directory or umask settings. This works fine with php installed as a module. Anyone else noticed this? Anything I'm doing wrong? Cheers, Brett. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: Cannot access file on Network Drive (Windows 2003)
I use a Mac OS X Server generally, where I mount network drives to a share point. Everything works therein. Recently I had a need to setup Apache Web Server, PHP mySQL on a Windows 2003 Server we have in the office. There I used the same scripts I was running on Mac OS X to access files on a network drive. But in Windows 2003, I¹m not mounting anything on a share point, I¹m simply referring to the files using actual paths. Whether it¹s a direct X:\ kind of path, or a network path \\servername ... With or without backslashes. This is the first application I setup on the Windows Server to access files on a network drive. On 5/23/07 4:33 PM, Jared Farrish [EMAIL PROTECTED] wrote: So you haven't been able to actually access the drive yet? Are you using any other shared content on network drives that does currently work? On 5/23/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: I've been trying to run various entry level functions on the file, like file_exists(), isreadable() etcetera But no matter what I do, I pretty much get the cannot open warnings without much specification as to Why cannot open. So when I do the dbase_open() function, and I've tried all different combinations of paths, backslashes and all, I always get this: Warning: dbase_open() [function.dbase-open]: unable to open database test.dbf in ... *followed by whatever path I put in*. I'm still going to try some more testing using text files, but this is what I'm really get at.
[PHP] Include file questions
1) Does the filename extension matter? I prefer *.inc? It seems to work fine, but I only see others using *.php 2) Does the include file need an opening ?php and ending ? ? Not big issues, but I am curious. Thanks Stephen
[PHP] PHP needs better funtion organization, naming and parameter specifications. WAS: Form Validation Issues
On Thursday 24 May 2007 00:51, Greg Donald wrote: As I watch PHP de-evolve into Java, I find myself wanting something lighter weight and with a smaller syntax. PHP has long since spawned into something uncontrollable. Compare the number of functions (and its aliases) to eg Ruby. The string functions in particular are absolutely bloated, eg ltrim, trim rtrim - WTF. Why not just have trim() and have the option of specifying whether left/right/both? The same goes for the case-sensitive and case-insensitive versions of functions. Amen. The other thing is why isn't there any consistency with the function names?! It seems they're just randomly picked by whatever developer decided to make it. Isn't there some governing body who can at least make things consistent? Examples: = isset() vs. is_null() htmlentities() vs html_entity_decode() (and why is there htmlentities() and htmlentities both listed here: http://us2.php.net/manual/en/ref.strings.php ) quoted_printable_decode() vs quotemeta() strnatcasecmp - Case insensitive string comparisons using a natural order algorithm strnatcmp - String comparisons using a natural order algorithm strncasecmp - Binary safe case-insensitive string comparison of the first n characters strncmp - Binary safe string comparison of the first n characters strcasecmp - Binary safe case-insensitive string comparison Why do we need all those. Use a 'binary' flag. And secondly, why does this have the word case instead of i like the other string functions use? Why do I have to do this extra function call when I bet a majority of the time this is what you want: $bar = 'HELLO WORLD!'; $bar = ucfirst(strtolower($bar)); // Hello world! Why can't ucfirst() have a parameter to do what I want. arsort() and asort() should be array_sort() and array_sort_reverse() natcasesort() should be array_sort_natural() with parameters to make it case insensitive. Same for the rest of the sort functions. Why isn't unlink() named file_delete() as that's what it does? It's counter-intuitive. Why do we need lchgrp() and chgrp() -- why do I care if it's a link or not? Use a parameter flag if this is really a concern for people. No specific examples, but I know I've run into this stuff before: Sometimes the needle is first, sometimes the haystack is. Sometimes the pattern and subject are out of order. Also simple things like naming conventions: The ereg* functions call it $string, but the preg functions call it $subject Etc... I'm sure I could list easily 50 or 100 more examples here, but the point is that PHP needs some structure and organization and a document/spec that says how functions should be named and the order of parameters, ideally with 'optional' ones to the end (much like they are now in most cases). I would like them all to be prefixed with the general category they're in, so it's easy to find them. Such as array_*, str_*, file_*, date_*etc. I think someone should go through and make proper names for all the current functions, keeping aliases for the existing ones to what they are now (so as not to break everyone's code), but only show the new proper names in the manual so developers don't use the sloppy old names. That would at least start us on the right path to fixing this chaos. BTW, don't get me wrong, I LOVE PHP. I've used it every day for maybe 10 years now. I just don't think the current methodology (or lack thereof) can keep sustaining the growth of the releases. I also think it's increasingly confusing for new users to learn. I'm still confused and always referencing the docs for function names and parameter orders. If there needs to be a governing body for the naming, etc as mentioned, I'm happy to volunteer my time / talent. Contact me off list for resume, etc and set me up an SVN account and I'll bring my machette and get this fixed. :) Daevid Vincent http://daevid.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP needs better funtion organization, naming and parameter specifications. WAS: Form Validation Issues
[snip] ...several valid points... [/snip] Send this all to the developer's list -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Cannot access file on Network Drive (Windows 2003)
On 5/23/07, Jared Farrish [EMAIL PROTECTED] wrote: Oh yeah, and tijnema has a good point: \\compname-x\\offsite\\db\\test.dbf For the escaping issue, you should use compname-x\\offsite\\db\\test.dbf Btw, what does top post mean? Means you are replying at top of the old post, and not, like i do, write a comment undersomething you are referring to. On 5/23/07, Jared Farrish [EMAIL PROTECTED] wrote: Other than permissions, you might be referencing the folder by the local network mapping drive initial, instead of the actual path: X:\\offsite\db\test.dbf == \\compname-x\offsite\db\test.dbf Generally, I like using the computer name and not a mapping. I find this name-based address through the 'My Network Places' folder. I'm not much of a windows networking person, but this might be the problem. Results may vary, but in windows, I think the mappings are by machine only, as mappings (I assume) are local aliases, and must be set or shared among groups of machines to be known. It's probably a permissions thing, though. FWIW -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: If the only tool you have is a hammer, you tend to see every problem as a nail. $$ -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: If the only tool you have is a hammer, you tend to see every problem as a nail. $$ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include file questions
Kevin Murphy [EMAIL PROTECTED] wrote: .inc files have a disadvantage in that if you view the file: http://www.yoursite.com/file.inc you can see the php code. I prefer not to use those just on the off chance that someone can see my code and use that as the basis for figuring out a way to exploit it (especially true of password files, etc). I have a directory at the same level as Doc Root called include and all my includes are in there. These contains login data, passwords etc. I feel safer keeping as much of my code as possible outside of Doc Root. Stephen
[PHP] Manipulate ODS (to openoffice calc)
Hi all, I'm try to use ODS files in PHP. I managed insert tables, elements row, cell, text and contents. When i open a file in openoffice, The rows don't they count as inserted. The problem is when I insert the lines (tags table:row), they who don't appear. When clone some object its appears. Does anybody have an idea? Does anybody know some class what does it use ODS file? tanks ZED -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP needs better funtion organization, naming and parameter specifications. WAS: Form Validation Issues
On Thursday 24 May 2007 04:57, Jay Blanchard wrote: Send this all to the developer's list Too late now. The damage has been done. Fixing all the inconsistencies would either break backward compatibility or introduce a whole raft of yet more aliases. Rasmus should have applied strict controls right from the beginning. Instead what we have now is a hodgepodge of contributors, each with the own naming schemes and a whole bunch of functions with immemorable names. It's a good thing that the PHP manual is so well produced otherwise learning PHP would be a nightmare. -- Crayon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: format date field
SELECT DATE_FORMAT('open', '%m-%d-%Y') FROM your_table_name; -- itoctopus - http://www.itoctopus.com Mike Ryan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am reading in a date field from a mysql database the field on the screen shows up as 2007-05-01 on the screen I would like the field to show 05-01-2007 currently I am issueing the following command print $row['open']; how can I format this field??? while I am at it how can I accept the date field as 05-01-2007; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP needs better funtion organization, naming and parameter specifications. WAS: Form Validation Issues
Send this all to the developer's list Too late now. The damage has been done. Fixing all the inconsistencies would either break backward compatibility or introduce a whole raft of yet more aliases. That's what I suggest: We rename th functions to proper names. Then we make aliases for the existing ones. We only publish the proper (new) names in the docs, so people don't use the old ones anymore. We publish a list of depricated names. Then we say by PHP7, the old ones are no longer supported. It should be effectively a simple search and replace for people to migrate code that's in use. And old code that's not active won't matter by PHP7 timeframe anyways. Rasmus should have applied strict controls right from the beginning. Instead what we have now is a hodgepodge of contributors, each with the own naming schemes and a whole bunch of functions with immemorable names. Agreed. It's a good thing that the PHP manual is so well produced otherwise learning PHP would be a nightmare. Word up yo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Include file questions
1- No 2- Yes -- itoctopus - http://www.itoctopus.com Stephen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 1) Does the filename extension matter? I prefer *.inc? It seems to work fine, but I only see others using *.php 2) Does the include file need an opening ?php and ending ? ? Not big issues, but I am curious. Thanks Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Text-To-Speech Function txt2wav()
I'm cross-posting this on the PHP-VOX and PHP General lists for those of you who were on my old php-vox list on isawit.com and may not have been migrated over. The PHP-VOX project has advanced from alpha to beta status as of today's release of version 0.6.4-18. If anyone on here wants to help test the new version, please check out http://php-vox.sourceforge.net/ or try out the online demo (which shows how simple the PHP source code is) at http://isawit.com/php-vox/. It's based on Flite which, in turn, is based on Festival, and is used with express permission from the original authors, in addition to the license permissions. It installs on any modern Linux distro (at least all we've tested) with a kernel of = 2.4. It *should* also work on BSD-based systems, including MacOS, but I'm not certain, because I haven't tested it yet. It could also be ported to Windows but as of now, there aren't any plans to do so. The installer that's included there works on a lot of systems, but was just thrown together (very shittily by me, I might add) just so that I could streamline some test installations on several boxes without having to hand-hold the installation process. In any case, it's worked for me on 17 different Linux boxes now, including Mandriva 2006.0 Community, Mandrake 9.1, RHEL 3 AES, CentOS 4, Debian Etch, Sarge, and even Woody with an updated kernel. There are other variations, as well, and I'll be testing it on some more distros when I get home in about a half-hour. Just remember, this is a beta, and just came into beta as it is. There are more functions being planned and researched, as well as bug fixes being done as the glitches are discovered. And while it's actually not unsafe to install this on a production box, because it's simply a module that can be commented out of your php.ini, I don't expect any hosting providers to have it available to their customers by morning, that's for sure. If you do download and install it, let me know how it went. If you find any bugs --- and I'm sure you will --- report them on the SourceForge project page. And don't mind the cluttered code. It's also in the process of being revamped. Thanks. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107
[PHP] Help with php server and sockets
i want to set up a php server that can communicate with a client (CLI PHP Script). I can setup the server socket fine. What i need to know is whether it is possible for the client to call a function in the servers php code and the server return the data ready for the client to process?? To start, if anyone could tell me how to use a socket connection from a CLI client to a CLI server to retreive an array (it'll do for now :) if its even possible that is! Sorry if thats not the best explanation! -- View this message in context: http://www.nabble.com/Help-with-php-server-and-sockets-tf3807134.html#a10774853 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Swinging Hammers (was Re: Form Validation Issues)
On May 23, 2007, at 12:24 PM, Robert Cummings wrote: More interesting will be if it still has the greater market share over PHP5 when they declare it dead *lol*. Yeah, I'm wondering about that also. Especially since my webhost, a *very* large company that employs several PHP bigwigs (starts with a Y), has basically said they have no plans to upgrade to a newer version of php... ever. The version they are on is 4.3.11... :P I'm finding the same attitude at a lot of hosting companies I do business with for clients also. Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php