php-general Digest 8 Jan 2002 16:47:59 -0000 Issue 1099
Topics (messages 79752 through 79798):
Question About W32 API
79752 by: "João P. Bragança"
php 4.1.1 and imap/ssl
79753 by: Ron Peterson
How to add a carriage return in the end when using implode?
79754 by: Zhang, Leon (STHK/Zh)
79761 by: Jason Wong
79762 by: Zhang, Leon (STHK/Zh)
How to define subroutine
79755 by: sanjay
79756 by: CC Zona
Question about Php/Mysql. Unsure if it's enabled.
79757 by: Joelmon2001.aol.com
79778 by: Ford, Mike [LSS]
Re: PHP and OpenLDAP
79758 by: Stig Venaas
How can I do this correctly? Trying to get gd to work...
79759 by: Joelmon2001.aol.com
79760 by: "João P. Bragança"
Re: global generation
79763 by: Tim Ward
Designer adrift in a sea of code - please point me towards land...
79764 by: tim at 10Kv
79785 by: Bogdan Stancescu
can u find error in php file?
79765 by: Balaji Ankem
79788 by: Rick Emery
stat failed
79766 by: V
no one can find solution to my problem??
79767 by: Balaji Ankem
79769 by: Richard Baskett
79770 by: Jon Haworth
79776 by: Balaji Ankem
79781 by: Balaji Ankem
Connecting PHP to a remote mysql database
79768 by: Félix García Renedo
79771 by: Henning Sprang
79775 by: Henning Sprang
Re: PHP 4.4.1 and Interbase
79772 by: Dave Brotherstone
79791 by: Todd Cary
session & obect : session_start and require_once - Incomplete object
79773 by: Alex
Re: counting with dates (help!)
79774 by: Henning Sprang
really weird
79777 by: Chris Grigor
79779 by: Henning Sprang
79782 by: Henning Sprang
Re: POSTing HTML into a database
79780 by: Ford, Mike [LSS]
E-Commerce
79783 by: Necro
79794 by: Julio Nobrega Trabalhando
if() Load a different php.ini
79784 by: Julio Nobrega Trabalhando
Re: jukebox
79786 by: Scott
Redirecting to a URL
79787 by: Robert MacCombe
79789 by: Gianni Del Papa
79790 by: Henning Sprang
79792 by: Bogdan Stancescu
Error
79793 by: Dean Ouellette
79795 by: Steve Cayford
Re: Sessions
79796 by: Johnson, Kirk
Re: E-Commerce: go TEP
79797 by: Vincent Stoessel
Supplied argument is not a valid MySQL result resource
79798 by: Dan McCullough
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 ---
Let's say I'm doing the following:
w32api_deftype (
'STRUCT',
'long', 'someNumber',
'string', 'someText',
'int', 'someInt'
);
w32api_register_function('library', 'test', 'int');
$test = w32api_init_dtype('WHATEVER');
test($test);
The function test should place data into STRUCT $test. print_r($test) gives
me 'Resource ID.' Will I have to use some other library function to tell me
what's in $test or can I use php to do it?
Sincerely,
João P. Bragança
--- End Message ---
--- Begin Message ---
I've installed php 4.1.1. with the following configure options:
./configure --prefix=/usr/local/versioned/php-4.1.1
--with-apache=../apache_1.3.19 --with-openssl --with-imap
--with-imap-ssl=/usr/local/openssl --with-kerberos --with-gettext
--with-xml --with-pgsql=/usr/local/postgresql
The following script fails.
<?
$mbox = imap_open ("{localhost:993/imap/ssl/novalidate-cert}INBOX",
"username", "password");
print $mbox . "\n";
?>
The symptom is that an imapd process is started, but then nothing ever
happens. A corresponding non-ssl script works fine.
My imap/ssl installation works fine - I use it all the time. I'm using
the following UW imap RPM's:
imap-devel-2000c-10
imap-2000-9
I can telnet to port 993 o.k.
Any ideas? Or can anyone at least verify that imap-ssl works in php
4.1.1.?
--
-Ron-
https://www.yellowbank.com/
--- End Message ---
--- Begin Message ---
$subdata has been changed
before
then
$data[$index]=implode(",", $subdata); <<<<<----------what should I change
here ?
rewrite the file like this
:
$data[$index]=$data[$index];
$fp=fopen($datafile,"w+");
$a=0;
do{
fputs($fp,$data[$a]);<<<<<----------or
here?.
$a++;
}while($a<count($data));
fclose($fp);
however if one line of the
$datab has been implode with $subdata ,there will not be a 'return' in the final
text file ,
this line just is joined with
the next line ,what should I do here to add the $data as a single
line?
Thanks
Leon
--- End Message ---
--- Begin Message ---
On Tuesday 08 January 2002 14:18, Zhang, Leon (STHK/Zh) wrote:
> $subdata has been changed before
>
> then $data[$index]=implode(",", $subdata); <<<<<----------what should I
> change here ?
>
> rewrite the file like this :
>
> $data[$index]=$data[$index];
> $fp=fopen($datafile,"w+");
> $a=0;
> do{
> fputs($fp,$data[$a]);<<<<<----------or here?.
> $a++;
> }while($a<count($data));
> fclose($fp);
>
> however if one line of the $datab has been implode with $subdata ,there
> will not be a 'return' in the final text file ,
> this line just is joined with the next line ,what should I do here to add
> the $data as a single line?
Not sure if I understand you correctly. If you just want to add a newline
character then you can try this:
$data[$index]=implode(",", $subdata) . "\n";
hth
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
BASIC is the Computer Science equivalent of `Scientific Creationism'.
*/
--- End Message ---
--- Begin Message ---
Yes,I have just worked out ,thank you Jason.
-----原始邮件-----
å‘件人: Jason Wong [mailto:[EMAIL PROTECTED]]
å‘逿—¶é—´: 08 January, 2002 16:46
收件人: [EMAIL PROTECTED]
主题: Re: [PHP] How to add a carriage return in the end when using implode?
On Tuesday 08 January 2002 14:18, Zhang, Leon (STHK/Zh) wrote:
> $subdata has been changed before
>
> then $data[$index]=implode(",", $subdata); <<<<<----------what should I
> change here ?
>
> rewrite the file like this :
>
> $data[$index]=$data[$index];
> $fp=fopen($datafile,"w+");
> $a=0;
> do{
> fputs($fp,$data[$a]);<<<<<----------or here?.
> $a++;
> }while($a<count($data));
> fclose($fp);
>
> however if one line of the $datab has been implode with $subdata ,there
> will not be a 'return' in the final text file ,
> this line just is joined with the next line ,what should I do here to add
> the $data as a single line?
Not sure if I understand you correctly. If you just want to add a newline
character then you can try this:
$data[$index]=implode(",", $subdata) . "\n";
hth
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
BASIC is the Computer Science equivalent of `Scientific Creationism'.
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hi
I am new to PHP and want to do object oriented programming in PHP. I want to write a
subroutine and call that subroutine. I tried the following code but it gives me an
error.
Regards
Sanjay
<?
$ref = testfun();
print "Ref is $ref";
sub testfun()
{
return HI;
}
?>
--- End Message ---
--- Begin Message ---
In article <002901c1980e$4ba456f0$0200a8c0@piii>,
[EMAIL PROTECTED] (Sanjay) wrote:
> I am new to PHP and want to do object oriented programming in PHP. I want to
> write a subroutine and call that subroutine.
<http://download.php.net/manual/en/functions.php>
<http://download.php.net/manual/en/language.oop.php>
--
CC
--- End Message ---
--- Begin Message ---
Hello, my subject is a bit confusing, I bet. I need a bit more speace to
explain this situation.
Ok, basically I only configured php with apxs
However, I noticed the mysql was supported (It said so on php info page)
How is that possible?
I never tested a mysql script yet on this server (linux) yet, I just had to
ask if this is normal and how this is possible. Or if I am misinterpreting
the output. The file actually prints:
mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.32
MYSQL_INCLUDE
MYSQL_LFLAGS
MYSQL_LIBS
Does this mean it really supports it? or am I just not understanding
something?
It even says zend server is in use, yet I never installed zend.
The version of php is 4.0.5 on apache webserver on linux
How is this possible? Just curious
Thanks
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 08 January 2002 07:15
>
> Ok, basically I only configured php with apxs
>
> However, I noticed the mysql was supported (It said so on php
> info page)
>
> How is that possible?
MySQL support is built in to PHP.
> Does this mean it really supports it? or am I just not understanding
> something?
It really supports it -- but, of course, that's of no use to you if you don't have a
MySQL server running!
>
> It even says zend server is in use, yet I never installed zend.
> The version of php is 4.0.5 on apache webserver on linux
The Zend scripting language engine is a major part of PHP, so of course you will see
that that is installed.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
--- End Message ---
--- Begin Message ---
On Thu, Jan 03, 2002 at 10:42:30AM -0700, Quinn Perkins wrote:
> I have installed OpenLDAP 2.x on an OS X Server 10.1.2 box. Everything
> seems to be fine. I have written a simple PHP front end to modify LDAP
> values. I can modify values in the core.schema without any problem, but
> if I try to modify anything in cosine.schema or inetorgperson.schema, I
> get an error (Warning: LDAP: modify operation could not be completed. in
> ldapeditor.b2.php on line 247)
>
> This ONLY happens when I try and modify a value in a schema other than
> core.schema. The project I am working on will require use of cosine and
> inetorgperson schemas. This is a test page to make sure I can read/write
> values.
I see you don't modify the object class, does the current object class
allow the new attributes. If say the current class is person, you will
get an error.
You could also try to look at your slapd log. You could also get a
lot of useful info from slapd by starting it in debug mode (-d7) or
some other number than 7 perhaps.
Stig
--- End Message ---
--- Begin Message ---
with dl() function. Thanks for your time. Even though I read php.net's
support on dl, I still cannot get it to work, so I figured I'd ask (if I may)
The syntax was:
<?
dl(libdg.so)
?>
ERROR:
Warning: Unable to load dynamic library './libdgso' - ./libdgso: cannot open
shared object file: No such file or directory in
/home/sites/site7/web/php/page.php on line 2
Line 5 is of course
dl(libgd.so)
Which .so file should I choose to use and is there a specific path I must
type?
/usr/lib/libgd.so.1.8.3
/usr/lib/libgd.so.1
/usr/lib/libgd.so
Thanks. I just want to try to load gd using this method so I can become more
familiar with it..
Joel
--- End Message ---
--- Begin Message ---
You must change extension_ dir php.ini.
Also Re: [PHP] Question about Php/Mysql. Unsure if it's enabled.
Those are enabled by default, also in your php.ini
At 03:22 1/8/02 -0500, you wrote:
>with dl() function. Thanks for your time. Even though I read php.net's
>support on dl, I still cannot get it to work, so I figured I'd ask (if I may)
>
>The syntax was:
><?
>dl(libdg.so)
>?>
>
>ERROR:
>
>Warning: Unable to load dynamic library './libdgso' - ./libdgso: cannot open
>shared object file: No such file or directory in
>/home/sites/site7/web/php/page.php on line 2
>
>Line 5 is of course
>dl(libgd.so)
>
>Which .so file should I choose to use and is there a specific path I must
>type?
>/usr/lib/libgd.so.1.8.3
>/usr/lib/libgd.so.1
>/usr/lib/libgd.so
>
>Thanks. I just want to try to load gd using this method so I can become more
>familiar with it..
>
>Joel
Sincerely,
João P. Bragança
--- End Message ---
--- Begin Message ---
----------
From: Boget, Chris [SMTP:[EMAIL PROTECTED]]
Sent: 07 January 2002 19:20
To: 'Kevin Stone'; Rodney Davis; [EMAIL PROTECTED]
Subject: RE: [PHP] global generation
> Wait until after the for loop has completed.
> for ($i=0; $i< $num_results; $i++) {
> $variable[$i];
> }
> global $variable;
That's not going to work. The only thing that is doing is
making an already global instance of $variable global
within the function.
What you want is this instead:
$GLOBALS[$variable] = $variable;
$GLOBALS["variable"] = $ variable, typo I assume
Tim, www.chessish.com
Chris
--- End Message ---
--- Begin Message ---
Thanks for everyone's comments its given me a better idea of what php can
do.
I need a little clarification on what's been said then Ill unsubscribe and
never come back I just need to know if this is the kind of thing php can
help me with.
... If I understand what you have told me so far it should be possible to
fill the content of a layer by
issuing some sort of Œserver include¹ command.. (?) So, for example, rather
than have a something
that looks like this:
<div id="haiti" style="position:absolute; left:752px; top:321px;
width:166px; height:162px; z-index:14; visibility: hidden">
<table width=166 border=0 cellpadding=0 cellspacing=0>
<tr>
<td> <img src="Atlas/images/photolayer_11.gif" width=81
height=55></td>
<td> <img src="Atlas/images/photolayer_12.gif" width=85
height=55></td>
</tr>
<tr>
<td> <img src="Atlas/images/photolayer_14.gif" width=81
height=53></td>
<td> <img src="Atlas/images/photolayer_15.gif" width=85
height=53></td>
</tr>
<tr>
<td> <img src="Atlas/haiti_17.gif" width=81 height=55></td>
<td> <img src="Atlas/haiti_18.gif" width=85 height=55></td>
</tr>
</table>
</div>
It should be possible to have some code that gives the layer position but
rather than then having all the other code describing the layer contents,
have some sort of php command that says 'get the contents from file
xxx.php'. If this is the case what should I be learning about to make this
happen?
Thanks again,
Tim
(standing on the shoulders of giants)
-----------
> Your question is not stupid - it's just uninformed, and that's easily
> understandable if you never used PHP.
>
> The concept is dynamically creating the page SERVER-SIDE. That is, use some
> databases or some nifty code to dynamically build a page using specific
> parameters. Unforunately for you, this means that all the fun ends on the
> server
> side. Once PHP ends its job, Apache takes over and serves the content
> generated
> by PHP as it would serve any regular file. What you actually pass to the
> client
> is "dead" information - it's not dynamic unless you echo some JavaScript code
> or
> something similar from PHP (which is the same as writing the respective code
> in
> a regular file, unless you create some custom parameters in JavaScript based
> on
> some other parameters you pass to PHP).
>
> Hope my explanation makes sense... ;-)
>
> Bogdan
>
> tim at 10Kv wrote:
>
>> Hi,
>>
>> first of all apologise to the list this is a very basic question for you
>> I¹m sure. I have tried to find an answer on the web but the problem is
>> knowing HOW to ask the question and I hoping you can provide me with a
>> starting point.
>>
>> Anyway.. I design a lot of graphic intensive pages which rely heavily on
>> layers that contain images, mouseovers and image swaps. The trouble is, when
>> there are more than a couple of these layers on a page the code gets long
>> and over complicated. For example, if I have a page which on one side
>> contains an image map with 5 clickable points that shows one of 5 possible
>> layers on the other side of the page (each with different content) this is
>> automatically a page with lots of code which is slow to load especially if
>> the page already has a layer based navigation bar!
>>
>> My question is: is there a way to use a language like php to make this
>> process easier? For example populate the layers from a different file rather
>> than have all the code on the same page and perhaps slim the page down a
>> little or is this missing the point of what a language like php is about.
>>
>> Thanks for your help and my apologies if this is the worst question of the
>> week.
>>
>> Tim Rogers
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hi!
I noticed you've been repeatedly posing this message. The reason why nobody answers
is because your question is a little strange.
The answer is yes, you could have something like
[file whatever.php]
<div id="haiti" style="position:absolute; left:752px; top:321px;
width:166px; height:162px; z-index:14; visibility: hidden">
<? // This is the PHP opening tag
include photos.php; // PHP code
// Ending PHP mode on next line
?>
</div>
[eof]
[file photos.php]
<table width=166 border=0 cellpadding=0 cellspacing=0>
<tr>
<td> <img src="Atlas/images/photolayer_11.gif" width=81 height=55></td>
<td> <img src="Atlas/images/photolayer_12.gif" width=85 height=55></td>
</tr>
<tr>
<td> <img src="Atlas/images/photolayer_14.gif" width=81 height=53></td>
<td> <img src="Atlas/images/photolayer_15.gif" width=85 height=53></td>
</tr>
<tr>
<td> <img src="Atlas/haiti_17.gif" width=81 height=55></td>
<td> <img src="Atlas/haiti_18.gif" width=85 height=55></td>
</tr>
</table>
[eof]
But would you need that? It's the same thing as having photos.php hard coded into
whatever.php unless you either
1. Use some actual PHP code (retrieve some data from a database, make some
decisions based on some data passed via HTTP, based on the date/time of day, I
don't know, whatever).
2. Include the same file in multiple other files (which would help you because
you'd only have to change one file when that's required - sort of dynamically
linking if you wish).
For more info on PHP you may check http://download.php.net/manual/en/langref.php
The best way to start is by actually installing PHP and writing some code - even if
you find out you don't need it for this particular project, it's definitely not a
waste of time.
Bogdan
tim at 10Kv wrote:
> Thanks for everyone's comments its given me a better idea of what php can
> do.
>
> I need a little clarification on what's been said then Ill unsubscribe and
> never come back I just need to know if this is the kind of thing php can
> help me with.
>
> ... If I understand what you have told me so far it should be possible to
> fill the content of a layer by
> issuing some sort of Œserver include¹ command.. (?) So, for example, rather
> than have a something
> that looks like this:
>
> <div id="haiti" style="position:absolute; left:752px; top:321px;
> width:166px; height:162px; z-index:14; visibility: hidden">
> <table width=166 border=0 cellpadding=0 cellspacing=0>
> <tr>
> <td> <img src="Atlas/images/photolayer_11.gif" width=81
> height=55></td>
> <td> <img src="Atlas/images/photolayer_12.gif" width=85
> height=55></td>
> </tr>
> <tr>
> <td> <img src="Atlas/images/photolayer_14.gif" width=81
> height=53></td>
> <td> <img src="Atlas/images/photolayer_15.gif" width=85
> height=53></td>
> </tr>
> <tr>
> <td> <img src="Atlas/haiti_17.gif" width=81 height=55></td>
> <td> <img src="Atlas/haiti_18.gif" width=85 height=55></td>
> </tr>
> </table>
> </div>
>
> It should be possible to have some code that gives the layer position but
> rather than then having all the other code describing the layer contents,
> have some sort of php command that says 'get the contents from file
> xxx.php'. If this is the case what should I be learning about to make this
> happen?
>
> Thanks again,
>
> Tim
>
> (standing on the shoulders of giants)
>
> -----------
>
> > Your question is not stupid - it's just uninformed, and that's easily
> > understandable if you never used PHP.
> >
> > The concept is dynamically creating the page SERVER-SIDE. That is, use some
> > databases or some nifty code to dynamically build a page using specific
> > parameters. Unforunately for you, this means that all the fun ends on the
> > server
> > side. Once PHP ends its job, Apache takes over and serves the content
> > generated
> > by PHP as it would serve any regular file. What you actually pass to the
> > client
> > is "dead" information - it's not dynamic unless you echo some JavaScript code
> > or
> > something similar from PHP (which is the same as writing the respective code
> > in
> > a regular file, unless you create some custom parameters in JavaScript based
> > on
> > some other parameters you pass to PHP).
> >
> > Hope my explanation makes sense... ;-)
> >
> > Bogdan
> >
> > tim at 10Kv wrote:
> >
> >> Hi,
> >>
> >> first of all apologise to the list this is a very basic question for you
> >> I¹m sure. I have tried to find an answer on the web but the problem is
> >> knowing HOW to ask the question and I hoping you can provide me with a
> >> starting point.
> >>
> >> Anyway.. I design a lot of graphic intensive pages which rely heavily on
> >> layers that contain images, mouseovers and image swaps. The trouble is, when
> >> there are more than a couple of these layers on a page the code gets long
> >> and over complicated. For example, if I have a page which on one side
> >> contains an image map with 5 clickable points that shows one of 5 possible
> >> layers on the other side of the page (each with different content) this is
> >> automatically a page with lots of code which is slow to load especially if
> >> the page already has a layer based navigation bar!
> >>
> >> My question is: is there a way to use a language like php to make this
> >> process easier? For example populate the layers from a different file rather
> >> than have all the code on the same page and perhaps slim the page down a
> >> little or is this missing the point of what a language like php is about.
> >>
> >> Thanks for your help and my apologies if this is the worst question of the
> >> week.
> >>
> >> Tim Rogers
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
<?php
include_once('Mail/smtp.php'); include_once('Net/SMTP.php');
# Replace 127.0.0.1 with another SMTP host if
needed $smtp_session = new Mail_smtp(array('10.145.0.18', 25, TRUE, '',
'')); $headers['Subject'] = 'Sample subject'; $headers['Reply-To'] = '[EMAIL PROTECTED]'; $headers['From']
= '[EMAIL PROTECTED]'; $headers['User']='bankem'; $headers['Password']='narayana'; $recipients
= array('[EMAIL PROTECTED]');
$body = <<<EOF
This is a sample body.
EOF;
$return = $smtp_session->send($recipients,
$headers, $body);
?>
But actually no mail was received by
me.
-Balaji
|
-----------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.
------------------------------------------------------------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
Given the simplicity of the mail() function, why go to all this trouble? I
must be missing something here. Does your PHP host lack SMTP, so you must
use another server's SMTP?
-----Original Message-----
From: Balaji Ankem [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 08, 2002 3:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP] can u find error in php file?
<?php
include_once('Mail/smtp.php');
include_once('Net/SMTP.php');
# Replace 127.0.0.1 with another SMTP host if needed
$smtp_session = new Mail_smtp(array('10.145.0.18', 25, TRUE, '', ''));
$headers['Subject'] = 'Sample subject';
$headers['Reply-To'] = '[EMAIL PROTECTED]'
<mailto:'[EMAIL PROTECTED]'> ;
$headers['From'] = '[EMAIL PROTECTED]'
<mailto:'[EMAIL PROTECTED]'> ;
$headers['User']='bankem';
$headers['Password']='narayana';
$recipients = array( '[EMAIL PROTECTED]'
<mailto:'[EMAIL PROTECTED]'> );
$body = <<<EOF
This is a sample body.
EOF;
$return = $smtp_session->send($recipients, $headers, $body);
if ($return)
echo "Mail was successfully sent to [EMAIL PROTECTED]"
<mailto:[EMAIL PROTECTED]> ;
else
echo "FAIL";
?>
for above program I am getting Mail was successfully sent to
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> .
But actually no mail was received by me.
-Balaji
--- End Message ---
--- Begin Message ---
I have an application where the user can upload a file on a folder.
Then my application must read how many data this user have available.
I store in an interbase database the limit of his capacity.
It all works fine, but with some archives i receive an error:
Warning: stat failed for the_uploaded_archive.ext (errno=2 - No such
file or directory) in c:\the\path\of\my\application\my\script.php on
line 19.
I use a recursive function to see the size of the files stored.
This is my function:
function foldersize($mydir){
global $ID_USER,$connection,$size,$subdir;
$sql="SELECT SIZE FROM USERS WHERE ID_USER=$ID_USER";
$query=ibase_query($connection,$sql) or die ("Invalid query");
$mysize=ibase_fetch_object($query);
if(!isset($subdir)){
chdir("../files/$mydir");
}else{
chdir("$mydir");
}
$handle=opendir(".");
while($file=readdir($handle)){
if($file!="." and $file!=".."){
if(!is_dir($file)){
$size=$size+filesize($file);
}else{
$subdir="yes";
$size=$size+foldersize("$file");
}
}
}
closedir($handle);
clearstatcache();
return $mysize->SIZE-round($size/(1024*1024));
}
Does anybody know this error?
_______________________________________________________
Antonio Vicente Maturana
_______________________________________________________
Powered by Sambar Webmail - http://www.sambar.com)
--- End Message ---
--- Begin Message ---
<?php
/* subject */ $subject = "Birthday
Reminder";
/* message */ $message =
' <html> <head> <title>Birthday Reminders for
August</title> </head> <body> <p>Here are the
birthdays upcoming in
August!</p> <table> <tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th> </tr> <tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td> </tr> </table> </body> </html> ';
/* To send HTML mail, you can set the Content-type
header. */ $headers = "MIME-Version: 1.0\r\n"; $headers .=
"Content-type: text/html; charset=iso-8859-1\r\n";
/* and now mail it */ mail($to, $subject,
$message, $headers);
?>
Warning: Server Error in
c:\www/email1.php on line 45
|
-----------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.
------------------------------------------------------------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
Well it looks to me that your headers variable is an array and that isnt
really going to work with the mail function unless you arraywalk it.
Hopefully that helps, since it's the only thing I can think of
> <?php
>
> /* recipients */
> $to = "Mary <[EMAIL PROTECTED]>" ;
>
> /* subject */
> $subject = "Birthday Reminder";
>
> /* message */
> $message = '
> <html>
> <head>
> <title>Birthday Reminders for August</title>
> </head>
> <body>
> <p>Here are the birthdays upcoming in August!</p>
> <table>
> <tr>
> <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
> </tr>
> <tr>
> <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
> <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
> </tr>
> </table>
> </body>
> </html>
> ';
>
> /* To send HTML mail, you can set the Content-type header. */
> $headers = "MIME-Version: 1.0\r\n";
> $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
>
> /* additional headers */
> $headers .= "From: Balaji Ankem <[EMAIL PROTECTED]>\r\n";
>
> $headers .= "Cc: [EMAIL PROTECTED]\r\n";
> $headers .= "Bcc: [EMAIL PROTECTED]\r\n";
> $headers['User']='bankem';
> $headers['Password']='narayana';
>
>
> /* and now mail it */
> mail($to, $subject, $message, $headers);
>
> ?>
>
>
> Warning: Server Error in c:\www/email1.php on line 45
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
> $headers .= "Cc: [EMAIL PROTECTED]\r\n";
> $headers .= "Bcc: [EMAIL PROTECTED]\r\n";
> $headers['User']='bankem';
> $headers['Password']='narayana';
>
>
> /* and now mail it */
> mail($to, $subject, $message, $headers);
>
> ?>
>
>
> Warning: Server Error in c:\www/email1.php on line 45
You do not need to send your username and password with the headers - those
are the MAIL headers (From, Reply-To, Errors-To, etc)
Cheers
Jon
--- End Message ---
--- Begin Message ---
Hi Jon,
I am not running "sendmail" on my localhost.
I am sending stuff to my company mail server.
yaa I tried with SMTP also..But no use..
if u don't mind...please check the following code..
<?php
include_once('Mail/smtp.php');
include_once('Net/SMTP.php');
# Replace 127.0.0.1 with another SMTP host if needed
$smtp_session = new Mail_smtp(array('10.145.0.18', 25, TRUE, '', ''));
$headers['Subject'] = 'Sample subject';
$headers['Reply-To'] = '[EMAIL PROTECTED]';
$headers['From'] = '[EMAIL PROTECTED]';
$headers['User']='bankem';
$headers['Password']='narayana';
$recipients = array('[EMAIL PROTECTED]');
$body = <<<EOF
This is a sample body.
EOF;
$return = $smtp_session->send($recipients, $headers, $body);
if ($return)
echo "Mail was successfully sent to [EMAIL PROTECTED]";
else
echo "FAIL";
?>
-----------------------------
And the result was "Mail was successfully sent to
mailto:[EMAIL PROTECTED].
I don't know what z happening..
Thanks in advance.
-Balaji
----- Original Message -----
From: "Jon Haworth" <[EMAIL PROTECTED]>
To: "'Balaji Ankem'" <[EMAIL PROTECTED]>
Sent: Tuesday, January 08, 2002 3:35 PM
Subject: RE: [PHP] no one can find solution to my problem??
> How have you got it all set up?
>
> Are you running sendmail on localhost, or are you sending stuff to your
ISPs
> mail server? If it's the latter you mail be better off opening an SMTP
> session and talking directly to the server, rather than using mail().
>
> Cheers
> Jon
>
>
> -----Original Message-----
> From: Balaji Ankem [mailto:[EMAIL PROTECTED]]
> Sent: 08 January 2002 10:04
> To: Jon Haworth
> Subject: Re: [PHP] no one can find solution to my problem??
>
>
> Hi, Jon
> Thankyou for u'r reply.
> But our mail server needs authentication.(username and password)..
>
> I am trying this from last 6 months..but still I couldn't find any
solution.
>
> -Balaji
> ----- Original Message -----
> From: "Jon Haworth" <[EMAIL PROTECTED]>
> To: "'Balaji Ankem'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, January 08, 2002 3:09 PM
> Subject: RE: [PHP] no one can find solution to my problem??
>
>
> > > $headers .= "Cc: mailto:[EMAIL PROTECTED]\r\n;
> > > $headers .= "Bcc: mailto:[EMAIL PROTECTED]\r\n;
> > > $headers['User']='bankem';
> > > $headers['Password']='narayana';
> > >
> > >
> > > /* and now mail it */
> > > mail($to, $subject, $message, $headers);
> > >
> > > ?>
> > >
> > >
> > > Warning: Server Error in c:\www/email1.php on line 45
> >
> > You do not need to send your username and password with the headers -
> those
> > are the MAIL headers (From, Reply-To, Errors-To, etc)
> >
> > Cheers
> > Jon
> >
-----------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.
------------------------------------------------------------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
> > Do I get to see the class then?
Thankyou. :-)
> > It's hard to see what this line is doing:
> > > $smtp_session = new Mail_smtp(array('10.145.0.18', 25, TRUE, '', ''));
This line creates SMTP session (parameters are mail server, SMTP port,
authentication required or not)
> Without seeing what these lines are including:
> > > include_once('Mail/smtp.php');
> > > include_once('Net/SMTP.php');
These two lines include the smtp.php and SMTP.php from
php/pear/Mail/smtp.php - php/pear/Net/SMTP.php
for required functions send and Mail_smtp.
cheers
-Balaji
> ----- Original Message -----
> From: "Jon Haworth" <[EMAIL PROTECTED]>
> To: "'Balaji Ankem'" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 08, 2002 4:17 PM
> Subject: RE: [PHP] no one can find solution to my problem??
>
>
> > Do I get to see the class then?
> >
> > It's hard to see what this line is doing:
> > > $smtp_session = new Mail_smtp(array('10.145.0.18', 25, TRUE, '', ''));
> >
> > Without seeing what these lines are including:
> > > include_once('Mail/smtp.php');
> > > include_once('Net/SMTP.php');
> >
> > Cheers
> > Jon
> >
> >
> > -----Original Message-----
> > From: Balaji Ankem [mailto:[EMAIL PROTECTED]]
> > Sent: 08 January 2002 10:53
> > To: Jon Haworth
> > Subject: Re: [PHP] no one can find solution to my problem??
> >
> >
> > Thanks for u'r reply. :)
> >
> > cheers
> > -Balaji
> > ----- Original Message -----
> > From: "Jon Haworth" <[EMAIL PROTECTED]>
> > To: "'Balaji Ankem'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, January 08, 2002 4:08 PM
> > Subject: RE: [PHP] no one can find solution to my problem??
> >
> >
> > > Would be handy to see the class as well :-)
> > >
> > > Cheers
> > > Jon
> > >
> > >
> > > -----Original Message-----
> > > From: Balaji Ankem [mailto:[EMAIL PROTECTED]]
> > > Sent: 08 January 2002 10:24
> > > To: Jon Haworth
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: [PHP] no one can find solution to my problem??
> > >
> > >
> > > Hi Jon,
> > > I am not running "sendmail" on my localhost.
> > > I am sending stuff to my company mail server.
> > >
> > > yaa I tried with SMTP also..But no use..
> > >
> > > if u don't mind...please check the following code..
> > >
> > > <?php
> > >
> > > include_once('Mail/smtp.php');
> > > include_once('Net/SMTP.php');
> > >
> > > # Replace 127.0.0.1 with another SMTP host if needed
> > > $smtp_session = new Mail_smtp(array('10.145.0.18', 25, TRUE, '', ''));
> > > $headers['Subject'] = 'Sample subject';
> > > $headers['Reply-To'] = '[EMAIL PROTECTED]';
> > > $headers['From'] = '[EMAIL PROTECTED]';
> > > $headers['User']='bankem';
> > > $headers['Password']='narayana';
> > > $recipients = array('[EMAIL PROTECTED]');
> > >
> > > $body = <<<EOF
> > >
> > > This is a sample body.
> > >
> > > EOF;
> > >
> > > $return = $smtp_session->send($recipients, $headers, $body);
> > >
> > > if ($return)
> > > echo "Mail was successfully sent to [EMAIL PROTECTED]";
> > > else
> > > echo "FAIL";
> > >
> > > ?>
>
-----------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.
------------------------------------------------------------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
Hello,
How could I configure php to access to a remote mysql database?
Thanks
--- End Message ---
--- Begin Message ---
Hy,
Félix García Renedo wrote:
> Hello,
> How could I configure php to access to a remote mysql database?
just use the correct hostname of your remote host in
mysql_pconnect( "HOST", "USER", "PASS");
henning
--- End Message ---
--- Begin Message ---
Félix García Renedo wrote:
> Sorry,
> I have an mistake.
> I want to configure php to connect to a remote mysql database and I want
> the options to configure php.
in configure it makes AFAIK no difference if you will be connecting to a
local or remote mysql db.
just use "--with-mysql" or "--with-mysql=/PATH/TO/MYSQL/LIBS"
see also the output of ./configure --help for more information
henning
--- End Message ---
--- Begin Message ---
I've seen this with MS SQL connections. What it boils down to is that the
data type that is returned isn't understood, the extension dies, and nothing
is returned. Try a simpler select statement (I know its hard to go much
simpler but.... ;-) - go for "select 'hello world'". And then try giving
the column a name - it could be that. "select 'hello world' as HiWorld" -
(the "as" is optional, I can't remember whether interbase wants it or not).
If you can work out what sql statements don't work, then mail the list back
and I'll have a look at the extension.
Dave.
> -----Original Message-----
> From: Todd Cary [mailto:[EMAIL PROTECTED]]
> Sent: 07 January 2002 19:29
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP 4.4.1 and Interbase
>
>
> I am running PHP 4.1.1 on RH Linux 7.2 with Apache and I am getting an
> error as soon as I try to execute the query. The browser error with
> Netscape is "Document contains no data. Try again later..."
>
> echo('Opening Interbase<br>');
> $dbh = db_open($host,$user,$password);
> if ($dbh) {
>
> $stmnt = 'SELECT COUNT(*) FROM PHOTOS';
> $sthdl = ibase_query($stmnt,$dbh);
> if ($sthdl) {
> echo('Query succeeded<br>');
> } else {
> echo('Cannot perform query<br>');
> }
>
> echo('Closing Interbase<br>');
> ibase_close($dbh);
> } else {
> echo('Could not open Interbase!<br>');
> }
>
> If I comment out
>
> $stmnt = 'SELECT COUNT(*) FROM PHOTOS';
>
> All run fine. Also, this piece of code use to work. Any suggestions?
>
> Todd
> --
> Todd Cary
> Ariste Software
> [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--- End Message ---
--- Begin Message ---
I rolled back to php-4.0.6 and all works fine.
http://209.204.172.137/testgdb.php and
http://209.204.172.137/testphp.php
Hmmmmmmmm?
Todd
--
Todd Cary
Ariste Software
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hi,
I have problem accessing object stored in session with PHP.
SUMMARY
*************
The doc says I must put the object definition
(require_once("MyObject.php");) before the session starts (with a
session_start() ). If I do that
- OK I can get my object from session
- OK my object is "casted" in MyObject object type
SAMPLE / the problem
***************************
But my code is organised in several sub-scripts (Object oriented, simplified
dor the explanation) :
The request.php is performed through part_1.php and part_2.php with 2
include calls
- request.php starts the session and do some initialization stuff.
- include("part_1.php")
do some business things here
call some object and try to read them from session
- include("part_2.php")
do some other logic here
end the response sent to the browser
As you already understand, the session starts BEFORE PHP enters part_1.php
and it is too late in part_1.php to put the object definition with the
require_once.
I cannot re organise my php files, since part_1.php is as its own business
logic and I want to use it elsewhere.
The object which is thus restored from session is not "finished". If I do a
var_dump on it I have something like :
object(__PHP_Incomplete_Class)(3) {
["__PHP_Incomplete_Class_Name"]=>
string(6) "classe"
["n"]=>
int(1)
["sub"]=>
object(__PHP_Incomplete_Class)(2) {
["__PHP_Incomplete_Class_Name"]=>
string(9) "subclasse"
["i"]=>
int(1)
}
}
instead of
object(classe)(2) {
["n"]=>
int(1)
["sub"]=>
object(subclasse)(1) {
["i"]=>
int(1)
}
}
It looks like there is a special intermediate object of type
__PHP_Incomplete_Class.
If another object is an attribut of the session stored object, it is also
incomplete.
If I try to call some methods on it it throws an error saying the object is
incomplete and I cannot call methods or attributs on it.
TEMPORARY SOLUTION
******************************
What I do actually is making a kind of copy of this object trough
introspection and explicit casting :
$myObject =& convert("MyObjet", $IncompleteClassInstance) ;
But :
- this is not very convenient
- the MyObject must support a constructor with no arguments since the
process of conversion is :
* create a new instance of MyObject with no arguments (new
MyObject( ); )
* copy the attributes of the incomplete instance in this new Instance
recurse if an attribute is itself another object
* return the new instance
QUESTIONS
***************
Any idea about standard object casting in PHP ?
The process between class def and session starting if my session is auto
started (change in my php.ini) results in an error.
Thus I can affirm there is a bug in the session handling of PHP :"It is not
possible to store object in session if we use auto started sessions"
Alex
--- End Message ---
--- Begin Message ---
Sander Peters wrote:
> Hello,
>
>
> This is my problem:
>
> $today = date("Ymd", mktime(0,0,0, date(m),date(d),date(Y)));
> $last_week = date("Ymd", mktime(0,0,0, date(m),date(d)-7,date(Y)));
> echo ($today - $last_week);
> The result is a number like 8876 (20020107-20011231 = 8876)
which is completely correct.
with date as you use it up there you only generate numerical values in a
format you specify, and then you substract those numericals from each
other, echoing the rest of 8876
> But in date thinking it should be 7!
I think if you want to get the number of days you have to
1) substract the mktime values you used in the date statement to get
the difference in seconds
2) count how many days you have with this amount of seconds by dividing
the seconds through 86400
date is a function to give you representations of a date and time at any
given moment as expressed in unix time in a lot of different,
configurable formats. after you generated a date representation with
date, the program doesn't know anything at all about the date/time
meanings of that string or number.
hth
henning
--- End Message ---
--- Begin Message ---
Hello everyone my name is Chris and I have just subscribed to ask a question
Currently running Redhat 7.2, php4.0.6.7, apache 1.3.22-2, mysql3.23.41-1
Now I have a script that runs every 10 mins in the crontab,
that checks to see if a file size is 0 or bigger.. if it is bigger then
it mails me, heres a copy
#!/usr/bin/php -q
<?php
$check = system("cat /var/spool/mail/user_mailbox > result");
$fs = filesize(result);
if ($fs > 0){
$jobfood_list = "email.txt";
$emails = file($list);
for ($i=0; $i < count($emails); $i++) $emails[$i] =
trim($emails[$i]);
$recipient = implode(",", $emails);
$mail_subject="mail notification";
$mail_body="The users mailbox has mail.\n\n";
mail($recipient, $mail_subject, $mail_body);
print "mail sent";
}
else
{
die();
}
?>
Right now your in the picture this is okay to check if the mailbox is above
the size of 0. But what I really need help with is, say for instance I get 1
message into the mailbox and the script runs, I only want it to run once for
that message, however if another message comes in I need it to notify me...
at the moment it runs every 10 mins and just keeps notifying me over & over.
Any Help would be cool ...please !!!
C-Ya
Chris
Chris Grigor
----------------------------------------------------------------------------
--------------
Client Services
Call Center: 0860 100 154
Fax: +27 11 340 7345
E-Mail: [EMAIL PROTECTED]
----------------------------------------------------------------------------
--------------
M-WEB Business Solutions
Making it happen.
Go shopping @ http://shopping.mweb.co.za
Get your business online @ http://business.mweb.com
"We all know Linux is great...it does infinite loops in 5 seconds."
- Linus Torvalds
--- End Message ---
--- Begin Message ---
Chris Grigor wrote:
> Right now your in the picture this is okay to check if the mailbox is above
> the size of 0. But what I really need help with is, say for instance I get 1
> message into the mailbox and the script runs, I only want it to run once for
> that message, however if another message comes in I need it to notify me...
> at the moment it runs every 10 mins and just keeps notifying me over & over.
you have to keep state before exiting the script in a filke or a
database and then look up that state in the next run.
say you save something like
path
size
----
----
/path/to/mailbox/hugo
15kb
/path/to/mailbox/mary
56kb
then you only send a message when the size of the mailbox changes again,
not when number of files in it is more than 1
mabye you need to use things like modification time instead of size, i
don't know right now which is better.
You should _not_ use numbr of files, as when ypu save the state "1 file
in mailbox" it could be that the user fetched on file menawhile and
another file has come in - your program doesn't register a change but it
has changed very well...
HTH,
henning
--- End Message ---
--- Begin Message ---
Chris Grigor wrote:
> Hi Henning
>
> If I use modification time, how would I use keep state before exiting (I
> have never done that aggghhh!)
i didn't do that before, too, I just can imagine how it should work :)
before exiting or right after sending the mail you would need to write
the actual modification time of your directories or files into a
database or file, like
FIRSTFILE
2002-01-08 17:45
SECONDFILE
2001-01-08 16:32
got it?
if not, what's the exact problem? Don't know how to write data to a file
or databse?
don't know how to get modification time?
henning
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: James Arthur [mailto:[EMAIL PROTECTED]]
> Sent: 07 January 2002 21:41
<snip>
> For example, consider the string $body = "I am saying \"Hello\"";
>
> <input type="hidden" name="body" value="<?=$body>">
> is interpreted by the browser as
> <input type="hidden" name="body" value="I am saying "Hello"">
> And so we have a problem.
>
> What can I do about that?
Since this is generating HTML, you need to encode these characters as HTML entities --
consider using the htmlspecialchars() function (see
http://www.php.net/manual/en/function.htmlspecialchars.php) or htmlentities() (see
http://www.php.net/manual/en/function.htmlentities.php).
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
--- End Message ---
--- Begin Message ---
Hi,
Has anyone ever used any of the ecommerce shops from hotscripts.com before??
or used any other scripts similar??
I am trying to work out which people think is the best for setting up an
online shop with credit card facilities, etc.
Thankyou
Andrew Duck
--- End Message ---
--- Begin Message ---
I haven't used, but heard good stuff from folks of the local mailing list,
from TEP.
http://theexchangeproject.org/
--
Julio Nobrega.
Um dia eu chego lá:
http://sourceforge.net/projects/toca
Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
--- End Message ---
--- Begin Message ---
Hi All,
I used php 4.0.6 and had to port a system to 4.1.0. So I changed some vars
($_POST, $_SESSION, etc..), and begin to use the new php.ini (with different
scope for stuff).
We hired another person to work with us on another project. So I need him
to access on a different machine my host and load the new php.ini, while I
work with the old settings.
Anyway to load a different php.ini (using if($HTTP_HOST)), or what
settings should I change to accomplish compatibilty with two 'project
versions' on alternate php versions? (4.0.6 and 4.1.0);
Any ideas?
Many thanks,
--
Julio Nobrega.
Um dia eu chego lá:
http://sourceforge.net/projects/toca
Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
--- End Message ---
--- Begin Message ---
On Sun, 6 Jan 2002, Meir Kriheli wrote:
> A quick search at freshmeat shows several projects doing the same thing
> already, you might want to check them out for reference:
>
> http://freshmeat.net/search/?q=jukebox%20php
Thank you for the tip! I actually started working on the project last
night (and gave up sleep because I was too excited to get it working). I
guess the main difference between what I see out there and what I want to
do is:
most of the jukeboxes out there are using some sort of random play. I
want mine to be more structured. I am in radio in the states and am used
to listening to music that way. I am setting up categories, music
rotations, etc.
Thanks again!
-Scott
--- End Message ---
--- Begin Message ---
Hi, how do I redirect to a different URL, e.g. as a result of an IF
condition being true. I'm basically looking for a PHP version of the ASP -
Response.Redirect("/otherpage.htm")
--- End Message ---
--- Begin Message ---
Here is
$location = "http://www.php.net/";
header ("Location: $location");
Using this istruction take a look if header was already sent in previous
code of your page ...
Have fun :)
Gianni
Robert Maccombe wrote:
>
> Hi, how do I redirect to a different URL, e.g. as a result of an IF
> condition being true. I'm basically looking for a PHP version of the ASP -
> Response.Redirect("/otherpage.htm")
--
-----------------------------------------------------------
Dott. Gianni Del Papa [EMAIL PROTECTED]
[EMAIL PROTECTED]
Internet Dept. Manager
ISA SpA
L.go Garbini 8, I-01100 VITERBO - ITALY
Phone +39 0761 277 1
Extension +39 0761 277 23
Fax +39 0761 354050 http://www.isa.it/
-----------------------------------------------------------
--- End Message ---
--- Begin Message ---
Hy
Robert MacCombe wrote:
> Hi, how do I redirect to a different URL, e.g. as a result of an IF
> condition being true. I'm basically looking for a PHP version of the ASP -
> Response.Redirect("/otherpage.htm")
use the header function to send a location: header to the browser:
$redirect_url="http://www.nowhere.net/";
if( $foobar=="" ){
header( "Location: ".$redirect_url );
}
henning
--- End Message ---
--- Begin Message ---
Use headers as suggested or use javascript if you want to be able to notify
the user about the redirection.
Bogdan
Robert MacCombe wrote:
> Hi, how do I redirect to a different URL, e.g. as a result of an IF
> condition being true. I'm basically looking for a PHP version of the ASP -
> Response.Redirect("/otherpage.htm")
--- End Message ---
--- Begin Message ---
Hi I am learning php with Sams leanr php in 24 hours.
This is one example
<?php
function addNums($firstnum, $secondnum)
{
$result = $firstnum + $secondnum;
return $result;11: } // this is line 13
print addNums (3,5);
?>
When I run it get error line 13
any ideas?
--- End Message ---
--- Begin Message ---
On Tuesday, January 8, 2002, at 09:37 AM, Dean Ouellette wrote:
> Hi I am learning php with Sams leanr php in 24 hours.
>
> This is one example
> <?php
> function addNums($firstnum, $secondnum)
> {
> $result = $firstnum + $secondnum;
> return $result;11: } // this is line 13
that should be:
return $result; }
what's the 11: doing in there?
-Steve
> print addNums (3,5);
>
> ?>
>
> When I run it get error line 13
>
> any ideas?
>
>
> -- PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--- End Message ---
--- Begin Message ---
"!sess_id|" means that $sess_id has been registered, but it hasn't been
assigned a value. Is register_globals on or off in php.ini? Did you assign a
value to $sess_id?
Kirk
> -----Original Message-----
> From: Ryan Kelley [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 07, 2002 8:59 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Sessions
>
>
> I am having problems getting the sessions to work. when i input the
> following code:
>
> session_start();
> session_register("sess_id");
>
> i get nothing registered. I have checked the sess_***etc...
> files in /tmp
> and they say:
>
> !sess_id|
>
> Does anybody have any ideas why this is?
--- End Message ---
--- Begin Message ---
I have to second the TEP recommendation. I am using it for
an E-tailer client of mine and it is performing flawlessly. Also,
the project has a lot of enthusiastic developers behind it.
Julio Nobrega Trabalhando wrote:
>
> ------------------------------------------------------------------------
>
> Subject:
>
>
> I haven't used, but heard good stuff from folks of the local mailing list,
> from TEP.
>
> http://theexchangeproject.org/
>
> --
>
> Julio Nobrega.
>
> Um dia eu chego lá:
> http://sourceforge.net/projects/toca
>
> Ajudei? Salvei? Que tal um presentinho?
> http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
>
>
>
>
>
>
--
Vincent Stoessel [EMAIL PROTECTED]
Java Linux Apache Mysql Php (JLAMP) Engineer
(301) 362-1750 Mobile (410) 419-8588
AIM, MSN: xaymaca2020 , Yahoo Messenger: vks_jamaica
--- End Message ---
--- Begin Message ---
I know this is a common error, but what does it mean. This snippet of code is
something I use all
the time.
help please.
dan
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
--- End Message ---