php-general Digest 31 Aug 2003 23:38:33 -0000 Issue 2270 Topics (messages 161291 through 161326):
Re: PHP SESSION timeouts 161291 by: Catalin Trifu Re: manual/eng 161292 by: Paul Marinas 161294 by: David 161296 by: David 161298 by: David Re: Help with copy()/uploading a file 161293 by: Catalin Trifu calculating datetime 161295 by: Ryan A 161297 by: Catalin Trifu 161300 by: Ryan A 161303 by: Raditha Dissanayake 161304 by: raditha dissanayake 161305 by: Catalin Trifu 161314 by: Curt Zirzow XML to PHP help 161299 by: Ron Clark 161302 by: Raditha Dissanayake 161306 by: Ron Clark 161310 by: David Otton 161312 by: David Otton Mail() error in logs 161301 by: Mike Morton 161315 by: Curt Zirzow Error Log 161307 by: Seth Willits 161308 by: Catalin Trifu 161309 by: Seth Willits 161311 by: Catalin Trifu installing imagick problems 161313 by: Merlin 161316 by: Curt Zirzow 161317 by: Merlin 161320 by: Curt Zirzow 161323 by: Merlin post values from HTML to PHP 161318 by: Ted Yu 161319 by: Catalin Trifu Input area allowing text formatting 161321 by: Todd Cary 161322 by: Dynamical.biz Re: Using PHP to cache a flash movie 161324 by: Radu Manole Simple File Error 161325 by: Seth Willits 161326 by: Catalin Trifu Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
--- Begin Message ---Hi, No, there is not! You have to manage yourself the timeout, for instance through a timestamp, which you verify on each request. PHP does not destry sessions by itself. It's up to you to manage the "life" of a session. <snip> if($_SESSION['last_seen'] && ($_SESSION['last_seen'] < time() - timeout) { //session is ok proceed } else { //session expired $_SESSION = array();//destroy session //whatever you want to do } </snip> btw! the code above does not take care of the first time a user visits u'r page. Cheers, Catalin "James Johnson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > Can't find this in any of my books. Is there a default for when the > $_SESSION array times out i.e., it's no longer available for the code? > > Thanks, > James
--- End Message ---
--- Begin Message ---try http://www.php.net/download-docs.php u have a link there for diferent languages Paul On Sun, 31 Aug 2003 [EMAIL PROTECTED] wrote: > Hi all, > > I tried to download the manual of php > wget http://www.php.net/manual/en/ > > I got a lot of files but not linked to read off line > the links where all to the website. > > http://www.php.net/manual/en/faq.php > http://www.php.net/manual/en/zend.configuration-macros.php > > Can someone please help me with a site that I can download > the manual of php in a format that I can read off line. > > regards > Metta > > -- > A saying of the Buddha from http://metta.lk/ > Whoever tries to seek happiness without hurting others, can find happiness. > Random Dhammapada Verse 132 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
--- End Message ---
--- Begin Message --- [EMAIL PROTECTED] wrote:Hi all,
I tried to download the manual of php wget http://www.php.net/manual/en/
I got a lot of files but not linked to read off line the links where all to the website.
http://www.php.net/manual/en/faq.php http://www.php.net/manual/en/zend.configuration-macros.php
Can someone please help me with a site that I can download the manual of php in a format that I can read off line.
http://www.php.net/download-docs.php
regards Metta
--- End Message ---
--- Begin Message --- [EMAIL PROTECTED] wrote:Hi all,
I tried to download the manual of php wget http://www.php.net/manual/en/
I got a lot of files but not linked to read off line the links where all to the website.
http://www.php.net/manual/en/faq.php http://www.php.net/manual/en/zend.configuration-macros.php
Can someone please help me with a site that I can download the manual of php in a format that I can read off line.
http://www.php.net/download-docs.php
regards Metta
--- End Message ---
--- Begin Message --- David wrote:
[snip]
Sorry for being trigger happy there :)
--- End Message ---
--- Begin Message ---Hi, Take a look here: http://de2.php.net/manual/en/features.safe-mode.php#ini.open-basedir Basically toy have opne_basedir in effect which means you can only access subdirs of the base dir, which in your case is, (I suppose) /home/.paco/campuscb/campuscorkboard.com/ So take a look in php.ini (if you can access it) Cheers, Catalin "James Johnson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I need some help with the copy() function in order to allow a user to upload an image. The image will need to be in a folder that I can access it's URL for display in a page. The hosting company, www.dreamhost.com, isn't too helpful with my requests for help. I have the following code: $webServer ="/home/campuscb/ftp.campuscorkboard.com/adimages/"; $destFile = $webServer; $destFile .= $img1_name; if($img1_name!=""){ copy("$img1","$destFile") or die("Couldn't copy the file"); } else{ die("No input file specified!$img1_name"); } Dreamhost claims I must have Anon FTP activated in order to use the copy() function. I went ahead and set Anon FTP setup on the server. According to the admin panel, I have the following settings: Path:/home/campuscb/ftp.campuscorkboard.com Directory blocks are on except for Stor When I run it, I get the following message in the browser: Warning: open_basedir restriction in effect. File is in wrong directory in /home/.paco/campuscb/campuscorkboard.com/upload.php on line 28 Couldn't copy the file Any help would be appreciated. Thanks, James
--- End Message ---
--- Begin Message ---Hi, I have a datetime field in my table, i want to enter a datetime 1 day,1 hour and 10 mins into the future from today/the present, how do i calculate that? This is for the expiring links/members part of a script i am trying to create. I have looked around the archive and google but maybe i didnt find the correct thread. Google turned up these revelient results but are not too much help: http://forums.devshed.com/showthread.php?threadid=4238&kw=get+current+date+and+time+of+server useing the date function http://www.phpbuilder.com/mail/php-general/2002062/1026.php (rasmus) now() http://www.phpbuilder.com/mail/php-general/2002062/1033.php (john) This was very helpful but it brings up the other question of is the local php time on the server the same as the one on mysql? Logically it should be but...... http://www.google.com/url?sa=U&start=3&q=http://www.phpbuilder.com/manual/ref.datetime.php&e=7391 Thanks in advance, -Ryan We will slaughter you all! - The Iraqi (Dis)information ministers site http://MrSahaf.com
--- End Message ---
--- Begin Message ---Hi, offset = 1day + 1hour + 10 secs = 24 * 60 * 60 + 60 * 60 + 10 (seconds) time() + offset = the time you need or $now = explode('.', date("d.m.Y.H.i.s", time()); $now is array ( 0 => the day, 1 => the month. aso) add to the elements of the array the values you need then turn it back into a timestamp with mktime() Cheers, Catalin "Ryan A" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I have a datetime field in my table, i want to enter a datetime 1 day,1 hour > and 10 mins into the future from today/the present, how do i calculate that? > > This is for the expiring links/members part of a script i am trying to > create. > > > I have looked around the archive and google but maybe i didnt find the > correct thread. > Google turned up these revelient results but are not too much help: > http://forums.devshed.com/showthread.php?threadid=4238&kw=get+current+date+and+time+of+server > > useing the date function > http://www.phpbuilder.com/mail/php-general/2002062/1026.php (rasmus) > > now() > http://www.phpbuilder.com/mail/php-general/2002062/1033.php (john) > > This was very helpful but it brings up the other question of is the local > php time on the server the same as the one on mysql? Logically it should be > but...... > http://www.google.com/url?sa=U&start=3&q=http://www.phpbuilder.com/manual/ref.datetime.php&e=7391 > > > > Thanks in advance, > -Ryan > > > We will slaughter you all! - The Iraqi (Dis)information ministers site > http://MrSahaf.com
--- End Message ---
--- Begin Message ---Hi, Thanks for replying. Am a bit confused even after your example as to how to enter this into the datetime field in mysql so that i can compare it to the present datetime heres the code i made based on what you said: <?php $day=2; $hour=2; $seconds=05; $theDay=24*60*60; $theHour=60*60; //$theSec=$seconds; $FinalDay=$day*$theDay; $FinalHour=$hour*theHour; $offset=$FinalDay + $FinalHour + $seconds; $FinalTime=time() + $offset; print time(); echo "<br><br>"; print $FinalTime; echo "<br><br>"; $Result=mktime($FinalTime); echo $Result;//gives a warning or error ?> Its giving me a number based on the above that is correctly higher than time() but how do i enter that into mysql for a comparision? eg: my table structure in mysql is so: present_day datetime expire_day datetime filename varchar(50) (my logic) if ($present_day - $expire_day <= 0) {echo "link expired";} //else //give file Kindly reply, -Ryan > Hi, > > offset = 1day + 1hour + 10 secs = 24 * 60 * 60 + 60 * 60 + 10 (seconds) > time() + offset = the time you need > or > $now = explode('.', date("d.m.Y.H.i.s", time()); > $now is array ( 0 => the day, 1 => the month. aso) > add to the elements of the array the values you need > then turn it back into a timestamp with mktime() > > Cheers, > Catalin > > "Ryan A" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > I have a datetime field in my table, i want to enter a datetime 1 day,1 > hour > > and 10 mins into the future from today/the present, how do i calculate > that? > > > > This is for the expiring links/members part of a script i am trying to > > create. > > > > > > I have looked around the archive and google but maybe i didnt find the > > correct thread. > > Google turned up these revelient results but are not too much help: > > > http://forums.devshed.com/showthread.php?threadid=4238&kw=get+current+date+and+time+of+server > > > > useing the date function > > http://www.phpbuilder.com/mail/php-general/2002062/1026.php (rasmus) > > > > now() > > http://www.phpbuilder.com/mail/php-general/2002062/1033.php (john) > > > > This was very helpful but it brings up the other question of is the local > > php time on the server the same as the one on mysql? Logically it should > be > > but...... > > > http://www.google.com/url?sa=U&start=3&q=http://www.phpbuilder.com/manual/ref.datetime.php&e=7391 > > > > > > > > Thanks in advance, > > -Ryan > > > > > > We will slaughter you all! - The Iraqi (Dis)information ministers site > > http://MrSahaf.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >
--- End Message ---
--- Begin Message --- Hello Ryan,
If you find the php date time functions not to your liking you will finder more easy to understand version in mysql.
all the best
Ryan A wrote:
Hi, Thanks for replying.
Am a bit confused even after your example as to how to enter this into the datetime field in mysql so that i can compare it to the present datetime
heres the code i made based on what you said: <?php $day=2; $hour=2; $seconds=05;
$theDay=24*60*60; $theHour=60*60; //$theSec=$seconds;
$FinalDay=$day*$theDay; $FinalHour=$hour*theHour;
$offset=$FinalDay + $FinalHour + $seconds; $FinalTime=time() + $offset;
print time(); echo "<br><br>"; print $FinalTime; echo "<br><br>"; $Result=mktime($FinalTime); echo $Result;//gives a warning or error ?>
Its giving me a number based on the above that is correctly higher than time() but how do i enter that into mysql for a comparision?
eg: my table structure in mysql is so: present_day datetime expire_day datetime filename varchar(50)
(my logic) if ($present_day - $expire_day <= 0) {echo "link expired";} //else //give file
Kindly reply, -Ryan
-- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads.
--- End Message ---
--- Begin Message --- Why am i saying 'finder' ? not enough coffee :-) i meant find a.
Raditha Dissanayake wrote:Hello Ryan,
If you find the php date time functions not to your liking you will finder more easy to understand version in mysql.
all the best
Ryan A wrote:
Hi, Thanks for replying.
Am a bit confused even after your example as to how to enter this into the
datetime field in mysql so that i can compare it to the present datetime
heres the code i made based on what you said: <?php $day=2; $hour=2; $seconds=05;
$theDay=24*60*60; $theHour=60*60; //$theSec=$seconds;
$FinalDay=$day*$theDay; $FinalHour=$hour*theHour;
$offset=$FinalDay + $FinalHour + $seconds; $FinalTime=time() + $offset;
print time(); echo "<br><br>"; print $FinalTime; echo "<br><br>"; $Result=mktime($FinalTime); echo $Result;//gives a warning or error ?>
Its giving me a number based on the above that is correctly higher than time() but how do i enter that into mysql for a comparision?
eg: my table structure in mysql is so: present_day datetime expire_day datetime filename varchar(50)
(my logic) if ($present_day - $expire_day <= 0) {echo "link expired";} //else //give file
Kindly reply, -Ryan
--
Raditha Dissanayake ------------------------------------------------------------- http://www.radinks.com/sftp/ Lean and mean Secure FTP applet with Graphical User Inteface. just 150 Kilo Bytes
--- End Message ---
--- Begin Message ---Hi, You have to take into consideration the behaviour of the datetime data type in MySQL. Look at the documentation http://www.mysql.com/doc/en/DATETIME.html I think the field type you need should be TIMESTAMP(14) since you can use some MySQL functions to easily check for expired data. also see the php manual for mktime : http://de.php.net/manual/en/function.mktime.php As you will notice you didn't exactly used it like you should have, hence the error Hope this helps, Catalin "Ryan A" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > Thanks for replying. > > Am a bit confused even after your example as to how to enter this into the > datetime field in mysql so that i can compare it to the present datetime > > heres the code i made based on what you said: > <?php > $day=2; > $hour=2; > $seconds=05; > > $theDay=24*60*60; > $theHour=60*60; > //$theSec=$seconds; > > $FinalDay=$day*$theDay; > $FinalHour=$hour*theHour; > > $offset=$FinalDay + $FinalHour + $seconds; > $FinalTime=time() + $offset; > > print time(); echo "<br><br>"; > print $FinalTime; echo "<br><br>"; > $Result=mktime($FinalTime); > echo $Result;//gives a warning or error > ?> > > Its giving me a number based on the above that is correctly higher than > time() but how do i enter that into mysql for a comparision? > > eg: > my table structure in mysql is so: > present_day datetime > expire_day datetime > filename varchar(50) > > (my logic) > if ($present_day - $expire_day <= 0) > {echo "link expired";} > //else > //give file > > Kindly reply, > -Ryan > > > > Hi, > > > > offset = 1day + 1hour + 10 secs = 24 * 60 * 60 + 60 * 60 + 10 > (seconds) > > time() + offset = the time you need > > or > > $now = explode('.', date("d.m.Y.H.i.s", time()); > > $now is array ( 0 => the day, 1 => the month. aso) > > add to the elements of the array the values you need > > then turn it back into a timestamp with mktime() > > > > Cheers, > > Catalin > > > > "Ryan A" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > Hi, > > > I have a datetime field in my table, i want to enter a datetime 1 day,1 > > hour > > > and 10 mins into the future from today/the present, how do i calculate > > that? > > > > > > This is for the expiring links/members part of a script i am trying to > > > create. > > > > > > > > > I have looked around the archive and google but maybe i didnt find the > > > correct thread. > > > Google turned up these revelient results but are not too much help: > > > > > > http://forums.devshed.com/showthread.php?threadid=4238&kw=get+current+date+and+time+of+server > > > > > > useing the date function > > > http://www.phpbuilder.com/mail/php-general/2002062/1026.php (rasmus) > > > > > > now() > > > http://www.phpbuilder.com/mail/php-general/2002062/1033.php (john) > > > > > > This was very helpful but it brings up the other question of is the > local > > > php time on the server the same as the one on mysql? Logically it should > > be > > > but...... > > > > > > http://www.google.com/url?sa=U&start=3&q=http://www.phpbuilder.com/manual/ref.datetime.php&e=7391 > > > > > > > > > > > > Thanks in advance, > > > -Ryan > > > > > > > > > We will slaughter you all! - The Iraqi (Dis)information ministers site > > > http://MrSahaf.com > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > >
--- End Message ---
--- Begin Message ---* Thus wrote Ryan A ([EMAIL PROTECTED]): > Hi, > I have a datetime field in my table, i want to enter a datetime 1 day,1 hour > and 10 mins into the future from today/the present, how do i calculate that? Your using mysql right? Just use mysql's date_add function: date_add(now(), interval '1 1:10:0' DAY_SECOND) Couldn't get any simpler :) http://www.mysql.com/doc/en/Date_and_time_functions.html Curt -- "I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---Hello all, Does anyone have a script, or know where to find a working script to pull backend.php files from a site, parse them into a html type file, and display them correctly? I have been working on one for my site for some time now, and I cannot sem to get it right. I want to see the structure of a working script and compare it to my own. Thanks, Ron Clark
--- End Message ---
--- Begin Message --- hi Ron,
There's no way you can retrieve the php on a remote server (unless of course they have a major security flow :-) )
Ron Clark wrote:
Hello all,
Does anyone have a script, or know where to find a working script to pull backend.php files from a site, parse them into a html type file, and display them correctly? I have been working on one for my site for some time now, and I cannot sem to get it right. I want to see the structure of a working script and compare it to my own.
Thanks, Ron Clark
-- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads.
--- End Message ---
--- Begin Message ---No, what I'm looking for is a script that will download the backend.php file like you get from slashdot.org, and turn it into a readable html file that can be insterted into another php file. Make sense? Thanks, RC -----Original Message----- From: Raditha Dissanayake [mailto:[EMAIL PROTECTED] Sent: Sunday, August 31, 2003 11:20 AM To: Ron Clark; [EMAIL PROTECTED] Subject: Re: [PHP] XML to PHP help hi Ron, There's no way you can retrieve the php on a remote server (unless of course they have a major security flow :-) ) Ron Clark wrote: >Hello all, > >Does anyone have a script, or know where to find a working script to >pull backend.php files from a site, parse them into a html type file, >and display them correctly? I have been working on one for my site for >some time now, and I cannot sem to get it right. I want to see the >structure of a working script and compare it to my own. > >Thanks, >Ron Clark > > > -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads.
--- End Message ---
--- Begin Message ---On Sun, 31 Aug 2003 11:20:23 -0500, you wrote: >No, what I'm looking for is a script that will download the backend.php >file like you get from slashdot.org, and turn it into a readable html >file that can be insterted into another php file. Make sense? Not really. Forget about the file extension (php, html, etc). Doesn't matter once you're off the server. What is the /content/ of the file you're trying to recover? Sounds like you're screen-scraping HTML. Getting the file should be a one-liner, but depending on what you want to do, parsing it might be more complex. (slashdot's scripts are Perl writing out static HTML every five minutes, anyway. It doesn't have a "backend.php")
--- End Message ---
--- Begin Message ---On Sun, 31 Aug 2003 11:20:23 -0500, you wrote: >No, what I'm looking for is a script that will download the backend.php >file like you get from slashdot.org, and turn it into a readable html >file that can be insterted into another php file. Make sense? Oh, hey, wait a sec - XML, backend... are you trying to parse an RSS feed? Try this http://magpierss.sourceforge.net/
--- End Message ---
--- Begin Message ---Hey there - quick question - until a week ago, the mail() function I am using to email confirmations was working fine, now the following error is showing up in the logs: Aug 31 11:50:26 www2 sendmail[29579]: h7VFoQc7029579: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA This error shows up for each mail going out - no matter where it is going to - and that could be one of 4 addresses (an internal, the customers email, and 2 external addresses including a hotmail account). Is this a php thing that I am missing a setting for the mail() function? Or is this a problem with the local mail server perhaps? The following are the settings (on OS X btw): ini_set(sendmail_path, "/usr/sbin/sendmail -t -f mail.vtc.com"); $headers = "From: VTC Orders <[EMAIL PROTECTED]>\r\n"; $subject="Order Confirmation from VTC"; $body="A bunch of things that will have no affect on the the email it's self"; mail("[EMAIL PROTECTED]",$subject,$body,$headers); I am not aware of anything that has changed since this worked last (actually about 3 days ago) except that the company has messed with their internal mail server - still - this error is showing for ALL emails going out - not just the ones being delivered internally - and their internal mail server is running on an entirely different server anyhow. So - is there something that I am missing - and if it is not a php error just say so WITHOUT FLAMES and I will check it out somewhere else. TIA. -- Cheers Mike Morton **************************************************** * * Tel: 905-465-1263 * Email: [EMAIL PROTECTED] * **************************************************** "Indeed, it would not be an exaggeration to describe the history of the computer industry for the past decade as a massive effort to keep up with Apple." - Byte Magazine Given infinite time, 100 monkeys could type out the complete works of Shakespeare. Win 98 source code? Eight monkeys, five minutes. -- NullGrey
--- End Message ---
--- Begin Message ---* Thus wrote Mike Morton ([EMAIL PROTECTED]): > Hey there - quick question - until a week ago, the mail() function I am > using to email confirmations was working fine, now the following error is > showing up in the logs: > > Aug 31 11:50:26 www2 sendmail[29579]: h7VFoQc7029579: localhost [127.0.0.1] > did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA Sounds like a sendmail issue. > > So - is there something that I am missing - and if it is not a php error > just say so WITHOUT FLAMES and I will check it out somewhere else. Yea, mabey the sendmail list. I did a quick search on the error (with not much results) but there are some comments that this indicates that your connection is dropping early. Curt -- "I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message --- This may be obvious, but I even looked in a few books and didn't see it, but where are PHP errors logged? No errors ever appear on the page yet the online documentation refers to error messages and such, so I'm assuming there must be some log somewhere.
Thanks,
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
"Few are those who see with their own eyes and feel with their own hearts."
-- Albert Einstein
------------------------------------------------------------------------ ---
--- End Message ---
--- Begin Message ---Hi, Look at the php.ini file. There you can define how and where to store the errors, also the level of errors youn want to show Cheers, Catalin "Seth Willits" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This may be obvious, but I even looked in a few books and didn't see > it, but where are PHP errors logged? No errors ever appear on the page > yet the online documentation refers to error messages and such, so I'm > assuming there must be some log somewhere. > > Thanks, > > 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 > > "Few are those who see with their own eyes and feel with their own > hearts." > -- Albert Einstein > ------------------------------------------------------------------------ > ---
--- End Message ---
--- Begin Message --- On Sunday, August 31, 2003, at 09:38 AM, Catalin Trifu wrote:
Look at the php.ini file. There you can define how and where to store the errors, also the level of errors youn want to show
This may come as a really big shock, but, I have no php.ini file. I just searched my entire hard drive and it's not there. I'm running on OS X and am using the built-in Apache web server. Crazy...
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
"Often, by taking a chance, you either lose it or gain from it. If you have
nothing to lose, why hesitate? Not pursuing the things you want in
life only lets the opportunity to obtain them pass you by."
-- Seth Willits
------------------------------------------------------------------------ ---
--- End Message ---
--- Begin Message ---make a script with just phpinfo() in it and see the output to from where the php should get the php.ini download a php.ini-dist from www.php.net and go for it Cheers, Catalin "Seth Willits" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sunday, August 31, 2003, at 09:38 AM, Catalin Trifu wrote: > > > Look at the php.ini file. > > There you can define how and where to store the errors, > > also the level of errors youn want to show > > This may come as a really big shock, but, I have no php.ini file. I > just searched my entire hard drive and it's not there. I'm running on > OS X and am using the built-in Apache web server. Crazy... > > > 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 > > "Often, by taking a chance, you either lose it or gain from it. If you > have > nothing to lose, why hesitate? Not pursuing the things you want in > life only lets the opportunity to obtain them pass you by." > -- Seth Willits > ------------------------------------------------------------------------ > ---
--- End Message ---
--- Begin Message --- Hi there,
I am having trouble to install imagemagick. It requires to
8) rm ./configure 9) ./buildconf
the proble is, that somehow libtool will not install. It requires automake and I have installed this (see below), but does not change anything.
OUtput: SARATOGA:/home/sw # rpm --install automake-1.4p1-1.src.rpm SARATOGA:/home/sw # rpm --install libtool-1.4.3-6.x86_64.rpm error: failed dependencies: automake >= 1.4p1 is needed by libtool-1.4.3-6 libtool-libs = 1.4.3-6 is needed by libtool-1.4.3-6 SARATOGA:/home/sw #
Has anybody a good idea on how to solve this?
Thanx,
Merlin
--- End Message ---
--- Begin Message ---* Thus wrote Merlin ([EMAIL PROTECTED]): > Hi there, > > I am having trouble to install imagemagick. It requires to > > 8) rm ./configure > 9) ./buildconf You shouldn't be removing the configure script, and remaking one. If this is the case I would suggest doing a rm -fR imagemagick/ then build php --with-gd Curt -- "I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message --- hmmmm. I see your point.
Imagemagick does not need to rebuild the configure, but the pear extension:
5) cd /usr/src/php/ext/imagick
6) phpize
7) cd /usr/src/php
8) rm ./configure
9) ./buildconf
10) run configure as you normally would and add --with-imagick
If Imagemagick is installed in a non standard dir, add this dir to --with-imagick=dir
If you want GraphicsMagick instead of ImageMagick as backend, add --with-imagick-gm
11) make
12) make install
I need to be able to convert gifs to jpegs. GD cant do thsi, right?
Merlin
Curt Zirzow wrote:
* Thus wrote Merlin ([EMAIL PROTECTED]):
Hi there,
I am having trouble to install imagemagick. It requires to
8) rm ./configure 9) ./buildconf
You shouldn't be removing the configure script, and remaking one.
If this is the case I would suggest doing a rm -fR imagemagick/ then build php --with-gd
Curt
--- End Message ---
--- Begin Message ---* Thus wrote Merlin ([EMAIL PROTECTED]): > hmmmm. I see your point. > > Imagemagick does not need to rebuild the configure, but the pear extension: > > 5) cd /usr/src/php/ext/imagick > 6) phpize Ahh.. that explains it all :) > > I need to be able to convert gifs to jpegs. GD cant do thsi, right? Sure can: $im = imagecreatefromgif('/path/to/image.gif'); imagejpeg($im, '/path/to/converted.jpg'); You just cant use the imagegif() function unless you use a version of gd < 1.6. Curt -- "I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---> Sure can: > > $im = imagecreatefromgif('/path/to/image.gif'); > imagejpeg($im, '/path/to/converted.jpg');
Thank you sooooooooooooooo much! I was completly sure that due to the lizence claims it was not possible with gd > 1.6
This solves lots of my problems.
Have a great day,
merlin
Curt Zirzow wrote:* Thus wrote Merlin ([EMAIL PROTECTED]):
hmmmm. I see your point.
Imagemagick does not need to rebuild the configure, but the pear extension:
5) cd /usr/src/php/ext/imagick 6) phpize
Ahh.. that explains it all :)
I need to be able to convert gifs to jpegs. GD cant do thsi, right?
Sure can:
$im = imagecreatefromgif('/path/to/image.gif'); imagejpeg($im, '/path/to/converted.jpg');
You just cant use the imagegif() function unless you use a version of gd < 1.6.
Curt
--- End Message ---
--- Begin Message ---Hi, I found that $_POST['name'] is empty inside my PHP script whose previous HTML page has the following: <input type="text" name="name"> How can I retrieve values in input fields ? Thanks
--- End Message ---
--- Begin Message ---Hi, Did you use a <FORM action='script.php' method='POST'> in HTML ? Notice the POST method. You can also use $_REQUEST, which hold all variable posted, either by POST or GET. Cheers, Catalin "Ted Yu" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I found that $_POST['name'] is empty inside my PHP script whose previous > HTML page has the following: > <input type="text" name="name"> > How can I retrieve values in input fields ? > Thanks
--- End Message ---
--- Begin Message ---
I would like to provide the surfer with a text input area that would give a means of using bold, underline and different text colors. Can this be done with PHP?
Todd
--
<<inline: NewLogo.gif>>
--- End Message ---
--- Begin Message ---http://www.interactivetools.com/products/htmlarea/ this is not concerning php but javascript -----Mensaje original----- De: Todd Cary [mailto:[EMAIL PROTECTED] Enviado el: domingo, 31 de agosto de 2003 21:18 Para: [EMAIL PROTECTED] Asunto: [PHP] Input area allowing text formatting I would like to provide the surfer with a text input area that would give a means of using bold, underline and different text colors. Can this be done with PHP? Todd --
--- End Message ---
--- Begin Message ---You can try to place the swf into a frame or div so browser will cache it. The next request will read the swf from cache (assuming that you are not requesting the flash file using some variables) ----- Original Message ----- From: "Catalin Trifu" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, August 30, 2003 5:29 PM Subject: [PHP] Re: Using PHP to cache a flash movie > > Hello, > > > > Does anyone know a method in which I can load a large flash movie in the background and only when it is done, play it. In the mean time, the user should be able to carry on surfing normally. > > > > Any ideas? > > > > Thank you, > > > > - Sid > > > > Hi, > > Simply put you can not! if the user moves from one page to another, > the old request goes bye! bye! > > Cheers, > Catalin > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message --- Warning: imagejpeg(): Unable to open 'thumbnails/marching/years/2000/Miscellaneous/24left.jpg' for writing in /Library/WebServer/Documents/pictures/list.php on line 28
I'm looping through a directory and creating thumbnail images and in doing so, I get the error above for each image. The code I'm using to resize and create the image is below (it's an example from php.net) and the parameters are as follows:
$forcedwidth = 100 $forcedheight = 100 $sourcefile = 'marching/years/2000/Miscellaneous/24left.jpg' $destfile = 'thumbnails/marching/years/2000/Miscellaneous/24left.jpg' $imgcomp = 50
Both directories exist as does the source file. Which makes me wonder, will the library create a directory if it doesn't exist?
function resampimagejpg($forcedwidth, $forcedheight, $sourcefile, $destfile, $imgcomp) {
$g_imgcomp=100-$imgcomp;
$g_srcfile=$sourcefile;
$g_dstfile=$destfile;
$g_fw=$forcedwidth;
$g_fh=$forcedheight;
$g_is=getimagesize($g_srcfile);
if (file_exists($g_srcfile)) {
/////////////// Set Image Size ///////////////////
if(($g_is[0]-$g_fw)>=($g_is[1]-$g_fh)) {
/// Width is Greater Than Or Equal to Height
$g_iw=$g_fw;
$g_ih=($g_fw/$g_is[0])*$g_is[1];
} else {
/// Height is Greater than Width
$g_ih=$g_fh;
$g_iw=($g_ih/$g_is[1])*$g_is[0];
}
////////////// Create Thumbnail ///////////////////
$img_src=imagecreatefromjpeg($g_srcfile);
$img_dst=imagecreate($g_iw, $g_ih);
imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $g_iw, $g_ih, $g_is[0], $g_is[1]);
imagejpeg($img_dst, $g_dstfile, $g_imgcomp);
imagedestroy($img_dst);
} else
return false;
}
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
"Few are those who see with their own eyes and feel with their own hearts."
-- Albert Einstein
------------------------------------------------------------------------ ---
--- End Message ---
--- Begin Message ---Hi, Does the user under wich the Apache server runs (implicitly PHP) has write access to those directories ? Cheers, Catalin "Seth Willits" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Warning: imagejpeg(): Unable to open > 'thumbnails/marching/years/2000/Miscellaneous/24left.jpg' for writing > in /Library/WebServer/Documents/pictures/list.php on line 28 > > I'm looping through a directory and creating thumbnail images and in > doing so, I get the error above for each image. The code I'm using to > resize and create the image is below (it's an example from php.net) and > the parameters are as follows: > > $forcedwidth = 100 > $forcedheight = 100 > $sourcefile = 'marching/years/2000/Miscellaneous/24left.jpg' > $destfile = 'thumbnails/marching/years/2000/Miscellaneous/24left.jpg' > $imgcomp = 50 > > > Both directories exist as does the source file. Which makes me wonder, > will the library create a directory if it doesn't exist? > > > function resampimagejpg($forcedwidth, $forcedheight, $sourcefile, > $destfile, $imgcomp) { > $g_imgcomp=100-$imgcomp; > $g_srcfile=$sourcefile; > $g_dstfile=$destfile; > $g_fw=$forcedwidth; > $g_fh=$forcedheight; > $g_is=getimagesize($g_srcfile); > > if (file_exists($g_srcfile)) { > /////////////// Set Image Size /////////////////// > if(($g_is[0]-$g_fw)>=($g_is[1]-$g_fh)) { > /// Width is Greater Than Or Equal to Height > $g_iw=$g_fw; > $g_ih=($g_fw/$g_is[0])*$g_is[1]; > } else { > /// Height is Greater than Width > $g_ih=$g_fh; > $g_iw=($g_ih/$g_is[1])*$g_is[0]; > } > > ////////////// Create Thumbnail /////////////////// > $img_src=imagecreatefromjpeg($g_srcfile); > $img_dst=imagecreate($g_iw, $g_ih); > imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $g_iw, $g_ih, > $g_is[0], $g_is[1]); > imagejpeg($img_dst, $g_dstfile, $g_imgcomp); > imagedestroy($img_dst); > } else > return false; > } > > > > 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 > > "Few are those who see with their own eyes and feel with their own > hearts." > -- Albert Einstein > ------------------------------------------------------------------------ > ---
--- End Message ---