php-general Digest 6 Dec 2004 13:43:35 -0000 Issue 3154
Topics (messages 203549 through 203575):
Re: mysql error
203549 by: Travis Conway
203551 by: Raditha Dissanayake
Sessions in Frames...confused
203550 by: Ryan A
203552 by: Raditha Dissanayake
203569 by: Peter Lauri
while inside a function
203553 by: Louie Miranda
203555 by: Raditha Dissanayake
203558 by: Louie Miranda
Problem with code
203554 by: Richard Kurth
[ANN]Webyog releases FREE edition of SQLyog
203556 by: Ritesh Nadhani
203557 by: Robert Cummings
203559 by: daniel.electroteque.org
203560 by: Rory Browne
203562 by: Raditha Dissanayake
203575 by: Ryan A
Re: Coding Question
203561 by: Rory Browne
203563 by: Jason Wong
Re: GD lib not working
203564 by: Jason Wong
php groupware api
203565 by: Supri anto
Sessions and subdomains issues
203566 by: Nick Wilson
203567 by: Peter Lauri
how to parse
203568 by: Alex Toney
Re: Session variables not unsetting
203570 by: Peter Lauri
Re: create htaccess.
203571 by: Matthew Weier O'Phinney
203572 by: Jason Wong
Trouble with do..while
203573 by: Salvatore
installing php 5.02 and Apache 2
203574 by: Octavian Rasnita
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 ---
Try:
SELECT * FROM listing WHERE listing.state = 'WA' AND listing.type = 'RES'
AND listing.county = 'clark' AND (listing.price > 150000 OR listing.price
<=200000)
Try to not use the word "type". Do not know what it is but I have some
problems using it. In the event you have weird problems, try putting the
table name before the field like I did (i.e., listing.type). You probably
also need the price in params since you want to OR just on those two items.
I also assume that you have the price field as a int, bigint, or similar
field type which does not require a tick around the value. I also dont
think that the back tick works.
HTH
Travis
----- Original Message -----
From: "Richard Kurth" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 05, 2004 3:05 PM
Subject: [PHP] mysql error
Could somebody tell me way these query gets a error 1064 and does not
work.
error=You have an error in your SQL syntax; check the manual that
corresponds to your
MySQL server version for the right syntax to use near
'"SELECT * FROM listing WHERE `state` = 'WA' AND `type` = 'RES'
query="SELECT * FROM listing WHERE `state` = 'WA' AND `type` = 'RES'
AND `county` = 'clark' AND `price` > '150000' OR `price` <= '200000'";
--
Best regards,
Richard mailto:[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Travis Conway wrote:
Try:
SELECT * FROM listing WHERE listing.state = 'WA' AND listing.type =
'RES' AND listing.county = 'clark' AND (listing.price > 150000 OR
listing.price <=200000)
Once again you have posted to the wrong list. Please send this message
to the mysql list. This is the php list.
--
Raditha Dissanayake.
------------------------------------------------------------------
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/ | Drag and Drop Upload
--- End Message ---
--- Begin Message ---
Hi,
Reading the different articles on phpbuilder/devshed/phpfreaks etc has left
me a bit confused..
will start from the beginning so you guys(and girls) can give me some advise
and show me the right path again ;-)
I have a normal user/pass login screen, after which I start a session for
the client and the client should be presented with the "control panel" for
his software.
The control panel is in frames and is split in 2 (sideFrame, mainFrame)
sideFrame is for the navigation.
Do I have to start a session in index.php which is calling the sideFrame and
mainFrame or just in mainFrame or just in sideFrame or in all?? ARRRRGH!
going nuts!
The idea is if the session expires he should be present with the login page
again...I am not doing anything special or complicated, just need to make
sure he is who he says he is and give him access as long as his sesssion is
good.
Thanks,
Ryan
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.289 / Virus Database: 265.4.5 - Release Date: 12/3/2004
--- End Message ---
--- Begin Message ---
Ryan A wrote:
Hi,
Reading the different articles on phpbuilder/devshed/phpfreaks etc has left
me a bit confused..
will start from the beginning so you guys(and girls) can give me some advise
and show me the right path again ;-)
I have a normal user/pass login screen, after which I start a session for
the client and the client should be presented with the "control panel" for
his software.
The control panel is in frames and is split in 2 (sideFrame, mainFrame)
sideFrame is for the navigation.
Do I have to start a session in index.php which is calling the sideFrame and
mainFrame or just in mainFrame or just in sideFrame or in all?? ARRRRGH!
going nuts!
As far as I know there is no harm in calling session_start() in all your
Iframes and Frames. According to theory a new session will only be
started if one has not been started already. However there have been
several discussions on this list in the past where this behaviour was
not observed, and you may want to look these up in the archives.
--
Raditha Dissanayake.
------------------------------------------------------------------
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/ | Drag and Drop Upload
--- End Message ---
--- Begin Message ---
Do not use frames :) It creates problems for the searchengines.
/Peter
"Ryan A" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Hi,
> Reading the different articles on phpbuilder/devshed/phpfreaks etc has
left
> me a bit confused..
> will start from the beginning so you guys(and girls) can give me some
advise
> and show me the right path again ;-)
>
> I have a normal user/pass login screen, after which I start a session for
> the client and the client should be presented with the "control panel" for
> his software.
>
> The control panel is in frames and is split in 2 (sideFrame, mainFrame)
> sideFrame is for the navigation.
>
> Do I have to start a session in index.php which is calling the sideFrame
and
> mainFrame or just in mainFrame or just in sideFrame or in all?? ARRRRGH!
> going nuts!
>
> The idea is if the session expires he should be present with the login
page
> again...I am not doing anything special or complicated, just need to make
> sure he is who he says he is and give him access as long as his sesssion
is
> good.
>
> Thanks,
> Ryan
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.289 / Virus Database: 265.4.5 - Release Date: 12/3/2004
--- End Message ---
--- Begin Message ---
i have a while statement inside a function, but it seems like it dont
work. is this possible?
function hello() {
while ($apo->fetchInto($row)) {
print "hello 2";
}
}; /eof
--
Louie Miranda
http://www.axishift.com
--- End Message ---
--- Begin Message ---
Louie Miranda wrote:
i have a while statement inside a function, but it seems like it dont
work. is this possible?
Add the following lines:
global $apo;
global $row;
This will make it work for you but it's not the best solution. It's
better to pass in parameters to the function rather than to rely on globals.
function hello() {
while ($apo->fetchInto($row)) {
print "hello 2";
}
}; /eof
--
Raditha Dissanayake.
------------------------------------------------------------------
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/ | Drag and Drop Upload
--- End Message ---
--- Begin Message ---
sorry, i overlooked on something.
i need to rest for a while, im working on a wrong program thats why it
wont work.
heh, :(. thanks again.
--
Louie Miranda
http://www.axishift.com
--- End Message ---
--- Begin Message ---
I am having a problem with the code below it provides the first page
with out any problem but when I select the next page it shows all the
results from the first page and the results from the second page. It
does the same thing on the third page also. I have been looking at it
for two days and can not fined the error in the code
<?php
include("include/common.php");
include("$config[template_path]/user_top.html");
// If current page number, use it
// if not, set one!
if(!isset($page)){
$page = 1;
} else {
$page = $page;
}
// Define the number of results per page
$max_results = $config['listings_per_page'];
// Figure out the limit for the query based
// on the current page number.
$from = (($page * $max_results) - $max_results);
//Process all the search results to create the sql
if($searchRule == "or"){ $cond = "OR"; } else $cond = "and";
//the main sql statment
$sql = 'SELECT * FROM listing ';
//the sql statment required to set the total number of pages
$sql1 = 'SELECT COUNT(*) as Num FROM listing ';
if($state != "" || $type != "" || $county != "" || $price != ""){
$sql .= "WHERE ";
$sql1 .= "WHERE ";
if($state != ""){
$sql .= "state = '". $state ."'";
$sql1 .= "state = '". $state ."'";
if($state != "" || $type != "" || $county != "" || $price != ""){
$sql .= " $cond ";
$sql1 .= " $cond ";
} }
if($type != ""){
$sql .= "type = '". $type ."'";
$sql1 .= "type = '". $type ."'";
if($state != "" || $type != "" || $county != "" || $price != "") {
$sql .= " $cond ";
$sql1 .= " $cond ";
} }
if($county != ""){
$sql .= "county = '". $county ."'";
$sql1 .= "county = '". $county ."'";
if($state != "" || $type != "" || $county != "" || $price != ""){
$sql .= " $cond ";
$sql1 .= " $cond ";
} }
if($Pricerange != ""){
if($Pricerange=="range1"){
$Price1="00000";
$Price2="100000";
$simbale="<=";
$sql .= "price <= '". $Price2."'";
$sql1 .= "price <= '". $Price2."'";
}
if($Pricerange=="range2"){
$Price1="100000";
$Price2="150000";
$sql .= "(price > '". $Price1."' OR price <= '". $Price2."')";
$sql1 .= "(price > '". $Price1."' OR price <= '". $Price2."')";
}
if($Pricerange=="range3"){
$Price1="150000";
$Price2="200000";
$sql .= "(price > '". $Price1."' OR price <= '". $Price2."')";
$sql1 .= "(price > '". $Price1."' OR price <= '". $Price2."')";
}
if($Pricerange=="range4")
{$Price1="200000";
$Price2="250000";
$sql .= "(price > '". $Price1."' OR price <= '". $Price2."')";
$sql1 .= "(price > '". $Price1."' OR price <= '". $Price2."')";
}
if($Pricerange=="range5")
{$Price1="250000";
$Price2="300000";
$sql .= "(price > '". $Price1."' OR price <= '". $Price2."')";
$sql1 .= "(price > '". $Price1."' OR price <= '". $Price2."')";
}
if($Pricerange=="range6")
{$Price1="300000";
$Price2="";
$sql .= "price >= '". $Price1."'";
$sql1 .= "price >= '". $Price1."'";
}}
$sql .= " LIMIT " . $from . "," . $max_results;
}
$result=safe_query($sql);
while ($row = mysql_fetch_array($result)){
extract($row);
?>
<div align="center">
<table border="0" width="631" height="1" cellpadding="0" cellspacing="0">
<tr>
<td width="81" height="1" bgcolor="#60A0F8"><font color="#FFFFFF"><span
class="contentsmall">Listing</span><span class="contentbold">
#<? echo$listingId?></span></font><img hspace="0"
src="images/user_photos/thumb_5000_1.jpg" border="0" width="83" height="50"><br>
</td>
<center>
<td width="401" height="1"><textarea cols="45" rows="6"><?
echo$descr1?></textarea> <br>
<a href="more_results.php?listingId=<?
echo$listingId?>&searchlistingid=yes">
more info...</a></td>
<td width="127" height="1"><span class="contentbold">$<?
echo$price?></span><br>
<?if ($type=="") {}?>
<?if ($type=="BUS") {echo 'Business Opportunities';}?>
<?if ($type=="COM") {echo 'Commercial';}?>
<?if ($type=="CON") {echo 'Condo/Townhouse';}?>
<?if ($type=="DUP") {echo 'Duplex';}?>
<?if ($type=="FAR") {echo 'Farms & Ranches';}?>
<?if ($type=="INC") {echo 'Income Properties';}?>
<?if ($type=="LAK") {echo 'Lake Properties/Waterfront';}?>
<?if ($type=="MOB") {echo 'Mobile Home';}?>
<?if ($type=="RES") {echo 'Residential';}?>
<?if ($type=="TIM") {echo 'Time Share';}?>
<?if ($type=="VAC") {echo 'Vacant Land';}?> <br>
<? echo$bedrooms?> BR / <? echo$bathrooms?> BA<br>
<? echo$city?>, <? echo$state?></td>
</tr>
</table>
<?}
$total_results = mysql_result(mysql_query($sql1),0);
// Figure out the total number of pages. Always round up using ceil()
$total_pages = ceil($total_results / $max_results);
// Build Page Number Hyperlinks
echo "<center>Select a Page<br />";
// Build Previous Link
if($page > 1){
$prev = ($page - 1);
echo "<a href=\"".$PHP_SELF."?page=$prev\"><<Previous</a> ";
}
for($i = 1; $i <= $total_pages; $i++){
if(($page) == $i){
echo "$i ";
} else {
echo "<a href=\"".$PHP_SELF."?page=$i\">$i</a> ";
}
}
// Build Next Link
if($page < $total_pages){
$next = ($page + 1);
echo "<a href=\"".$PHP_SELF."?page=$next\">Next>></a>";
}
echo "</center>";
include("$config[template_path]/user_bottom.html");
?>
--
Best regards,
Richard mailto:[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hello,
Webyog, the creator of SQLyog - the most popular GUI for MySQL has released
SQLyog v4.0.
Starting from v4.0, SQLyog is available in two editions: SQLyog and SQLyog
Enterprise.
SQLyog is FREE for personal and commercial use.
SQLyog contains all features of SQLyog Enterprise - except the following
Power Tools:
* HTTP / SSH Tunneling - Manage MySQL even if your ISP disallows remote
connections
* Data Synchronization - Zero install MySQL Replication
* Schema Synchronization - Keep test and production databases in sync
* Notification Services - Send formatted resulsets over email at regular
intervals
* ODBC Import - Wizard driven painless migration to MySQL
Please visit the following link for to view the feature comparison between
SQLyog and SQLyog Enterprise.
http://www.webyog.com/sqlyog/featurematrix.html
Thanks for your attention!
Regards,
Ritesh
http://www.webyog.com
--- End Message ---
--- Begin Message ---
On Mon, 2004-12-06 at 00:38, Ritesh Nadhani wrote:
> Hello,
>
> Webyog, the creator of SQLyog - the most popular GUI for MySQL has released
> SQLyog v4.0.
1. Your product isn't PHP related so bugger off.
2. The most popular GUI for MySQL?? WTF are you smoking?
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
> On Mon, 2004-12-06 at 00:38, Ritesh Nadhani wrote:
>> Hello,
>>
>> Webyog, the creator of SQLyog - the most popular GUI for MySQL has
>> released SQLyog v4.0.
>
> 1. Your product isn't PHP related so bugger off.
> 2. The most popular GUI for MySQL?? WTF are you smoking?
>
Maybe you could have taken that offlist Rob ? I have tried the others, and
I can speak highly of thisapp. It has some features not even navicat has.
--- End Message ---
--- Begin Message ---
Regardless of the quality of the application, It is php-related only
through PHP's relationship with MySQL. Therefore its quality as a PHP
App would be relitively low.
Besides all that it's spam(unless there is some unwritten
agreement/convention that I'm not aware of), so ....................
PS Sorry for sending this to you twice Daniel. I forgot to change the
reply to reply to the list first time around.
On Mon, 6 Dec 2004 06:10:17 +0000, Rory Browne <[EMAIL PROTECTED]> wrote:
> Regardless of the quality of the application, It is php-related
> through PHP's relationship with MySQL. Therefore its quality as a PHP
> App would be relitively low.
>
> Besides all that it's spam(unless there is some unwritten
> agreement/convention that I'm not aware of), so ....................
>
>
>
>
> On Mon, 6 Dec 2004 16:57:28 +1100 (EST), [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> > > On Mon, 2004-12-06 at 00:38, Ritesh Nadhani wrote:
> > >> Hello,
> > >>
> > >> Webyog, the creator of SQLyog - the most popular GUI for MySQL has
> > >> released SQLyog v4.0.
> > >
> > > 1. Your product isn't PHP related so bugger off.
> > > 2. The most popular GUI for MySQL?? WTF are you smoking?
> > >
> >
> > Maybe you could have taken that offlist Rob ? I have tried the others, and
> > I can speak highly of thisapp. It has some features not even navicat has.
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
On Mon, 2004-12-06 at 00:38, Ritesh Nadhani wrote:
Hello,
Webyog, the creator of SQLyog - the most popular GUI for MySQL has
released SQLyog v4.0.
1. Your product isn't PHP related so bugger off.
2. The most popular GUI for MySQL?? WTF are you smoking?
Maybe you could have taken that offlist Rob ? I have tried the others, and
I can speak highly of thisapp. It has some features not even navicat has.
no. Rob is right. This OP send a junk email, a spam and something that
is off topic. In case you don't know, sending off topic message is
considered very rude.
Now let's all of us (my self included) shut up before this thread goes
out of hand.
--
Raditha Dissanayake.
------------------------------------------------------------------
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/ | Drag and Drop Upload
--- End Message ---
--- Begin Message ---
Take this and shove it up where the sun does not shine (or up your 'yog')
you filthy spammer.
"The most popular GUI for MySQL"....ever hear of PHPMyAdmin? Dumbass.
On 12/6/2004 6:38:11 AM, Ritesh Nadhani ([EMAIL PROTECTED]) wrote:
> Hello,
> Webyog, the creator of SQLyog - the most popular GUI for MySQL has
> released
>
> SQLyog v4.0.
> Starting from v4.0, SQLyog is available in two editions: SQLyog and SQLyog
> Enterprise.
>
>
>
> SQLyog is FREE for personal and commercial use.
>
>
>
> SQLyog contains all features of SQLyog Enterprise - except the following
>
> Power Tools:
>
>
>
> * HTTP / SSH Tunneling - Manage MySQL even if your ISP disallows remote
>
> connections
>
> * Data Synchronization - Zero install MySQL Replication
>
> * Schema Synchronization - Keep test and production databases in sync
>
> * Notification Services - Send formatted resulsets over email at regular
>
> intervals
>
> * ODBC Import - Wizard driven painless migration to MySQL
>
>
>
> Please visit the following link for to view the feature comparison
> between
>
> SQLyog and SQLyog Enterprise.
>
> http://www.webyog.com/sqlyog/featurematrix.html
>
>
>
> Thanks for your attention!
>
>
>
> Regards,
>
> Ritesh
>
> http:
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.289 / Virus Database: 265.4.5 - Release Date: 12/3/2004
--- End Message ---
--- Begin Message ---
If I'm not mistaken Al wanted to return something if the thing failed,
without having to put it inside an if_block.
I'm watching this with curiosity, because return is a language
construct, and not a function, or anything that has a value.
I could probably have said that better sober, and not at 06:16am, but
hopefully you get my drift.
On Mon, 06 Dec 2004 09:11:26 +1000, Ligaya Turmelle <[EMAIL PROTECTED]> wrote:
> <snip>
> > $db_link= mysql_connect($host, $user, $pw)
> > OR die("Could not connect: " . mysql_error());
> </snip>
>
> try:
> $db_link= mysql_connect($host, $user, $pw);
> if (!$db_link){
> // do whatever if there is something wrong
> }
>
> maybe try something like that with the file_get_contents also?
>
> Respectfully,
> Ligaya Turmelle
>
> ---
> Life is a game... so have fun.
> ---
> www.PHPCommunity.org
> Open Source, Open Community
> Visit for more information or to join the movement
>
>
>
>
> Al wrote:
> > I've searched the PHP manual and can't find an answer for this question
> >
> > I'd like to use the "OR DIE" construct; but instead of "DIE" I'd like to
> > use "RETURN FOO". I haven't found a way to do it.
> >
> >
> > $string= file_get_contents($filename)
> > OR die("Could not read file");
> >
> > $db_link= mysql_connect($host, $user, $pw)
> > OR die("Could not connect: " . mysql_error());
> >
> > Seems like it would be nice to not have to test first, e.g.,
> > if(is_readable($filename)){.... }
> >
> > Thanks....
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
On Monday 06 December 2004 14:19, Rory Browne wrote:
> If I'm not mistaken Al wanted to return something if the thing failed,
> without having to put it inside an if_block.
>
> I'm watching this with curiosity, because return is a language
> construct, and not a function, or anything that has a value.
You can have:
... OR $error = "Oh dear";
But the say I see it, eventually, somewhere in your code you need to test for
it. Essentially you're just moving the test somewhere else.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
There's a whole WORLD in a mud puddle!
-- Doug Clifford
*/
--- End Message ---
--- Begin Message ---
Please do not top post.
On Monday 06 December 2004 00:22, Dade Register wrote:
> It's a new installation. I did restart Apache after re-compiling PHP.
> phpinfo() shows my config command I used is:
> ./configure' '--with-apxs2=/usr/local/apache2/bin/apxs'
> '--with-mysql=/usr/local/mysql' '--with-zlib-dir=/usr/local/lib'
> '--with-jpeg-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib'
> '--with-png-dir=/usr/local/lib' '--with-libxml-dir=/usr/local/lib'
> '--with-iconv-dir=/usr/local/lib' '--with-gd-dir=/usr/local/lib'
> '--without-xpm' '--enable-gd-native-ttf' '--enable-exif' '--enable-ftp'
'--with-gd-dir=/usr/local/lib'
should be
'--with-gd=/usr/local/lib'
An annoyance (or gotcha) with PHP's ./configure command is that it does not
warn you if you use totally bogus options, eg:
./configure --with-super-thingamajit
will happily make and install with no errors or warnings.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
In my end is my beginning.
-- Mary Stuart, Queen of Scots
*/
--- End Message ---
--- Begin Message ---
Hello there, i'm developing an application using egroupware, i really
needed the php Groupware API for that... does anyone know where should
i find it.., i've try google but still can't found it..
Thanks
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GU/IT d- s: a-- C++ UL P L++ E W++ N* o-- K-
w PS Y-- PGP- t++ 5 X R++ tv b+ DI D+ G e+ h* r- z?
------END GEEK CODE BLOCK------
--- End Message ---
--- Begin Message ---
Goodmorning all,
My application (a third party customized cms) shares sessions across the
main site and the two subdomains - or at least it should....
I have 'php_value session.cookie_domain ".mysite.com"
and 'php_value session.cookie_path "/"
all set in htaccess
The sesions are stored in a db and are not functioning correctly across
the subdomains - example: if i log in at the main www domain then go
the subdom1.mysite.com i am not logged in there. The subdomains have
their own db's but share tables for sessions and some other stuff with
the main site.
As it's a third party app i can be no more specific unless someone would
be kind enough to tell me what to look for or what info to provide. So,
here is my question:
* Are there any "common pitfalls" you can think of that i should look
at?
* Have I set the domain and path correctly for this to work?
any help in regard to what direction to take to track down the problem
would be really appreciated, much thanks for you time...
--
Nick W
--- End Message ---
--- Begin Message ---
I had a similar problem before. I had my admin at admin.mydomain.com, and
the cookies did not transfer. I changed it to www.mydomain.com/admin
instead...
In my host my subdomain admin.mydomain.com is located in
www.mydomain.com/admin, I assume similar structure for you?
/Peter
"Nick Wilson" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Goodmorning all,
>
> My application (a third party customized cms) shares sessions across the
> main site and the two subdomains - or at least it should....
>
> I have 'php_value session.cookie_domain ".mysite.com"
> and 'php_value session.cookie_path "/"
>
> all set in htaccess
>
> The sesions are stored in a db and are not functioning correctly across
> the subdomains - example: if i log in at the main www domain then go
> the subdom1.mysite.com i am not logged in there. The subdomains have
> their own db's but share tables for sessions and some other stuff with
> the main site.
>
> As it's a third party app i can be no more specific unless someone would
> be kind enough to tell me what to look for or what info to provide. So,
> here is my question:
>
> * Are there any "common pitfalls" you can think of that i should look
> at?
>
> * Have I set the domain and path correctly for this to work?
>
> any help in regard to what direction to take to track down the problem
> would be really appreciated, much thanks for you time...
>
> --
> Nick W
--- End Message ---
--- Begin Message ---
i have script that passes variables through it then it generates xml
on a remote server . how would i parse that
here they are
http://bluemoonlabs.net/weather.php
http://bluemoonlabs.net/parse.php
--- End Message ---
--- Begin Message ---
Security?
Have you called session_start(); ???
/Peter
"Steve" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Steve wrote:
>
> > I'm having a problem with session variables.
>
> Never mind. Seems that the hosting company decided this week to switch
from
> register_globals off to register_globals on. I'm not the first person to
> call them about this!
>
> --
> @+
> Steve
--- End Message ---
--- Begin Message ---
* Adwinwijaya <[EMAIL PROTECTED]>:
> Monday, December 6, 2004, 11:33:28 AM, you wrote:
>
> MWOP> In you .htaccess:
>
> MWOP> <File index>
> MWOP> ForceType application/x-httpd-php
> MWOP> </File>
> MWOP> DirectoryIndex index
>
> MWOP> Then, in your script, you'll need to access the PATH_INFO environment
> MWOP> variable via the $_SERVER array to parse out the argument(s):
>
> MWOP> $pi = $_SERVER['PATH_INFO']; // Grab PATH_INFO
> MWOP> $pi = substr($pi, 1); // Remove the opening slash
> MWOP> $args = split('/', $pi); // Create array of arguments
> MWOP> $f = $args[0]; // Grab first argument
>
> I just want to clarify,
>
> if I type:
> www.mysite.com/article/file/19911/year/2004
> means: www.mysite.com/article.php?file=19911&year=2004 right ?
> :)
>
> and i have to put this script on my article.php, is it right ?
A couple things:
'article.php' will have to become just 'article' for the above to work
(unless you can do rewriting, but you indicated that you don't have
access to your httpd.conf file). The directions for doing that are
above; just substitute 'article' for 'index' in the <File index> area.
Second, you have to map the placement of each argument in the PATH_INFO
to a variable. So, based on the url you just provided, you'd do
something like this:
$pi = $_SERVER['PATH_INFO']; // Grab PATH_INFO; this will look
// like /file/XXX/year/XXXX based on
// your example above
$pi = substr($pi, 1); // Remove the opening slash
$args = split('/', $pi); // Create array of arguments
for ($i = 0; $i < count($args); $i + 2) {
$key = $args[$i]; // Grab variable name from even-keyed
// arguments
$val = $args[$i + 1]; // Grab value from odd arguments
$$key = $val; // Use dynamic variable assignment
}
Basically, with PATH_INFO, YOU have to do the work of determining where
items in the url map to variables for your script.
--
Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association | http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
--- End Message ---
--- Begin Message ---
On Monday 06 December 2004 20:11, Matthew Weier O'Phinney wrote:
> 'article.php' will have to become just 'article' for the above to work
> (unless you can do rewriting, but you indicated that you don't have
> access to your httpd.conf file). The directions for doing that are
> above; just substitute 'article' for 'index' in the <File index> area.
What you can do is create a symlink for article.php -
ln -s article.php article
That way you'll edit and upload file as 'article.php' and apache will see it
as 'article'. This also solves the problem whereby some editors does syntax
highlighting based on the filename's extension. A filename of 'article' has
no extension and hence no highlighting (unless you manually set it each time
you load and edit the file).
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
* BenC wonders why he has upgraded to 3.3.5-1 before teh X maintainer
*/
--- End Message ---
--- Begin Message ---
Hi all,
I have that script in php that should print on a page the result of lot of
pages defined in this way:
This is the address: www.mysite.com/mypage.php?idx=1&lines=50
It work in this way: if idx=1 and lines=50 my page will look like:
element1
element2
..
element50
if idx=5 and lines=5 my page will look like:
element5
element6
element7
element8
element9
Changing everytime the idx i have new pages so, thats are my variables:
$idx = "www.mysite.com/mypage.php?idx=";
idx_n=1;
$lines="&lines=50";
I let the variable $lines still to 50 and i'll increase $idx_n of 50 for
show all elements i need.
do {
$link = $idx.$idx_n.$lines;
$idx_n=$idx_n + 50;
$f=fopen($link,"r");
$data = "";
do {
$stream = fread($f, 8192);
if (strlen($stream) == 0) {
break;
}
$data .= $stream;
} while (true);
fclose($f);
$data=substr($data,strlen($DontNeed),strlen($data));
$pos=stripos($data, $TillHere);
$data=substr($data,0,$pos);
here I clean the $data variable of things I don't need.
echo $data;
} while ($idx_n < 156700);
My trouble is that this "do..while" never keeps all elements.
Generally $idx_n break with value=1601 or 1301 but never show all elements
and its like the script crash cause everything I can write after isnt'
showed.
I simply tried to write after "while" an echo "Its Done"; but isn't showed.
And in the html file that is generated aren't printed neither the tags
</body></html> for close the file.
Simply it crash.
Do someone have some ideas about it?
I would really apprecciate some words about it cause I'm not able to think
at any solutions..
Just..that maybe is something with server? Isn't able to provide so fastly
all requests?
Best Regards
Salvatore
--- End Message ---
--- Begin Message ---
Hi all,
I have installed Apache 2 under Fedora Core 2 and now I would like to
install PHP 5.02 as a server module.
I have downloaded and unpacked PHP 5.02, and I think that I need to run
./configure now but I don't know which parameters I need to add.
I have added --prefix=dir --with-mysql=dir --with-curl
But I want to add many other modules I might need. Do I need to specify the
entire list of modules in the command line? Or how can I create and choose a
config file?
And please tell me what option do I need to install the Apache 2 module.
I have seen some parameters in the ./configure --help instructions for
installing the module for Apache 2, but I saw that that module is only
experimental. Isn't there a working module for PHP 5.02 and Apache 2?
And do you know where the Apache 2 module is put after installing php? (in
order to specify it in httpd.conf).
Thank you.
Teddy
--- End Message ---