Re: [PHP] Data and time problem
store the date as a 'unix timestamp', so you can easily compare the stored timestamp with the current timestamp, by doing a simple calculation you can get the duration in minutes without a headache. http://www.php.net/time vk. On Thu, 17 Mar 2005 14:32:48 +0200, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > I have a mysql database where i store a user name and date when he > registered. The date format is like this 2005-03-17 02:41:51. > > How can i found out how many minutes passed from the date he registered till > now. > > Thanks in advance for your help ! > -- vk. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what are {} used for in php?
http://www.wellho.net/question/H1_5.html and try google. vk. On Apr 6, 2005 2:55 PM, Jacques <[EMAIL PROTECTED]> wrote: > I have often seen php code included inside braces. What does this mean or > do? > > Jacques > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- vk. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command-line php in debian/woody
just download the php4-cli deb package and install it, i think this should work, and correct me if it's a stupid idea. and Sarge is ok for me, i'm running a production e-mail server for last 6 months with a heavy load on it, i'm using php4-cli on it for my 'home made' exim4 administration utility, no problem yet!! vk. On Apr 6, 2005 6:40 PM, Robert S <[EMAIL PROTECTED]> wrote: > > Should you ask this at a debian list? > > I tried . . .no luck. I thought that you php folks might know a bit more > about specific versions. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- vk. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $HTTP_POST array
Dear all, Is it possible to pass the entire $HTTP_POST array to a function of a class as a variable? without doing ... $new_classAccount = new classAccount; $msg = $new_classAccount->addAccount($HTTP_POST_VARS['accountName'],$HTTP_POST_VARS['firstName'],$HTTP_POST_VARS['lastName']); is it possible to.. $new_classAccount = new classAccount; $msg = $new_classAccount->addAccount($HTTP_POST); i googled a lot on this but did not find any good code sample. hope somebody can gide me on this. -- vk. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CMS
typo3, it's a good one.. try it ;-) vk. On Tue, 28 Dec 2004 11:00:32 +0100, Javier Leyba <[EMAIL PROTECTED]> wrote: > > Hi > > I'm looking for a good CMS recommendation. > > I've seen comments in opencms and tested a few (Xaraya was good when I read > features but so slow at testing time) but I can't test all and may be other > user experience could reduce my test universe. > > I want a CMS with html code separated from PHP code, fully customizable, > easy to implement and fast... > > Any clue ? > > Thanks in advance > > Javier > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- vk. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] call a function within the same class
Dear all, I recently started PHP OOP and I'm bit confused about best and the most efficient methods when 'declaring a class' and 'calling function', could somebody explain me with following sample code, it would be great.. thanks.. class classLdap{ $rslt = $_POST['rslt']; function ldapConnect($rslt){ .. return $rslt; }// end function ldapConnect function ldapAdd($rslt){ // i want to call ldapConnect($rslt) here what is the best method. $rslt = classLdap::ldapConnect($rslt); //or //(curently i'm doing this way, it's to lengthy) $new_classLdap = new classLdap; $rslt = $new_classLdap->ldapConnect($rslt); //or $rslt = $this->ldapConnect($rslt); }// end function ldapAdd }// end class -- vk. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] call a function within the same class
great!, thanks for the detailed answer. vk. p.s. I hope following URL will be helpfull to php oop beginners.. http://www.zend.com/zend/tut/class-intro.php On Thu, 6 Jan 2005 08:57:48 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]> wrote: > kalinga wrote: > > Dear all, > > I recently started PHP OOP and I'm bit confused about best and the most > > efficient methods when 'declaring a class' and 'calling function', > > could somebody > > explain me with following sample code, it would be great.. > > > > thanks.. > > > > class classLdap{ > > > > $rslt = $_POST['rslt']; > > > > function ldapConnect($rslt){ > > > > .. > > return $rslt; > > }// end function ldapConnect > > > > function ldapAdd($rslt){ > > // i want to call ldapConnect($rslt) here what is the best > > method. > > > > $rslt = classLdap::ldapConnect($rslt); > > This is generally done when you: > A) Don't have an instance of a classLdap to work with. > B) Calling ldapConnect() on the instance you have would cause side effects > to the instance (or other objects) that you don't want to happen in some > unusual case. > > A. does not apply here, as you are in the method of the class, so you have > '$this' which is the instance you have created. > > B. might or might not apply, but it all depends on YOUR application and > what you want it to do... > > > //or > > //(curently i'm doing this way, it's to lengthy) > > > > $new_classLdap = new classLdap; > >$rslt = $new_classLdap->ldapConnect($rslt); > > This can also be used to avoid altering the existing object you have > created -- though it's a bit more expensive than the previous way of doing > that. > > There might be some super RARE case where you really really need an object > instantiated to have it be valid, and you would *HAVE* to do the above. > > But that would be super rare, so this is probably not what you want. > > > //or > > > >$rslt = $this->ldapConnect($rslt); > > > works if you just want to affect *THIS* same object that you have -- In > other words, use $this-> when you are thinking about 'this' object that > you have created and want it to change itself in some way. Kind of like a > "self-help" sort of deal. > > You might not want to assign the result back into $rslt -- depending on > what $rslt actually *IS* which I don't know, since you have it coming in > from $_POST... > > Which you also need to do some checking on, since it's NOT SAFE to accept > $_POST data -- *any* Bad Guy out there could send any nasty thing they > want to your script through $_POST. > > > }// end function ldapAdd > > > > }// end class > > Based on what you are doing, and your experience level, I'd say stick with > the last answer: > > $this->ldapConnect($rslt) > > unless you have a very specific need to use the others. > > Just keep it in the back of your mind that there *ARE* alternatives, so > that, years from now, when you run into one of those weird-o cases where > you need the others, you'll remember that they exist as alternatives. > > -- > Like Music? > http://l-i-e.com/artists.htm > > -- vk. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session data not recorded
have a look here.. http://www.php.net/session scroll down the page you will find some better session handling codings! vk. On 7/18/05, Mark Rees <[EMAIL PROTECTED]> wrote: > ""Alessandro Rosa"" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I have a problem to record session data and I would you > > help me. I suppose there's something I missed in the general > > configurations during the last install, but I can't realize it. > > Review the settings in php.ini. In particular look at the one below, which > means that the session data is persisted by means of cookies. > > ; Whether to use cookies. > session.use_cookies = 1 > > > > > I arranged a couple of simple files handling sessions, to show you my > > problem. > > > > I have a file index.php : > > -- > - > > > > > $_SESSION['user'] = "User"; > > $_SESSION['psw'] = "Psw"; > > > > What happens if you try to echo these variables in index.php? > > > ?> > > > > Go! > > -- > - > > > > and then the file page2.php : > > > > -- > - > > > > > echo $_SESSION['user']; > > echo ""; > > echo $_SESSION['psw']; > > > > ?> > > -- > - > > > > But when page2.php is loaded, then a blank page is displayed. > > > > What's wrong with this? > > Thanks in advance. > > > > Alessandro > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- vk. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Need help with PHP / MySQL connect problem
i recently met samekind of problem, could you pls specify the OS, Apache, Php and MySQL vesrions you are using? vk On 7/18/05, Mark Rees <[EMAIL PROTECTED]> wrote: > "Linda H" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I added the following to the top of my script: > > > > >echo phpinfo(); > > ?> > > > > Got all sorts of environment and path info. Not anything about MySQL, but > I > > didn't see anything that looked obviously wrong, though I don't understand > > a lot of it. > > > > I ried reinstalling MySQL, Apache, and PHP. No change. > > > > Linda > > What does php.ini have for this line > > display_errors = On > > If it's off, set it on. > > Mark > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- vk. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Date function and MySQL
this seems pretty interesting, i'm tring to write a code in php to get those two outputs, but bit confused in counting weeks. could somebody clear me.. "what is the first *date* of the first week of year 2005?" is it "saturday jan 1st 2005" (assuming first week starts from jan 1 of any year) or is it "sunday jan 3rd 2005" (assuming first day of a week is monday) or anything else. thanks vk. On 7/19/05, Arno Coetzee <[EMAIL PROTECTED]> wrote: > Philip Thompson wrote: > > > Hi all. > > > > I have the week number (for example, this is the 29th week of the > > year and it begins on 7/17/05). Does anyone know how to obtain the > > first (and maybe the last) date of the week if you only know the week > > number of the year? Would it be better for me to obtain this in PHP > > or MySQL? or both? > > > > I have researched the archives on a few lists and I know that others > > have asked this same questions, but I have not found a good solution. > > I have also looked on MySQL's "date and time functions" page, but had > > little luck. > > > > Any thoughts would be appreciated. > > ~Philip > > > Hi Philip > > give this a go... i played around with the date functions of mysql > > select date_sub(curdate() , interval (date_format(curdate() , '%w')-1) > day) as firstday , date_add(curdate() , interval (7 - > date_format(curdate() , '%w')) day) as lastday > > it will give you the date of the monday and the sunday of the current week > > hope this solves your problem. > > Arno > > -- > 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] Date function and MySQL
> > > Hi all. > > > > > > I have the week number (for example, this is the 29th week of the > > > year and it begins on 7/17/05). Does anyone know how to obtain the > > > first (and maybe the last) date of the week if you only know the week > > > number of the year? Would it be better for me to obtain this in PHP > > > or MySQL? or both? i did a little coding, try this and give me any comments.. "; echo "Start Date: " . date("j-M-Y (l)",($suts)); echo ""; //518000 = 6 days in seconds echo "Last Date: " . date("j-M-Y (l)",($suts+518400)); echo ""; ?> happy coding vk. > > > > > > I have researched the archives on a few lists and I know that others > > > have asked this same questions, but I have not found a good solution. > > > I have also looked on MySQL's "date and time functions" page, but had > > > little luck. > > > > > > Any thoughts would be appreciated. > > > ~Philip > > > > > Hi Philip > > > > give this a go... i played around with the date functions of mysql > > > > select date_sub(curdate() , interval (date_format(curdate() , '%w')-1) > > day) as firstday , date_add(curdate() , interval (7 - > > date_format(curdate() , '%w')) day) as lastday > > > > it will give you the date of the monday and the sunday of the current week > > > > hope this solves your problem. > > > > Arno > > > > -- > > 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] adding ftp functionality into php
On 7/21/05, Tom Cruickshank <[EMAIL PROTECTED]> wrote: > Hello, > My apologizes in advance if this is the wrong mailing list. > > I have a php module in apache which is missing ftp functionality > (--enable-ftp was not used as an argument on compile time). However, > recompiling php at this time does not give me other options I am looking > for. > > I would like to add php_ftp (or whatever the extension is called) as an > extension in the /usr/local/etc/php/extensions.ini file did you went through this manual page? http://www.php.net/ftp http://www.php.net/manual/en/wrappers.ftp.php get a 'phpinfo()' output and look for the 'FTP' section, if it's enabled thats it!. i have used php ftp for few times, but had never required to configure or compile it specifically. correct me if i'm wrong. ~viraj. > > problem is, i can't seem to find it anywhere. would anyone know? > > Thanks for any assistance! > > Tom > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sessions Issue
did you check the output of "phpinfo()"? if you did not made modifications or manual configurations, the session support should be on in defalt. ~viraj. On 8/1/05, Burhan Khalid <[EMAIL PROTECTED]> wrote: > > On Jul 29, 2005, at 8:07 PM, Tom Ray [Lists] wrote: > > > We built a box about 7 months or so ago using the SuSE 9.1 cd's, > > straight install from the CDs. While I've read that sessions are > > turned on by default, when we try to call on the sessions functions > > (like with phpOpenChat or start_session()) we get calls to > > undefined function errors. This is leading me to belive that > > sessions are disabled for some reason. I need to enable the > > sessions so I have a few questions > > > > 1) Can I do this without recompiling? > > 2) If I can't, how do I recompile this since I used the SuSE cds? > > > > It's SuSE 9.1 running Php 4.3.4 with APache 2.0.49 > > I don't *think* there is a separate module/rpm for sessions, so you > are off to a recompile job. > > While you are it, upgrade your PHP to the latest stable version. > 4.3.4 is quite old. Maybe there is a new package for SuSE that does > it? (not really familiar with SuSE). > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Is gethostbyaddr() slow?
On 8/4/05, Kristen G. Thorson <[EMAIL PROTECTED]> wrote: > I can say from personal experience that gethostbyaddr() and > gethostbyname() can seem almost randomly slow, depending on machine, OS, > software, who knows. I'm not smart enough to figure out the reason why > it can vary so much on machines with nearly the same configuration, but > I can tell you that it works perfectly fast most of the time. Then > there's that other 5% where something makes it slow as molasses. > > I have two machines that are so similar it's not funny, but > gethostbyname() takes 1/10 s on one, and 5 s on the other. I have yet > to figure out what's the difference between them that causing this. > > > kgt > > > > Dotan Cohen wrote: > > >Hi all, I just discovered the gethostbyaddr() function. By reading the > >user contributed notes, I get the impression that either this function > >may cause performance problems, or a user-contributed function based > >upon it may be slow. So, is gethostbyaddr() slow? Is it dangerous? > >Thanks! > > > >Dotan Cohen > >http://lyricslist.com/lyrics/artist_albums/56/bangles.php > >The Bangles Song Lyrics > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Is gethostbyaddr() slow?
On 8/4/05, kalinga <[EMAIL PROTECTED]> wrote: > On 8/4/05, Kristen G. Thorson <[EMAIL PROTECTED]> wrote: > > I can say from personal experience that gethostbyaddr() and > > gethostbyname() can seem almost randomly slow, depending on machine, OS, > > software, who knows. I'm not smart enough to figure out the reason why > > it can vary so much on machines with nearly the same configuration, but > > I can tell you that it works perfectly fast most of the time. Then > > there's that other 5% where something makes it slow as molasses. > > > > I have two machines that are so similar it's not funny, but > > gethostbyname() takes 1/10 s on one, and 5 s on the other. I have yet > > to figure out what's the difference between them that causing this. if you are quering a external host, the bad network conditions may cause delay in results. if your server is connected to a heavily loaded hub/ cheap switch, or the target hosts DNS servers are poorly configured/ slow in responce it adds further delay to your result. try dig/ nslookup on your server for the target hostname/address, you may experience the same delay as with the php function. ~viraj. > > > > > > kgt > > > > > > > > Dotan Cohen wrote: > > > > >Hi all, I just discovered the gethostbyaddr() function. By reading the > > >user contributed notes, I get the impression that either this function > > >may cause performance problems, or a user-contributed function based > > >upon it may be slow. So, is gethostbyaddr() slow? Is it dangerous? > > >Thanks! > > > > > >Dotan Cohen > > >http://lyricslist.com/lyrics/artist_albums/56/bangles.php > > >The Bangles Song Lyrics > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Is gethostbyaddr() slow?
i missed another keypoint.. if you are running unix/linux server, you need to have a properly setup resolv.conf or if you experience a slowness while you quering your own domains, check whether you DNS servers are providing "authoritative" answers to your domains. ~viraj. On 8/4/05, kalinga <[EMAIL PROTECTED]> wrote: > On 8/4/05, kalinga <[EMAIL PROTECTED]> wrote: > > On 8/4/05, Kristen G. Thorson <[EMAIL PROTECTED]> wrote: > > > I can say from personal experience that gethostbyaddr() and > > > gethostbyname() can seem almost randomly slow, depending on machine, OS, > > > > software, who knows. I'm not smart enough to figure out the reason why > > > > it can vary so much on machines with nearly the same configuration, but > > > > I can tell you that it works perfectly fast most of the time. Then > > > there's that other 5% where something makes it slow as molasses. > > > > > > I have two machines that are so similar it's not funny, but > > > gethostbyname() takes 1/10 s on one, and 5 s on the other. I have yet > > > to figure out what's the difference between them that causing this. > > if you are quering a external host, the bad network conditions may > cause delay in results. > > if your server is connected to a heavily loaded hub/ cheap switch, or > the target hosts DNS servers are poorly configured/ slow in responce > it adds further delay to your result. > > try dig/ nslookup on your server for the target hostname/address, you > may experience the same delay as with the php function. > > > ~viraj. > > > > > > > > > > kgt > > > > > > > > > > > > Dotan Cohen wrote: > > > > > > >Hi all, I just discovered the gethostbyaddr() function. By reading the > > > >user contributed notes, I get the impression that either this function > > > >may cause performance problems, or a user-contributed function based > > > >upon it may be slow. So, is gethostbyaddr() slow? Is it dangerous? > > > >Thanks! > > > > > > > >Dotan Cohen > > > >http://lyricslist.com/lyrics/artist_albums/56/bangles.php > > > >The Bangles Song Lyrics > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Is gethostbyaddr() slow?
On 8/4/05, Kristen G. Thorson <[EMAIL PROTECTED]> wrote: > kalinga wrote: > > > if you are quering a external host, the bad network conditions may > > > >cause delay in results. > > > >if your server is connected to a heavily loaded hub/ cheap switch, or > >the target hosts DNS servers are poorly configured/ slow in responce > >it adds further delay to your result. > > > >try dig/ nslookup on your server for the target hostname/address, you > >may experience the same delay as with the php function. > > > > > > > > Thanks for the reply. The problem I had - and that I was trying to > briefly describe - is not quite explained by slow DNS lookup, at least > not so far. I have one script, run on the same machine: > > takes less than 1 second on CLI: > > # php gethostbyname.php > Content-type: text/html > X-Powered-By: PHP/4.3.2 > > gethostbyname(www.imakenews.com) took 0.0010 s and resolved to > 208.254.39.65 > gethostbyname(rssnewsapps.ziffdavis.com) took 0.0005 s and resolved to > 63.87.252.162 > gethostbyname(itpapers.zdnet.com) took 0.1922 s and resolved to > 216.239.113.159 > gethostbyname(rssnewsapps.ziffdavis.com) took 0.0005 s and resolved to > 63.87.252.162 > > > Running CLI again, host names are apparently cached, because then they > all return in .0005 seconds. > > takes 20 seconds under Apache 2.0.46: > > gethostbyname(www.imakenews.com) took 5.0071 s and resolved to > 208.254.39.65 > gethostbyname(rssnewsapps.ziffdavis.com) took 5.0099 s and resolved to > 63.87.252.162 > gethostbyname(itpapers.zdnet.com) took 5.0097 s and resolved to > 216.239.113.159 > gethostbyname(rssnewsapps.ziffdavis.com) took 5.0099 s and resolved to > 63.87.252.162 > > > This will happen consistently, with less than 1/100 s variation in time > for each lookup. > > > Any DNS lookup tools are perfectly fast when run from the command line. > Also, other machines in the same subnet, using the same DNS servers, > using 99% same apache config files (I diff'ed 'em) run just as fast > under same apache/php version as they do command line. It's hard to > imagine what external DNS problem could exist that would affect only one > of our servers, and on that one, only apache/php and nothing command > line. Something else is going on, but my initial tries of > downgrading/upgrading both php and apache haven't made a different yet. > Perhaps you have another suggestion? could you please mention the environment, i mean, the os, and the versions of php? is it binary install or a compile? > > > Thanks, > > kgt > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CPU Usage
with php you can simply create your own system monitoring classes using php snmp functions. mrtg (http://mrtg.org) uses SNMP to manipulate system MIBs and OIDs to retreave device informations. happy PHP SNMP! ~viraj. On 8/12/05, Evert | Rooftop <[EMAIL PROTECTED]> wrote: > Hi All, > > Is there a way to determine the current cpu usage using PHP. I'm mainly > looking for a linux solution, but I would like to expand it to windows > later on. > > Any ideas? The archives weren't any good =( > > Thanks, > Evert > > -- > 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] How to get data from database with a click
try java scripts, there is a function called "onChange()", you can attach this with your combo box and can submit (SELF) the form upon the content change in combobox. I have done this long time back, i'll send you the coding if still i have that script in my archives. Viraj - Original Message - From: Subodh Gupta <[EMAIL PROTECTED]> To: PHP General <[EMAIL PROTECTED]> Sent: Friday, August 15, 2003 2:04 PM Subject: [PHP] How to get data from database with a click > Dear Friends, > > When we click a combo box, in a perticular file, the output from the > database should display in the same screen, in a text box or a combo box (We > want this to happen without pressing the submit button). > > Any clue please > > Subodh > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Friday, August 15, 2003 1:27 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] php, search engine that index via local filesystem? > > > Hi, > > Do you want to provide a web interface to your local file system? well > the easiest would then be to just exec locate, which will make use of > the slocate db. Alternatively you can try to exec find. These can be > done painlessly and you don't have to install any software. > > If you need a more sophisticated solution i belive htdig has the > facility to index from local files. > > If you are looking to build a full fledged search engine aspseek and > mnogosearch (both open source) are some of the best around. > > all the best > > > Louie Miranda wrote: > > >Do you know any? > > > > > >--- - > >Thanks, > >Louie Miranda > > > > > > > > > > > > > > > > > -- > > Raditha Dissanayake > - > http://www.radinks.com/sftp/ > Lean and mean Secure FTP applet with Graphical User Inteface. > just 150 Kilo Bytes > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] undefined variable
did you solve this problem? i checked the coding in my linux box, it's working fine. Viraj Chris Kay wrote: > > You seem confused with POST & GET, instead of using _POST to retrieve > values from the form, you use $senders_name, and further down you set > $_POST["msg"], which will only be used in the same php code on the same > page > > Try > > $msg = "Sender's Full Name:\t" . $_POST['sender_name'] . "\n"; > $msg .="Sender's E-mail:\t" . $_POST['sender_email'] . "\n"; > $msg .="Did you like the site?\t" . $_POST['like_site'] . "\n"; > $msg .="Additional Message:\t" . $_POST['message'] . "\n\n"; > > $mailheaders = "From: yoyo.monash.edu.my\~nthonyak\M\n"; > $mailheaders .="Reply-To: " . $_POST['sender_email'] . "\n\n"; > > mail("[EMAIL PROTECTED]", "Feedback Form", $msg, $mailheaders); > > -- > Chris Kay (CK) > Eleet Internet Services > M: 0415 451 372 > P: 02 4620 5076 > F: 02 4620 7008 > E: [EMAIL PROTECTED] > > -Original Message- > From: merryE [mailto:[EMAIL PROTECTED] > Sent: Friday, 29 August 2003 2:38 AM > To: [EMAIL PROTECTED] > Subject: [PHP] undefined variable > > Can anyone tell me what's wrong with my code? I tried to create a form > in html and redirect it to php. but result said: > Notice: Undefined variable: sender_name in c:\program files\apache > group\apache\htdocs\do_feedback.php on line 2 and for all the variables > ("sender_email", "like_site", and "text area"). > I have been tring to use variable but it is always said "Undefined > variable". > Please help, Thanks. > > This is the code for form > > > your name: > your email: > Did you like the site? > yes > no > > Additional message: > > > > > > Code for php: > $_POST["msg"] = "Sender's Full Name:\t$sender_name\n"; > $_POST["msg"] .="Sender's E-mail:\t$sender_email\n"; > $_POST["msg"] .="Did you like the site?\t$like_site\n"; > $_POST["msg"] .="Additional Message:\t$message\n\n"; > > $_POST["mailheaders"] = "From: yoyo.monash.edu.my\~nthonyak\M\n"; > $_POST["mailheaders"] .="Reply-To: $sender_email\n\n"; > > mail("[EMAIL PROTECTED]", "Feedback Form", $msg, $mailheaders); > > echo $_POST["sender_name"]; > echo "We appreciate your feedback"; > ?> > > -- > 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] web-mail problem
David, first, this is a meassage you are getting from your mail server, not from PHP. according to my knowladge this is due to email address routing problem which the mail server experience when it tries to relay the mail. if you can send me the complete bounce mail message you recieve i'll tell you exactly whats going on there. Viraj Lingua2001 wrote: > > Hi all, > > I am trying to solve a problem related to mail( ). I am not > sure whether it is from SMTP directly or html tags used for html form mail. > I got the following message, and has anyone seen this before? > > * > This email is being returned to you because the remote server would not > or could not accept the message. The registeredsite servers are just > reporting to you what happened and are not the source of the problem. > > The address which was undeliverable is in the section labeled: > "- The following addresses had permanent fatal errors -". > > The reason your mail is being returned to you is in the section labeled: > "- Transcript of Session Follows -". > > The line beginning with "<<<" describes the specific reason your e-mail > could > not be delivered. The next line contains a second error message which is a > general translation for other e-mail servers. > > *** > > Thank you in advance. > > David > > -- > 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] Block HTML Control
Seth, try to mingle PHP and HTML.. that means escape the PHP and jump to HTML when you want the HTML.. like this... happy coding Viraj Seth Willits wrote: > > I'd like to show a big chunk of HTML if a particular variable is true, > and if its false I'd like to show a different big chunk of html. Right > now the only way I know of doing this is: > > if ($var) { > print ' > > > > '; > } else { > print ' > > > > '; > } > > This works, but it destroys the syntax coloring of the html making it > all one solid color. I'd love to know if there's a better way OTHER > than include()ing different files. > > Seth Willits > > --- > President and Head Developer of Freak Software - http://www.freaksw.com > Q&A Columnist for REALbasic Developer Magazine - > http://www.rbdeveloper.com > Webmaster for REALbasic Game Central - http://www.freaksw.com/rbgames > > "Knowledge is limited. Imagination encircles the world." > -- Albert Einstein > > --- > > -- > 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] Block HTML Control
Seth, rgd viraj Seth Willits wrote: > > On Tuesday, September 2, 2003, at 12:06 AM, Seth Willits wrote: > > >> > >> > >> Lots of > >> > >> > > > > Awesome. Thanks for the quick reply. > > Hmm.. Actually, how does this work with php & html? This is actually > what I'm trying to do. I should have said this in the first place, > sorry :) > > if ($thisVar) { > if ($myVar) { > lots; > of; > php; > } else { > > > > } > } > ?> > > Seth Willits > > --- > President and Head Developer of Freak Software - http://www.freaksw.com > Q&A Columnist for REALbasic Developer Magazine - > http://www.rbdeveloper.com > Webmaster for REALbasic Game Central - http://www.freaksw.com/rbgames > > "Read the book! Be patient! All success comes from acquiring knowledge > and experience." > -- Seth Willits > > --- > > -- > 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] Backup Database
you can write a PHP script to backup the DB to a SQL file and run that script using crond at scheduled time or periodiacally as you define in cron regards viraj Shaun wrote: > > Hi, > > Is there a facility out there that I can use to automatically backup my > database to my local machine every night using PHP and MySQL? > > Thanks for your help > > -- > 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] Block HTML Control
you mean after "" ??? no you do not put. just think this way, if you want to diplay the HTML content just jump out by the php code by typing "?>" and back to PHP by " > You do realize that you don't need a semicolon right after correct? > > -Dan > > On Tue, 2003-09-02 at 04:59, Viraj Kalinga Abayarathna wrote: > > Seth, > > try to mingle PHP and HTML.. that means escape the PHP and jump to HTML > > when > > you want the HTML.. like this... > > > > > > > if (!$var) { > > ?> > > > > > >> ; > > } else { > > ?> > > > > > > > } > > ?> > > > > > > happy coding > > > > Viraj > > > > > > > > Seth Willits wrote: > > > > > > I'd like to show a big chunk of HTML if a particular variable is true, > > > and if its false I'd like to show a different big chunk of html. Right > > > now the only way I know of doing this is: > > > > > > if ($var) { > > > print ' > > > > > > > > > > > > '; > > > } else { > > > print ' > > > > > > > > > > > > '; > > > } > > > > > > This works, but it destroys the syntax coloring of the html making it > > > all one solid color. I'd love to know if there's a better way OTHER > > > than include()ing different files. > > > > > > Seth Willits > > > > > > --- > > > President and Head Developer of Freak Software - http://www.freaksw.com > > > Q&A Columnist for REALbasic Developer Magazine - > > > http://www.rbdeveloper.com > > > Webmaster for REALbasic Game Central - http://www.freaksw.com/rbgames > > > > > > "Knowledge is limited. Imagination encircles the world." > > > -- Albert Einstein > > > > > > --- > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Too Advanced? Re: Cookies & Hidden Image
Hi Nicole, You can not retrieve information stored in a cookie which set by one domain from some other domain. Try passing all the information you want with the image SRC tag. regards Viraj Nicole wrote: > > OK. Thanks. > > I have the hidden image code: > > http://thetrackingurl/?param1=val1¶m2=val2&etc... height=0 > width=0 border=0> > > This hidden image code is placed on the ThankYou page that people see after > they have bought something. What it does is load a script on the tracking > site to let the owner know a sale was made. > > The tracking site is different from the site that the product is sold on. > > A cookie was placed on the client's (buyer) side to store where that client > originated from. So when the hidden image is called, the tracking script is > called and tries to access this cookie to retrieve where the buyer came > from. > > But the script just gets a blank cookie when accessed this way(via hidden > image); However, if the script was accessed directly, or the thankyou page > resided on the same domain as the tracking script (which created the cookie > to begin with), the cookie has the value that it was set with. > > Does this make sense? Thanks for any input. PHP's docs on sessions didn't > seem to have anything relating to this situation; so I'm stuck. > > Nicole > > "Chris Shiflett" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > --- Nicole <[EMAIL PROTECTED]> wrote: > > > Is this question too advanced for this newsgroup? > > > > Somehow I doubt it. But, that's a nice tactic for grabbing some attention. > :-) > > > > Show us some sample code of a very small test case. I can't really follow > your > > description of what you are trying to do. > > > > Chris > > > > = > > Become a better Web developer with the HTTP Developer's Handbook > > http://httphandbook.org/ > > -- > 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] Session_start() corrupt HTML output with IE
Hi hecchan, I don't have a crear idea on what your problem is, but i have read an article on phpfreak.com, it says to work the sessioned PHP scripts correctly with IE6 you have to insert.. header("Cache-control: private"); immediatly after starting the session. try this. Viraj p.s. and also if there is any one wo knows what exactly this header line means, please post a brief decription. thanks. hecchan wrote: > > Hi, > Using IE 6 (XP) i can't see the source generated for PHP even the page > works properly (It doesn't happend with Mozilla or Opera). > > If i comment out the line: > session_start() > This behaviour stops. > Any idea what's going on? > > Thanks > > hecchan > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: web-mail problem
Lingua, i thought you solved this problem. any way, i just peep in to the msg you have forward as a zip file. you have tried few diffrent email adresses as the To: one of them is already exceeded the allocated storage space. another one is not exist in yahoo.com, i'll put some extract from that msgs.. <[EMAIL PROTECTED]> (reason: 554 delivery error: dd Sorry, your message to [EMAIL PROTECTED] cannot be delivered. This account is over quota. - mta223.mail.scd.yahoo.com) <[EMAIL PROTECTED]> (reason: 554 delivery error: dd This user doesn't have a yahoo.com account ([EMAIL PROTECTED]) [-5] - mta166.mail.scd.yahoo.com) <[EMAIL PROTECTED]> (reason: 550 Requested action not taken: mailbox unavailable) can you change the To: to my email address and try. it's [EMAIL PROTECTED] or [EMAIL PROTECTED] or [EMAIL PROTECTED] regards Viraj Lingua2001 wrote: > > Hi Viraj and all, > > Did you figure out what is going on with the > returned mails, Viraj? > > Thanks in advance, > > David > > >Thank you for your message. > > >I've attached one ZIP file that contains some of the > >returned mails including the most recent one (one pair: details.txt and > >message4.txt). > > >Thank you very much in advance. > > >David > - Original Message - > From: "Viraj Kalinga Abayarathna" <[EMAIL PROTECTED]> > To: "Lingua2001" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Tuesday, September 02, 2003 3:42 AM > Subject: Re: [PHP] web-mail problem > > David, > > first, this is a meassage you are getting from your mail server, > > not from PHP. > > > > according to my knowladge this is due to email address routing > > problem which the mail server experience when it tries to relay the > > mail. > > if you can send me the complete bounce mail message you recieve > > i'll tell you exactly whats going on there. > > > > Viraj > > - Original Message - > From: "Lingua2001" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, September 02, 2003 12:42 AM > Subject: web-mail problem > > > Hi all, > > > > I am trying to solve a problem related to mail( ). I am not > > sure whether it is from SMTP directly or html tags used for html form > mail. > > I got the following message, and has anyone seen this before? > > > > * > > This email is being returned to you because the remote server would not > > or could not accept the message. The registeredsite servers are just > > reporting to you what happened and are not the source of the problem. > > > > The address which was undeliverable is in the section labeled: > > "- The following addresses had permanent fatal errors -". > > > > The reason your mail is being returned to you is in the section labeled: > > "- Transcript of Session Follows -". > > > > The line beginning with "<<<" describes the specific reason your e-mail > > could > > not be delivered. The next line contains a second error message which is > a > > general translation for other e-mail servers. > > > > *** > > > > Thank you in advance. > > > > David > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session_start() corrupt HTML output with IE
Thank you Curt for the explanation. Viraj Curt Zirzow wrote: > > * Thus wrote Viraj Kalinga Abayarathna ([EMAIL PROTECTED]): > > > >header("Cache-control: private"); > > > > p.s. > > and also if there is any one wo knows what exactly this header line > > means, > > please post a brief decription. thanks. > > private means that only the intended person that is getting this > file is able to cache it. So if you're going through a proxy that > proxy must not cache that file. > > Curt > -- > "I used to think I was indecisive, but now I'm not so sure." > > -- > 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] Linux Issues
Stephen, Try Debian Woody (3.0) with latest stable KDE desktop. You will be ammazed with the GUI, it's like a Dream.. very fancy , smooth and colourfull. regards Viraj Stephen Craton wrote: > > Well, I'm wanting one with a really nice GUI and great functionality. I'll > check into Debian and Slackware later today after church. Any other good > recomendations? > > Thanks, > Stephen Craton > - Original Message - > From: "andu" <[EMAIL PROTECTED]> > Cc: "PHP List" <[EMAIL PROTECTED]> > Sent: Saturday, September 06, 2003 11:02 PM > Subject: Re: [PHP] Linux Issues > > > On Sat, 6 Sep 2003 22:41:29 -0500 > > "Stephen Craton" <[EMAIL PROTECTED]> wrote: > > > > > Thanks for the replies. > > > > > > I've tried both 8.1 and 9.1 versions of Mandrake Linux with no luck (I > > > bought the 8.1 CDs a while back) > > > > > > I've also tried making a floppy disk but still no luck with 8.1. In 9.1, > I > > > can't get the autorun screen to make the floppy disk. > > > > Try another distro, I recommend Slackware or Debian. Another option is to > get one > > of the distros which run from the cd with the option to copy it to hard > drive like > > Knoppix, they have more advanced auto-configuration software. > > > > > > > > Thanks, > > > Stephen Craton > > > > > > - Original Message - > > > From: "Dan Anderson" <[EMAIL PROTECTED]> > > > To: "Stephen Craton" <[EMAIL PROTECTED]> > > > Cc: "PHP List" <[EMAIL PROTECTED]> > > > Sent: Saturday, September 06, 2003 10:09 PM > > > Subject: Re: [PHP] Linux Issues > > > > > > > > > > Oh also make sure you are using /9.1/ and NOT /9.2 RC1/! > > > > > > > > -Dan > > > > > > > > On Sat, 2003-09-06 at 22:51, Stephen Craton wrote: > > > > > Hello, > > > > > > > > > > This isn't really a PHP issue but I have no where else to go to get > help > > > really. Hopefully someone here can still help me. > > > > > > > > > > I am running Windows XP and have decided to install Mandrake Linux > on > > > top of it just for the heck of it. So, Friday I downloaded the latest > ISO > > > files from an FTP server and today I put in the burnt CDs and it takes > me to > > > the boot screen for it. I push enter (as it says to enter the setup) and > it > > > takes me to a blank screen and just sits there, doing nothing except > > > flashing the Caps Lock and Scroll Lock lights on my keyboard. > > > > > > > > > > I went to the online manual for Mandrake and it said to add the text > > > "noauto" which I did for the boot sequence. Same error. Any ideas what's > > > going on and how to fix it? > > > > > > > > > > Thanks, > > > > > Stephen Craton > > > > > > > > -- > > > > 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 > > > > > > > > > > > > > > > > > Regards, Andu Novac > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: goto label
if you are porting an old programme, try using "SWITCH", some time back i successfully ported a lengthy code in to PHP which had many "GOTO"s . Viraj note: also, i had to use some parameter passing mechanism. Justin Patrin wrote: Nitin wrote: Hi all, I was wondering, if there's any way to achieve 'goto "label":' using PHP Thanx for ur time Nitin goto is a very old and broken way of coding. If you ever find yourself in need of a goto, you should re-evaluate how you're doing things. If you're having trouble finding out how to do it better, just ask here. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with INSERT query
insert following... echo $sql; immediatly after the folowing code block.. $sql = "INSERT INTO tutor (tutor_name, tutor_contact,tutor_email,tutor_profile) VALUES ('$tutor_name', '$tutor_contact', '$tutor_email', '$tutor_profile')"; then execute the script, and check whether it show s the correct values for the '$tutor_name', '$tutor_contact', '$tutor_email', '$tutor_profile'. you will note the problem. Viraj [EMAIL PROTECTED] wrote: Hi all, I am trying to do a simple INSERT data into the database using the following php script but the problem here is that whenever I click "submit", the script only insert a "NULL" value into the columns into the datadase instead the value I enter in the forms fieldSELECT query was successful but not INSERT.. A snip of the code are as follow: //set error variable $err .= check_tutor_name(); $err .= check_tutor_contact(); $err .= check_tutor_email(); $err .= check_tutor_profile(); //define connection string $dsn = "mysql://root:[EMAIL PROTECTED]/table1"; //connect to DB $db = DB::connect ($dsn); //check for any DB connection errors if (DB::isError ($db)) die ($db->getMessage()); $tutor_name = $db->quote($POST["tutor_name"]); $tutor_contact = $db->quote($POST["tutor_contact"]); $tutor_email = $db->quote($POST["tutor_email"]); $tutor_profile = $db->quote($POST["tutor_profile"]); $sql = "INSERT INTO tutor (tutor_name, tutor_contact,tutor_email,tutor_profile) VALUES ('$tutor_name', '$tutor_contact', '$tutor_email', '$tutor_profile')"; //execute query statement $result = $db->query($sql);//check for DB query error if( DB::isError($result) ) { die ($result->getMessage()); **HTML** " method="post"> Teacher Name: Contact No: Email: Profile: } So, what could be the problem with the code I have wriiten??? Any help are appreciated. Irin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with INSERT query
VALUES (''irin'', ''788798878'', ''[EMAIL PROTECTED]'', ''no profile'') in above line, note the two quotes, in both side of each value.. this is the cause to your DB syntax error.. correct the above line as follows... ($tutor_name,$tutor_contact,$tutor_email,$tutor_profile)"; and try, but investigate for "why you are getting two quotes instead of one quote. Viraj [EMAIL PROTECTED] wrote: Well, I tried that and this is what i got: INSERT INTO tutor (tutor_name, tutor_contact, tutor_email, tutor_profile) VALUES (''irin'', ''788798878'', ''[EMAIL PROTECTED]'', ''no profile'') DB Error: syntax error well, when I echo again, i can successfully see the values I entered. But this time there's a "DB syntax error" and when I went into the database to view, it stil reflect a "NULL" value... --- On Tuesday 09 December 2003 15:20, [EMAIL PROTECTED] wrote: This is what I get after I "echo" my query statement: INSERT INTO tutor (tutor_name, tutor_contact, tutor_email, tutor_profile) VALUES ('NULL', 'NULL', 'NULL', 'NULL') How come the value is null??? In my INSERT query, I already state my value variable to be the name of the fields in my html. Why is it still inserting "NULL" into the database when I have entered values in the HTML fields? $sql = "INSERT INTO tutor (tutor_name, tutor_contact,tutor_email,tutor_profile) VALUES ('$tutor_name', '$tutor_contact', '$tutor_email', '$tutor_profile')"; What could be the problem?? $tutor_name = $db->quote($POST["tutor_name"]); $tutor_contact = $db->quote($POST["tutor_contact"]); $tutor_email = $db->quote($POST["tutor_email"]); $tutor_profile = $db->quote($POST["tutor_profile"]); You most probably be wanting to use $_POST instead of $POST.
[PHP] Re: [PHP-WIN] [PHP-NIX] File upload
are you uploading the file through a HTML form? if so check the FORM for the following hidden input field... increace the above value (in bytes) to a bit more value than your maximum file size you are tring to upload. happy coding... Vk. Ragnar wrote: > Hi guys/girls, > > I am having some major pain here with a php script handling file uploads. > It's part of an CMS and the file in question takes a PDF, makes a thumbnail > of it and then moves it to it's proper location on the server. > > All this works fine with smaller files < ~ 2 MB. > > I am having a file that needs to be uploaded to the server though, that is > 2.3MB and the script just doesn't handle it. > > I have already increased all the PHP.ini setting (i.e. max_file_size, > max_input_time, max_execution_time etc.) but to no avail. > > All the setting are well beyond of what the actual process takes, and the > script itself doesn't seem to timeout, it just comes back with: > > "Warning: Unable to open 'none' for reading: No such file or directory in > ..." > > which is pointing to the line where the file is copied from it's temp > location on the server /tmp/ to it's proper folder. > It seems to me, the file (temporary) never actually ends up on the server in > the first place. > > As I said above, for smaller files everything works fine. > > All this is running on: > Apache, PHP 4.1.2, Linux > > The increase for the php.ini variables is only made for one of > the domains hosted on that machine via entries in the virtual host part > of the httpd.conf and I checked with phpinfo() wether the variables that > increased via those setting are actually changing accordingly. > All that looked fine. > > Does anyone have an idea what could be going on? > I'd appreciate any help on this, as the client is expecting this to > be fixed ASAP. > > cheers, > > Ben > > -- > "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen! > Jetzt aktivieren unter http://www.gmx.net/info > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-WIN] [PHP-NIX] File upload
can you send me the fread() part of your script? and what is the OS you are tring this? any how i like to share my coding which I did few weeksback for one of my Windows buddy. Vk. Ragnar wrote: > Hi Vk, > > I tried this beforehand, but to no avail. The documentation > also states that this form field entry does not overwrite the > max_filesize_setting in php.ini, when uploading. > > so even if I set the hidden form field to 30MB and the .ini > setting is 8MB the file will be rejected if it's over 8MB. > > I am am wrong on this, let me know. > > > > > are you uploading the file through a HTML form? if so check the FORM for > > the > > following > > hidden input field... > > > > increace the above value (in bytes) to a bit > > more > > value than your maximum > > file size you are tring to upload. > > > > happy coding... > > > > Vk. > > > > > > Ragnar wrote: > > > > > Hi guys/girls, > > > > > > I am having some major pain here with a php script handling file > > uploads. > > > It's part of an CMS and the file in question takes a PDF, makes a > > thumbnail > > > of it and then moves it to it's proper location on the server. > > > > > > All this works fine with smaller files < ~ 2 MB. > > > > > > I am having a file that needs to be uploaded to the server though, that > > is > > > 2.3MB and the script just doesn't handle it. > > > > > > I have already increased all the PHP.ini setting (i.e. max_file_size, > > > max_input_time, max_execution_time etc.) but to no avail. > > > > > > All the setting are well beyond of what the actual process takes, and > > the > > > script itself doesn't seem to timeout, it just comes back with: > > > > > > "Warning: Unable to open 'none' for reading: No such file or directory > > in > > > ..." > > > > > > which is pointing to the line where the file is copied from it's temp > > > location on the server /tmp/ to it's proper folder. > > > It seems to me, the file (temporary) never actually ends up on the > > server in > > > the first place. > > > > > > As I said above, for smaller files everything works fine. > > > > > > All this is running on: > > > Apache, PHP 4.1.2, Linux > > > > > > The increase for the php.ini variables is only made for one of > > > the domains hosted on that machine via entries in the virtual host part > > > of the httpd.conf and I checked with phpinfo() wether the variables that > > > increased via those setting are actually changing accordingly. > > > All that looked fine. > > > > > > Does anyone have an idea what could be going on? > > > I'd appreciate any help on this, as the client is expecting this to > > > be fixed ASAP. > > > > > > cheers, > > > > > > Ben > > > > > > -- > > > "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen! > > > Jetzt aktivieren unter http://www.gmx.net/info > > > > > > -- > > > PHP Windows Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > NEU : GMX Internet.FreeDSL > Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/dsl pab.php Description: application/unknown-content-type-phpfile upload.php Description: application/unknown-content-type-phpfile -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php