|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help
lists.php.net
Date: Fri May 16 2008 - 22:45:48 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 17 May 2008 03:45:48 -0000 Issue 5463
Topics (messages 274412 through 274461):
Re: fsockopen + fputs
274412 by: Nathan Rixham
php4 -> php5 session problem
274413 by: Juergen Falb
274415 by: paragasu
274434 by: Juergen Falb
Re: Plugins... (like wordpress?)
274414 by: paragasu
274422 by: Larry Garfield
274425 by: Eric Butera
Re: changing order of items
274416 by: Iv Ray
274417 by: Iv Ray
274418 by: Iv Ray
Re: question about validation and sql injection
274419 by: Iv Ray
274426 by: Boyd, Todd M.
Re: Scripts slowing down?
274420 by: René Leboeuf
Re: SetEnv directives in VirtualHost configuration not accessible in PHP
274421 by: Iv Ray
274424 by: Dmitri
274461 by: Dietrich Bollmann
encoding to a file
274423 by: J. Manuel Velasco - UBILIBET
Re: $_SESSION lost
274427 by: Daniel Brown
Re: JavaScript and PHP
274428 by: Ford, Mike
274430 by: Boyd, Todd M.
274433 by: Ford, Mike
274460 by: tedd
OT - Question about nested sortable lists
274429 by: Jim Lucas
274431 by: Bastien Koert
274432 by: Eric Butera
Problems with includes
274435 by: Tyson Vanover
274438 by: Dan Joseph
274440 by: Jim Lucas
274441 by: Tyson Vanover
274442 by: Tyson Vanover
274445 by: Jim Lucas
274446 by: Jim Lucas
274447 by: Andrew Ballard
274448 by: Dan Joseph
274451 by: Tyson Vanover
274452 by: Dan Joseph
274453 by: Jim Lucas
274454 by: Tyson Vanover
274455 by: Tyson Vanover
HELP !!!!! PHP SOAP Not building objects correctly
274436 by: Tim Traver
274444 by: Nathan Nobbe
274450 by: Tim Traver
Threads PHP
274437 by: Cesar D. Rodas
274439 by: Dan Joseph
274443 by: Brice
274449 by: Richard Heyes
274457 by: steve
PHP-reference
274456 by: Daniel Kressler
274458 by: Daniel Brown
274459 by: Daniel Kressler
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
debussy007 wrote:
> Hello,
>
> I use fsockopen and fputs to call a distant URL, but I have the following
> error :
> The requested URL /registration/test was not found on this server.
>
> This is my code:
>
> $req =
> 'username=' . $usr . '&password=' . $pass .
> '&date_of_birth=' . $year . "-" . $month . "-" . $day .
> '&email=' . $email . '&country=' . $country;
>
> $fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
> if (!$fp) {
> echo "$errstr ($errno)<br>\n";
> } else {
> $header = "POST /registration/test HTTP/1.0\r\n";
> $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
> $header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
> fputs ($fp, $header . $req);
>
> while (!feof($fp)) {
> echo fgets($fp, 1024);
> }
> fclose($fp);
> }
>
> However the path www.example.com/registration/test exists
> so why does it says it cannot find the requested url ?
>
> Any idea ? Thank you for any help !!
try changing to
POST /registration/test/ HTTP/1.0\r\n
note the trailing slash on test
also if that fails try http/1.1
attached mail follows:
Dear all,
since upgrading to php5 I've a problem with session handling. In php4
a user initiated a session, the session id gets afterwards handed over
to a payment provider. When the payment provider calls a script with
the session id added to the query string, all session data gets loaded
and everything works fine. When I switch to php5 all session data gets
lost and the session file has zero length afterwards. Attached is a
short script to verify the behaviour:
<?php
session_name('XTCtest');
if (isset($_GET['sid'])) $sessid = session_id($_GET['sid']);
session_start();
if (isset($_GET['set']))
$_SESSION['customer_id']=$_GET['set'];
echo "<html><head><title>test</title></head><body>your customer id is
" .$_SESSION['customer_id']." and session id is
".session_id()."<body></html>";
?>
calling the script from machine 1 with query string "?set=4711"
returns the correct value.
calling the script again from machine 1 without a query string and
cookies enabled works as expected (returns 4711).
calling the script from machine 2 with query string "?
XTCtest=<sessionid>" or "?sid=<sessionid>" works perfectly on php4 and
return 4711. On php5 session data is lost and nothing is returned.
Does anybody have a clue what I miss or have to change for php5?
regards,
Juergen
P.S: attached are the php.ini setting for php5
session.save_handler = files
session.save_path = "/tmp"
session.use_cookies = 1
session.use_only_cookies = 0
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
attached mail follows:
On Fri, May 16, 2008 at 6:40 PM, Juergen Falb <falb
ict.tuwien.ac.at> wrote:
> Dear all,
> since upgrading to php5 I've a problem with session handling. In php4 a
> user initiated a session, the session id gets afterwards handed over to a
> payment provider. When the payment provider calls a script with the session
> id added to the query string, all session data gets loaded and everything
> works fine. When I switch to php5 all session data gets lost and the session
> file has zero length afterwards. Attached is a short script to verify the
> behaviour:
>
> <?php
> session_name('XTCtest');
> if (isset($_GET['sid'])) $sessid = session_id($_GET['sid']);
> session_start();
>
> if (isset($_GET['set']))
> $_SESSION['customer_id']=$_GET['set'];
>
> echo "<html><head><title>test</title></head><body>your customer id is "
> .$_SESSION['customer_id']." and session id is
> ".session_id()."<body></html>";
> ?>
>
> calling the script from machine 1 with query string "?set=4711" returns the
> correct value.
> calling the script again from machine 1 without a query string and cookies
> enabled works as expected (returns 4711).
>
> calling the script from machine 2 with query string "?XTCtest=<sessionid>"
> or "?sid=<sessionid>" works perfectly on php4 and return 4711. On php5
> session data is lost and nothing is returned.
>
> Does anybody have a clue what I miss or have to change for php5?
>
> regards,
> Juergen
>
> P.S: attached are the php.ini setting for php5
>
> session.save_handler = files
> session.save_path = "/tmp"
> session.use_cookies = 1
> session.use_only_cookies = 0
> session.name = PHPSESSID
> session.auto_start = 0
> session.cookie_lifetime = 0
> session.cookie_path = /
> session.cookie_domain =
> session.serialize_handler = php
> session.gc_probability = 1
> session.gc_divisor = 1000
> session.gc_maxlifetime = 1440
> session.bug_compat_42 = 1
> session.bug_compat_warn = 1
> session.referer_check =
> session.entropy_length = 0
> session.entropy_file =
> session.cache_limiter = nocache
> session.cache_expire = 180
> session.use_trans_sid = 0
> session.hash_function = 0
> session.hash_bits_per_character = 5
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
i got the same problem last time. The session lost after i do a page
forwarding using
the header('Location:') thing..
i fix it by adding session_write_close(); before the header()..
attached mail follows:
I've already tried adding session_write_close(); It didn't help. The
session file gets saved and contains data after the first request,
making the request from another machine resets everything. It even
doesn't work if you make the request manually from different machines
with the same session id allowing enough time between the requests.
Am 16.05.2008 um 13:24 schrieb paragasu:
>
>
> On Fri, May 16, 2008 at 6:40 PM, Juergen Falb
> <falb
ict.tuwien.ac.at> wrote:
> Dear all,
> since upgrading to php5 I've a problem with session handling. In
> php4 a user initiated a session, the session id gets afterwards
> handed over to a payment provider. When the payment provider calls a
> script with the session id added to the query string, all session
> data gets loaded and everything works fine. When I switch to php5
> all session data gets lost and the session file has zero length
> afterwards. Attached is a short script to verify the behaviour:
>
> <?php
> session_name('XTCtest');
> if (isset($_GET['sid'])) $sessid = session_id($_GET['sid']);
> session_start();
>
> if (isset($_GET['set']))
> $_SESSION['customer_id']=$_GET['set'];
>
> echo "<html><head><title>test</title></head><body>your customer id
> is " .$_SESSION['customer_id']." and session id is
> ".session_id()."<body></html>";
> ?>
>
> calling the script from machine 1 with query string "?set=4711"
> returns the correct value.
> calling the script again from machine 1 without a query string and
> cookies enabled works as expected (returns 4711).
>
> calling the script from machine 2 with query string "?
> XTCtest=<sessionid>" or "?sid=<sessionid>" works perfectly on php4
> and return 4711. On php5 session data is lost and nothing is returned.
>
> Does anybody have a clue what I miss or have to change for php5?
>
> regards,
> Juergen
>
> P.S: attached are the php.ini setting for php5
>
> session.save_handler = files
> session.save_path = "/tmp"
> session.use_cookies = 1
> session.use_only_cookies = 0
> session.name = PHPSESSID
> session.auto_start = 0
> session.cookie_lifetime = 0
> session.cookie_path = /
> session.cookie_domain =
> session.serialize_handler = php
> session.gc_probability = 1
> session.gc_divisor = 1000
> session.gc_maxlifetime = 1440
> session.bug_compat_42 = 1
> session.bug_compat_warn = 1
> session.referer_check =
> session.entropy_length = 0
> session.entropy_file =
> session.cache_limiter = nocache
> session.cache_expire = 180
> session.use_trans_sid = 0
> session.hash_function = 0
> session.hash_bits_per_character = 5
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> i got the same problem last time. The session lost after i do a
> page forwarding using
> the header('Location:') thing..
> i fix it by adding session_write_close(); before the header()..
attached mail follows:
there is two way you can do this (there is more). using the function
include()
to include files based on query string or using call_user_func()
you can keep all the files/modules in one folder.
pass the module reference using GET.
from the GET we can determine which function we want to call using include()
or call_user_func()
be careful, do not pass the filename for the include because it used to be
some security problem. you can do an array instead
$modules['gallery'] = 'gallery.php'; //gallery.php is filename
so we can pass the modules to the program as eg: www.domain.com/?mod=gallery
then do
include($module[$_GET['mod']]);
you can use file_exists() function to determine the file actually exist
prior to the include()..
good luck..
attached mail follows:
I can't speak for WordPress's implementation, but in Drupal we have pluggable
modules by way of magically named functions.
A sort of over-simplified version would be:
/modules/foo/foo.module
/modules/bar/bar.module
Core system scans the modules directory (only when asked, not every page load)
and adds "foo" and "bar" to a database table. Then an admin page lets the
admin check on that they should both be loaded. On page request,
both .module files are loaded. Then at various times in the code, there is
something like this:
$return = module_invoke_all('myhookname', $somevar);
function module_invoke_all($hook) {
$args = func_get_args();
array_shift($args);
foreach (module_list() as $module) {
$function = $module .'_'. $hook;
if (function_exists($function)) {
$return[] = call_user_func_array($function, $args);
}
}
return $return;
}
And then there's a crapload of those calls, so you can "hook" into the page
process in a zillion places. It makes the system very flexible.
Before someone says that the above is slow because it's preloading all code,
you're right. :-) We actually just refactored our development version to do
a self-inspection and load files by function on demand, but I left that out
here for illustrative purposes.
http://www.garfieldtech.com/drupal-7-registry
On Friday 16 May 2008, Ryan S wrote:
> Hey,
>
> Have just started screwing around with wordpress and I must say... it has a
> lot of really really nice bits and pieces... two of my favourites are
> widgets and plugins... not a hundred percent certain exactly what the diff
> is though! :)
>
> Anyway, was thinking it would be a great way to program for my next
> project... instead of jumping into the code again and again... write
> specific code and throw the file into the directory... then it either gets
> read and executed automatically or have a feature like WP where you have to
> "activate" it... only problem is, i dont know where to begin... i did do a
> little google searching and have a rough idea.. but would appreciate it if
> YOU could give me some links or code that got you started... something that
> was easy when you were beginning... something that lit that lightbulb in
> your head when you read it...
>
> Thanks in advance!
> R
>
> ------
> - The faulty interface lies between the chair and the keyboard.
> - Creativity is great, but plagiarism is faster!
> - Smile, everyone loves a moron. :-)
--
Larry Garfield AIM: LOLG42
larry
garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
attached mail follows:
On Fri, May 16, 2008 at 1:46 AM, Ryan S <genphp
yahoo.com> wrote:
> Hey,
>
> Have just started screwing around with wordpress and I must say... it has a lot of really really nice bits and pieces... two of my favourites are widgets and plugins... not a hundred percent certain exactly what the diff is though! :)
>
> Anyway, was thinking it would be a great way to program for my next project... instead of jumping into the code again and again... write specific code and throw the file into the directory... then it either gets read and executed automatically or have a feature like WP where you have to "activate" it... only problem is, i dont know where to begin... i did do a little google searching and have a rough idea.. but would appreciate it if YOU could give me some links or code that got you started... something that was easy when you were beginning... something that lit that lightbulb in your head when you read it...
>
> Thanks in advance!
> R
>
> ------
> - The faulty interface lies between the chair and the keyboard.
> - Creativity is great, but plagiarism is faster!
> - Smile, everyone loves a moron. :-)
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
I'm really into the Event Dispatcher stuff now to add plugins to my shared code.
http://stubbles.net/wiki/Docs/EventHandling
attached mail follows:
Eric Butera wrote:
> I use this:
>
> http://developer.yahoo.com/yui/examples/dragdrop/dd-reorder.html
Looks good.
I still can't decide for one of these "big" libraries, prefer to use
"small" things which I can fix/change, if the author does not have time
or desire.
--
attached mail follows:
afan pasalic wrote:
> But, actually, I need something more simple. Nothing "fancy" :D.
I thought so from the beginning, just thought - it does not hurt to show
different possibilities. May be you will not implement it now, but when
you know about it, it might give you ideas in future.
--
attached mail follows:
Jason Murray wrote:
> I am assuming that each time you click the up or down arrow you are
> re-loading the page (via a GET request). A simple solution to this, would
> be to adjust the URLs assigned to the up and down arrows to carry an extra
> variable, the item either directly above or directly below the one selected,
> and instead of doing whole-sale renumbering, create a swap function. That
> just swaps the position of the two items.
Very good idea.
attached mail follows:
Hej Sudhakar,
what a long e-mail ;) !
I would suggest you use e-mail address as user name. There are many good
reasons why to do so, I will give you some, if you wish.
Iv
attached mail follows:
Sudhakar,
Bundling your parameters and using "prepared statements" will prevent
any and all SQL Injection from taking place, as the parameters
themselves will NEVER (repeat, NEVER) be considered a "part" of the
query. They are considered only to be data to be used in the query.
Example:
[code]
$dbc = mysqli_connect($host, $user, $pass, $db) or die("Couldn't
connect: " . mysqli_error());
$username = $_POST['user'];
$query = "insert into `mytable` values(?)"; // the ? represents where
your parameter will be bundled
$stmt = mysqli_stmt_init($dbc);
if(mysqli_stmt_prepare($stmt, $query))
{
mysqli_stmt_bind_param($stmt, 's', $username); // the 's' means
"string value"
mysqli_stmt_execute($stmt);
}
[/code]
Hope this helps! Here's a tutorial on prepared statements using
PHP/MySQL:
http://www.databasejournal.com/features/mysql/article.php/3599166
Todd Boyd
Web Programmer
> -----Original Message-----
> From: Sudhakar [mailto:sudhakararaog
gmail.com]
> Sent: Thursday, May 15, 2008 5:26 PM
> To: php-general
lists.php.net
> Subject: [PHP] question about validation and sql injection
>
> A) validating username in php
>
> as part of a registration form a user fills there desired username and
> this
> is stored in a mysql. there are certain conditions for the username.
>
> a) the username should only begin either letters or numbers, and
> Underscore
> character
> example = user123, 123user, u_ser123, user_123 = completely case
> insensitive
> b) a user may choose not to have an underscore or numbers sometimes.
> example
> = username
>
> presently my validation for username is
>
> $username = $_POST["username"];
> if( $username == "" || !eregi("^[a-zA-Z0-9_]+$", $username) )
> {
> $error.="User name cannot be blank or has special characters";
> }
>
> Question = how can i rewrite this php validation for username to meet
> the
> above criteria or is my validation correct
>
>
> B) preventing sql injection
>
> till now i have been capturing the form values and directly inserting
> into
> the table without considering sql injection however for this project
as
> it
> is for a forum i would like to implement prevention of sql injection.
> from
> what i have read about preventing sql injection there are several
steps
> that
> need to be followed,
>
> htmlentities
> addslashes
> trim
> mysql-real-escape-string
> magic_quotes_gpc is ON
> magic_quotes_runtime is OFF
> magic_quotes_sybase is OFF
>
> as i have not done preventing sql injection i am not sure what is the
> correct process.
>
> Question =
>
> a) please advice a step by step process of how to go about avoiding
the
> sql
> injection before the insert sql query is executed starting from
>
> $username = $_POST["username"]; till the
>
> insert into tablename(field1, field2) values($value1, $value2) SQL
> query is
> executed which will prevent sql injection even if the user enters any
> special characters while filling the form.
>
> b) should i consider the setting of magic quotes as in should it be ON
> or
> OFF or should i ignore it if so should it be
> ON or OFF
>
> c) also with the prevention methods if a user types a special
character
> in
> the data will that character be written in the table as a escaped
> character
> or how does it store those special characters
>
> d) a very important point here, i have a feature where a user can
check
> if a
> username is available or not. so while storing a username if the
> username is
> stored as john\smith in mysql and if the user is searching for
> johnsmith
> this would not match, so even in the table the username should be
> stored
> without slashes as i have to read the username and compare with what
> the
> user has typed to see if they both are same or different.
> please advice if i have missed any other steps to prevent sql
> injection.
>
> thanks a lot for your help.
attached mail follows:
Per Jessen a écrit :
>>> They _all_ slow down after a while? How many emails are you sending
>>> in this way?
>> Some of our mailing are +100.000 emails...
>
> There is a possibility that your filesystem is having difficulties
> dealing with that many files, escpecially if they are all in one
> directory. Which mailserver and which filesystem are you using?
This is sendmail 8.13.1 (RHEL4) on ext3. We consider moving to ReiserFS.
There are 50queues split on 5disks, but it is very rare to have more
than a total of 3.000mails waiting in the queues.
attached mail follows:
I had similar problem some time ago, and there was some solution, which
I can't remember now.
Do you still have the problem?
I'll can have a look, if still needed.
Iv
attached mail follows:
If you are on apache2 server, try |$myvar =
apache_getenv("|APP_CONFIG_SECTION|");
echo $myvar
and see if it has value that you expect
|
Dietrich Bollmann wrote:
>Hi,
>
>I have the following directive in my virtual host configuration:
>
> SetEnv APP_CONFIG_SECTION "development"
>
>and would like to access the value from PHP with
>getenv('APP_CONFIG_SECTION') or $_SERVER['APP_CONFIG_SECTION'] or
>whatever. But none of them work.
>
>Is there any PHP / Zend / Apache2 / ... configuration option etc. I have
>to activate / deactivate in order to use SetEnv?
>
>I am using the Debian packate apache / php installation and the current
>version of the Zend Framework.
>
>I tried to use `safe_mode_allowed_env_vars = PHP_, APP_CONFIG_' in
>php.ini - but this didn't change anything either.
>
>mod_env seems to be loaded also: /etc/apache2/mods-enabled/env.load
>-> ../mods-available/env.load
>
>Thanks, Dietrich
>
>
>
>
>
>
--
Open Source ALL content management
with streaming video
http://wiki.sharedlog.com
attached mail follows:
Hi Iv and Dmitri,
Thanks for your help!
The solution to my problem came under the shower - as usual :)
I have to admit that I would prefer to not tell you the truth ... but:
I did all my configuration in the httpd.conf of another
project ... ... :) :( :) :)
...sometimes it is wiser to sleep about a problem before stealing other
peoples time... (and sometimes, unfortunately, the opposite is true).
Thank you again, Dietrich
On Fri, 2008-05-16 at 14:24 +0200, Iv Ray wrote:
I had similar problem some time ago, and there was some solution, which
> I can't remember now.
>
> Do you still have the problem?
>
> I'll can have a look, if still needed.
>
> Iv
On Fri, 2008-05-16 at 10:10 -0400, Dmitri wrote:
If you are on apache2 server, try |$myvar =
> apache_getenv("|APP_CONFIG_SECTION|");
> echo $myvar
> and see if it has value that you expect
> Dietrich Bollmann wrote:
>
> >Hi,
> >
> >I have the following directive in my virtual host configuration:
> >
> > SetEnv APP_CONFIG_SECTION "development"
> >
> >and would like to access the value from PHP with
> >getenv('APP_CONFIG_SECTION') or $_SERVER['APP_CONFIG_SECTION'] or
> >whatever. But none of them work.
> >
> >Is there any PHP / Zend / Apache2 / ... configuration option etc. I
have
> >to activate / deactivate in order to use SetEnv?
> >
> >I am using the Debian packate apache / php installation and the
current
> >version of the Zend Framework.
> >
> >I tried to use `safe_mode_allowed_env_vars = PHP_, APP_CONFIG_' in
> >php.ini - but this didn't change anything either.
> >
> >mod_env seems to be loaded also: /etc/apache2/mods-enabled/env.load
> >-> ../mods-available/env.load
> >
> >Thanks, Dietrich
attached mail follows:
Hello.
When I create a file I need to specify the encoding to ISO-8859-1, how
can i do this please ?
I have read about stream:default:encoding() but I am not sure how to use it.
Thanks in advance.
--
attached mail follows:
On Fri, May 16, 2008 at 12:36 AM, hce <webmail.hce
gmail.com> wrote:
> Hi,
>
> I've just installed PHP 5.2.4 on a FC 7 with a web server.
>
> $ php -v
> PHP 5.2.4 (cli) (built: Sep 18 2007 08:50:58)
> Copyright (c) 1997-2007 The PHP Group
> Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
That's the CLI version, which is likely completely different from
your web version. They're generally two separate binaries.
> It seems some PHP module might be missing, I tested it with a page1.php:
Sessions are handled in the core, not in a module.
> session_start();
> $_SESSION['favcolor'] = 'green';
>
> Then I click a link in page1.php to go another page2.php:
>
> session_start();
> echo "favcolr =" . $_SESSION['favcolor'];
>
> It only displayed "favcolr =", it was empty in $_SESSION['favcolor'].
> The test script page1.php and page2.php are working fine on other
> machines.
Send the actual code and we can take a look at it. It's probably
something as simple as a typo.
--
</Daniel P. Brown>
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.
attached mail follows:
On 14 May 2008 21:21, tedd advised:
> At 7:31 PM +0100 5/14/08, Mário Gamito wrote:
>> Hi,
>>
>> I have this HTML/JS page that switches images
>> clicking on the radio buttons and call
>> template.php with the image ID as parameter:
>> http://portulan-online.net/einstein.html
>>
>> Now, I need to make it a PHP page, because it is
>> going to receive a parameter from the URL that
>> calls it and pass it as is to template.php
>
> Mário:
>
> The key here to remember is that javascript uses
> ID and php uses NAME for inputs.
That's incorrect. A form will function perfectly well with only name= attributes, and no ids, and it's quite possible for JavaScript to address the form elements using only the names (in fact, it's easier than via the ids as there's a short syntax for it!).
CSS and the DOM, however, use the ids as primary identifier, so use of either of those may demand the presence of ids.
Cheers!
Mike
--
Mike Ford, Electronic Information Developer,
C507, Leeds Metropolitan University, Civic Quarter Campus,
Woodhouse Lane, LEEDS, LS1 3HE, United Kingdom
Email: m.ford
leedsmet.ac.uk
Tel: +44 113 812 4730
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm
attached mail follows:
> -----Original Message-----
8< snip!
> That's incorrect. A form will function perfectly well with only name=
> attributes, and no ids, and it's quite possible for JavaScript to
> address the form elements using only the names (in fact, it's easier
> than via the ids as there's a short syntax for it!).
>
> CSS and the DOM, however, use the ids as primary identifier, so use of
> either of those may demand the presence of ids.
8< snip!
True, you can access an input named "myInput" in a form named "myForm"
by simply writing:
document.myForm.myInput.value = "Hello!";
BUT... for CSS, it's also quite easy to reference something by name:
[name="myElement"]
{
color: blue;
font-size: 10pt;
}
Todd Boyd
Web Programmer
attached mail follows:
On 16 May 2008 16:12, Boyd, Todd M. advised:
>> -----Original Message-----
>
> 8< snip!
>
>> That's incorrect. A form will function perfectly well with only
name=
>> attributes, and no ids, and it's quite possible for JavaScript to
>> address the form elements using only the names (in fact, it's easier
>> than via the ids as there's a short syntax for it!).
>>
>> CSS and the DOM, however, use the ids as primary identifier, so use
of
>> either of those may demand the presence of ids.
>
> 8< snip!
>
> True, you can access an input named "myInput" in a form named "myForm"
by
> simply writing:
>
> document.myForm.myInput.value = "Hello!";
>
> BUT... for CSS, it's also quite easy to reference something by name:
>
> [name="myElement"]
> {
> color: blue;
> font-size: 10pt;
> }
Well, true -- hence the qualifiers in "*primary* identifier" and "*may*
demand"!
Cheers!
Mike
--
Mike Ford, Electronic Information Developer,
C507, Leeds Metropolitan University, Civic Quarter Campus,
Woodhouse Lane, LEEDS, LS1 3HE, United Kingdom
Email: m.ford
leedsmet.ac.uk
Tel: +44 113 812 4730
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm
attached mail follows:
At 4:01 PM +0100 5/16/08, Ford, Mike wrote:
>On 14 May 2008 21:21, tedd advised:
>
>> At 7:31 PM +0100 5/14/08, Mário Gamito wrote:
>>> Hi,
>>>
>>> I have this HTML/JS page that switches images
>>> clicking on the radio buttons and call
>>> template.php with the image ID as parameter:
>>> http://portulan-online.net/einstein.html
>>>
>>> Now, I need to make it a PHP page, because it is
>>> going to receive a parameter from the URL that
>>> calls it and pass it as is to template.php
>>
>> Mário:
>>
>> The key here to remember is that javascript uses
>> ID and php uses NAME for inputs.
>
>That's incorrect. A form will function
>perfectly well with only name= attributes, and
>no ids, and it's quite possible for JavaScript
>to address the form elements using only the
>names (in fact, it's easier than via the ids as
>there's a short syntax for it!).
Incorrect or not, it works.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
I notice in a previous thread, people are suggesting using these two tools.
http://developer.yahoo.com/yui/examples/dragdrop/dd-reorder.html
and
http://tool-man.org/examples/
Now, my question is, does anybody know if these, or similar tools, would allow
you to manipulate nested lists and move items between lists and various levels?
Example would be this. I work for a telephone company and I am in the process
of rebuilding the "Add a new Service" wizard.
What I would like to do is to allow people to move nested lists around.
DS1 #1
Voice line # 800-555-1210
Caller ID
Three Way Calling
Voice line # 800-555-1211
Caller ID
Three Way Calling
Voice line # 800-555-1212
Caller ID
Three Way Calling
DS1 #2
Voice line # 800-555-1214
Caller ID
Three Way Calling
Voice line # 800-555-1215
Caller ID
Three Way Calling
Voice line # 800-555-1216
Caller ID
Three Way Calling
This is what I would like to end up with. But what I start with is an empty
white board. With a static list of available services above the white board.
What I would like to see is someone be able to grab the DS1 service and place
it. Then grab a voice line and place that as a sub-service to the DS1. Then be
able to grab "Features" and add them as sub-services to the previous voice line.
Now say they are done but realize that instead the 800-555-1216 number under the
DS1 #2, it should have been under DS1 #1. Could someone grab the Voice line #
800-555-1216 and move it so it becomes a sub-service of DS1 #1? and keeps the
features that were previously associated to it intake?
TIA
--
Jim Lucas jim.l
bendtel.com
Systems Engineer 541-323-9113
BendTel www.bendtel.com
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
attached mail follows:
On Fri, May 16, 2008 at 11:09 AM, Jim Lucas <lists
cmsws.com> wrote:
> I notice in a previous thread, people are suggesting using these two tools.
>
> http://developer.yahoo.com/yui/examples/dragdrop/dd-reorder.html
>
> and
>
> http://tool-man.org/examples/
>
> Now, my question is, does anybody know if these, or similar tools, would
> allow you to manipulate nested lists and move items between lists and
> various levels?
>
> Example would be this. I work for a telephone company and I am in the
> process of rebuilding the "Add a new Service" wizard.
>
> What I would like to do is to allow people to move nested lists around.
>
> DS1 #1
> Voice line # 800-555-1210
> Caller ID
> Three Way Calling
> Voice line # 800-555-1211
> Caller ID
> Three Way Calling
> Voice line # 800-555-1212
> Caller ID
> Three Way Calling
> DS1 #2
> Voice line # 800-555-1214
> Caller ID
> Three Way Calling
> Voice line # 800-555-1215
> Caller ID
> Three Way Calling
> Voice line # 800-555-1216
> Caller ID
> Three Way Calling
>
> This is what I would like to end up with. But what I start with is an
> empty white board. With a static list of available services above the white
> board.
>
> What I would like to see is someone be able to grab the DS1 service and
> place it. Then grab a voice line and place that as a sub-service to the
> DS1. Then be able to grab "Features" and add them as sub-services to the
> previous voice line.
>
> Now say they are done but realize that instead the 800-555-1216 number
> under the DS1 #2, it should have been under DS1 #1. Could someone grab the
> Voice line # 800-555-1216 and move it so it becomes a sub-service of DS1 #1?
> and keeps the features that were previously associated to it intake?
>
> TIA
>
> --
> Jim Lucas jim.l
bendtel.com
> Systems Engineer 541-323-9113
> BendTel www.bendtel.com
>
>
> --
> Jim Lucas
>
> "Some men are born to greatness, some achieve greatness,
> and some have greatness thrust upon them."
>
> Twelfth Night, Act II, Scene V
> by William Shakespeare
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> Jim,
You could make each element of the list its own div..then you could use the
drag'n'drop tools
--
Bastien
Cat, the other other white meat
attached mail follows:
On Fri, May 16, 2008 at 11:07 AM, Jim Lucas <jim.l
bendtel.com> wrote:
> I notice in a previous thread, people are suggesting using these two tools.
>
> http://developer.yahoo.com/yui/examples/dragdrop/dd-reorder.html
>
> and
>
> http://tool-man.org/examples/
>
> Now, my question is, does anybody know if these, or similar tools, would
> allow you to manipulate nested lists and move items between lists and
> various levels?
>
> Example would be this. I work for a telephone company and I am in the
> process of rebuilding the "Add a new Service" wizard.
>
> What I would like to do is to allow people to move nested lists around.
>
> DS1 #1
> Voice line # 800-555-1210
> Caller ID
> Three Way Calling
> Voice line # 800-555-1211
> Caller ID
> Three Way Calling
> Voice line # 800-555-1212
> Caller ID
> Three Way Calling
> DS1 #2
> Voice line # 800-555-1214
> Caller ID
> Three Way Calling
> Voice line # 800-555-1215
> Caller ID
> Three Way Calling
> Voice line # 800-555-1216
> Caller ID
> Three Way Calling
>
> This is what I would like to end up with. But what I start with is an empty
> white board. With a static list of available services above the white
> board.
>
> What I would like to see is someone be able to grab the DS1 service and
> place it. Then grab a voice line and place that as a sub-service to the
> DS1. Then be able to grab "Features" and add them as sub-services to the
> previous voice line.
>
> Now say they are done but realize that instead the 800-555-1216 number under
> the DS1 #2, it should have been under DS1 #1. Could someone grab the Voice
> line # 800-555-1216 and move it so it becomes a sub-service of DS1 #1? and
> keeps the features that were previously associated to it intake?
>
> TIA
>
> --
> Jim Lucas jim.l
bendtel.com
> Systems Engineer 541-323-9113
> BendTel www.bendtel.com
>
>
Seems like this might do the trick:
http://sonjayatandon.com/08-2006/how-to-add-dragdrop-behavior-to-a-yui-tree/
I'm going to try that the next time I have a fee bit of play time.
I've been locking sorting to a specific level of the nested set. This
way I don't have to deal with the reordering of parent child
relationships and all that. But if the drag and drop can be
implemented with my current TreeView setup, it'd be worth it.
attached mail follows:
I am trying to keep my tools and pages segregated for a variety of
reasons (organization, security, etc). And I am having problems with my
includes on my LAMP box. My user facing tools are not including my
utility classes and files.
The root directory of my web server (www.hostname.com/) is:
/srv/www/html/
My utility classes and files that need to be included by many of my user
tools are in subdirectories of:
/srv/www/html/Tools
ie
/srv/www/html/Tools/tool1/tool1.php
/srv/www/html/Tools/tool2/tool2.php
included in these sub directories are tool testing pages
(toolname-test.php) and other includes. As long as the file that is
including other files is in the same directory as the files it is
including, it works just fine.
My user tools each have their own subdirectories off the webserver root
/srv/www/html/
ie
/srv/www/html/library/index.php
So I would think that to include my utility files into my user tools I
would start the file with something like this:
require "/Tools/tool1/tool1.php";
require "/Tools/tool2/tool2.php";
But when I do I get:
require(/Tools/dbtools/dbtool.php) [function.require]: failed to open
stream: No such file or directory /srv/www/html/lib/index.php, line 16
require() [function.require]: Failed opening required
'/Tools/dbtools/dbtool.php' (include_path='.:/usr/share/pear')
/srv/www/html/lib/index.php, line 16
Am I missing something?
attached mail follows:
On Fri, May 16, 2008 at 2:25 PM, Tyson Vanover <tvanover
pdx.edu> wrote:
> I am trying to keep my tools and pages segregated for a variety of reasons
> (organization, security, etc). And I am having problems with my includes on
> my LAMP box. My user facing tools are not including my utility classes and
> files.
>
> The root directory of my web server (www.hostname.com/) is:
> /srv/www/html/
>
> My utility classes and files that need to be included by many of my user
> tools are in subdirectories of:
> /srv/www/html/Tools
> ie
> /srv/www/html/Tools/tool1/tool1.php
> /srv/www/html/Tools/tool2/tool2.php
> included in these sub directories are tool testing pages
> (toolname-test.php) and other includes. As long as the file that is
> including other files is in the same directory as the files it is including,
> it works just fine.
>
> My user tools each have their own subdirectories off the webserver root
> /srv/www/html/
> ie
> /srv/www/html/library/index.php
>
>
> So I would think that to include my utility files into my user tools I
> would start the file with something like this:
>
> require "/Tools/tool1/tool1.php";
> require "/Tools/tool2/tool2.php";
>
> But when I do I get:
> require(/Tools/dbtools/dbtool.php) [function.require]: failed to open
> stream: No such file or directory /srv/www/html/lib/index.php, line 16
>
> require() [function.require]: Failed opening required
> '/Tools/dbtools/dbtool.php' (include_path='.:/usr/share/pear')
> /srv/www/html/lib/index.php, line 16
>
> Am I missing something?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
I'm pretty sure you're gonna need to include the entire path:
require( "/srv/www/html/Tools/tool2/tool2.php" );
for both of your tools.
--
-Dan Joseph
www.canishosting.com - Plans start
$1.99/month. Reseller plans and
Dedicated servers available.
"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."
attached mail follows:
Tyson Vanover wrote:
> I am trying to keep my tools and pages segregated for a variety of
> reasons (organization, security, etc). And I am having problems with my
> includes on my LAMP box. My user facing tools are not including my
> utility classes and files.
>
> The root directory of my web server (www.hostname.com/) is:
> /srv/www/html/
>
> My utility classes and files that need to be included by many of my user
> tools are in subdirectories of:
> /srv/www/html/Tools
> ie
> /srv/www/html/Tools/tool1/tool1.php
> /srv/www/html/Tools/tool2/tool2.php
> included in these sub directories are tool testing pages
> (toolname-test.php) and other includes. As long as the file that is
> including other files is in the same directory as the files it is
> including, it works just fine.
>
> My user tools each have their own subdirectories off the webserver root
> /srv/www/html/
> ie
> /srv/www/html/library/index.php
>
>
> So I would think that to include my utility files into my user tools I
> would start the file with something like this:
>
> require "/Tools/tool1/tool1.php";
> require "/Tools/tool2/tool2.php";
>
> But when I do I get:
> require(/Tools/dbtools/dbtool.php) [function.require]: failed to open
> stream: No such file or directory /srv/www/html/lib/index.php, line 16
>
> require() [function.require]: Failed opening required
> '/Tools/dbtools/dbtool.php' (include_path='.:/usr/share/pear')
> /srv/www/html/lib/index.php, line 16
>
> Am I missing something?
>
Their are two ways that come to mind.
1. Like Dan suggested, use the full path.
2. (I prefer this way), change your include_path setting either in your php.ini
file, virtual host, .htaccess or in your script to include the base path for
your web site "/srv/www/html/" and then you can call them by simply removing the
leading slash from your existing calls.
require 'Tools/tool1/tool1.php';
require 'Tools/tool2/tool2.php';
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
attached mail follows:
Dan Joseph wrote:
> I'm pretty sure you're gonna need to include the entire path:
>
> require( "/srv/www/html/Tools/tool2/tool2.php" );
>
> for both of your tools.
>
So when php runs it's paths are drawn from the OS's
structure and not apache's? hun. thanks!
attached mail follows:
Jim Lucas wrote:
> Their are two ways that come to mind.
>
> 1. Like Dan suggested, use the full path.
>
> 2. (I prefer this way), change your include_path setting either in your
> php.ini file, virtual host, .htaccess or in your script to include the
> base path for your web site "/srv/www/html/" and then you can call them
> by simply removing the leading slash from your existing calls.
> require 'Tools/tool1/tool1.php';
> require 'Tools/tool2/tool2.php';
>
So in say, php.ini, I set the include path to something
like:
include_path = ".:/php/includes:/srv/www/html"
Will pointing it at "/srv/www/html" open up any
security holes?
attached mail follows:
Tyson Vanover wrote:
> Dan Joseph wrote:
>
>> I'm pretty sure you're gonna need to include the entire path:
>>
>> require( "/srv/www/html/Tools/tool2/tool2.php" );
>>
>> for both of your tools.
>>
>
> So when php runs it's paths are drawn from the OS's structure and not
> apache's? hun. thanks!
>
Only if apache is run chroot'ed
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
attached mail follows:
Tyson Vanover wrote:
> Jim Lucas wrote:
>
>> Their are two ways that come to mind.
>>
>> 1. Like Dan suggested, use the full path.
>>
>> 2. (I prefer this way), change your include_path setting either in
>> your php.ini file, virtual host, .htaccess or in your script to
>> include the base path for your web site "/srv/www/html/" and then you
>> can call them by simply removing the leading slash from your existing
>> calls.
>> require 'Tools/tool1/tool1.php';
>> require 'Tools/tool2/tool2.php';
>>
>
> So in say, php.ini, I set the include path to something like:
>
> include_path = ".:/php/includes:/srv/www/html"
>
> Will pointing it at "/srv/www/html" open up any security holes?
>
None that I am aware of. Doing it in the php.ini file will make it available to
any host that you have that uses php. Just be aware of that fact.
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
attached mail follows:
On Fri, May 16, 2008 at 3:31 PM, Tyson Vanover <tvanover
pdx.edu> wrote:
> Dan Joseph wrote:
>
>> I'm pretty sure you're gonna need to include the entire path:
>>
>> require( "/srv/www/html/Tools/tool2/tool2.php" );
>>
>> for both of your tools.
>>
>
> So when php runs it's paths are drawn from the OS's structure and not
> apache's? hun. thanks!
>
No, RTM.
"Files for including are first looked for in each include_path entry
relative to the current working directory, and then in the directory
of current script."
http://www.php.net/manual/en/function.include.php
Andrew
attached mail follows:
On Fri, May 16, 2008 at 3:41 PM, Jim Lucas <lists
cmsws.com> wrote:
> Tyson Vanover wrote:
>
>> Jim Lucas wrote:
>>
>> Their are two ways that come to mind.
>>>
>>> 1. Like Dan suggested, use the full path.
>>>
>>> 2. (I prefer this way), change your include_path setting either in your
>>> php.ini file, virtual host, .htaccess or in your script to include the base
>>> path for your web site "/srv/www/html/" and then you can call them by simply
>>> removing the leading slash from your existing calls.
>>> require 'Tools/tool1/tool1.php';
>>> require 'Tools/tool2/tool2.php';
>>>
>>>
>> So in say, php.ini, I set the include path to something like:
>>
>> include_path = ".:/php/includes:/srv/www/html"
>>
>> Will pointing it at "/srv/www/html" open up any security holes?
>>
>>
> None that I am aware of. Doing it in the php.ini file will make it
> available to any host that you have that uses php. Just be aware of that
> fact.
>
> --
> Jim Lucas
>
> "Some men are born to greatness, some achieve greatness,
> and some have greatness thrust upon them."
>
> Twelfth Night, Act II, Scene V
> by William Shakespeare
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
I agree, I wouldn't see how their would be any logically. Technically, your
docroot is already accessible. Its how you secure it that matters.
--
-Dan Joseph
www.canishosting.com - Plans start
$1.99/month. Reseller plans and
Dedicated servers available.
"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."
attached mail follows:
Jim Lucas wrote:
> Their are two ways that come to mind.
>
> 1. Like Dan suggested, use the full path.
>
> 2. (I prefer this way), change your include_path setting either in your
> php.ini file, virtual host, .htaccess or in your script to include the
> base path for your web site "/srv/www/html/" and then you can call them
> by simply removing the leading slash from your existing calls.
> require 'Tools/tool1/tool1.php';
> require 'Tools/tool2/tool2.php';
>
Ok, I have changed my php.ini and restarted apache. My
include_path is set to
include_path = ".:/srv/www/html"
but when I try from /srv/www/html/library/index.php:
require '/Tools/dbtools/dbtool.php';
or
require 'Tools/dbtools/dbtool.php';
or
require '../Tools/dbtools/dbtool.php';
I get the error:
require(/Tools/dbtools/dbtool.php) [function.require]:
failed to open stream: No such file or directory
/srv/www/html/lib/index.php, line 10
require() [function.require]: Failed opening required
'/Tools/dbtools/dbtool.php'
(include_path='.:/srv/www/html')
/srv/www/html/lib/index.php, line 10
any thoughts? Am I missing something obvious?
attached mail follows:
On Fri, May 16, 2008 at 4:36 PM, Tyson Vanover <tvanover
pdx.edu> wrote:
> Jim Lucas wrote:
>
>> Their are two ways that come to mind.
>>
>> 1. Like Dan suggested, use the full path.
>>
>> 2. (I prefer this way), change your include_path setting either in your
>> php.ini file, virtual host, .htaccess or in your script to include the base
>> path for your web site "/srv/www/html/" and then you can call them by simply
>> removing the leading slash from your existing calls.
>> require 'Tools/tool1/tool1.php';
>> require 'Tools/tool2/tool2.php';
>>
>>
> Ok, I have changed my php.ini and restarted apache. My include_path is set
> to
>
> include_path = ".:/srv/www/html"
>
> but when I try from /srv/www/html/library/index.php:
> require '/Tools/dbtools/dbtool.php';
> or
> require 'Tools/dbtools/dbtool.php';
> or
> require '../Tools/dbtools/dbtool.php';
>
> I get the error:
> require(/Tools/dbtools/dbtool.php) [function.require]: failed to open
> stream: No such file or directory /srv/www/html/lib/index.php, line 10
>
> require() [function.require]: Failed opening required
> '/Tools/dbtools/dbtool.php' (include_path='.:/srv/www/html')
> /srv/www/html/lib/index.php, line 10
>
> any thoughts? Am I missing something obvious?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
It deosn't look like it updated your path. Output a phpinfo() and make sure
you have the correct php.ini. web servers tend to have more than one laying
around.
--
-Dan Joseph
www.canishosting.com - Plans start
$1.99/month. Reseller plans and
Dedicated servers available.
"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."
attached mail follows:
Tyson Vanover wrote:
> Jim Lucas wrote:
>> Their are two ways that come to mind.
>>
>> 1. Like Dan suggested, use the full path.
>>
>> 2. (I prefer this way), change your include_path setting either in
>> your php.ini file, virtual host, .htaccess or in your script to
>> include the base path for your web site "/srv/www/html/" and then you
>> can call them by simply removing the leading slash from your existing
>> calls.
>> require 'Tools/tool1/tool1.php';
>> require 'Tools/tool2/tool2.php';
>>
>
> Ok, I have changed my php.ini and restarted apache. My include_path is
> set to
>
> include_path = ".:/srv/www/html"
>
> but when I try from /srv/www/html/library/index.php:
> require '/Tools/dbtools/dbtool.php';
> or
> require 'Tools/dbtools/dbtool.php';
> or
> require '../Tools/dbtools/dbtool.php';
>
> I get the error:
> require(/Tools/dbtools/dbtool.php) [function.require]: failed to open
> stream: No such file or directory /srv/www/html/lib/index.php, line 10
>
> require() [function.require]: Failed opening required
> '/Tools/dbtools/dbtool.php' (include_path='.:/srv/www/html')
> /srv/www/html/lib/index.php, line 10
>
> any thoughts? Am I missing something obvious?
>
Possibly that apache is chroot'ed.
I know you said LAMP. But which OS/etc...
Sometimes you can see from the cli if httpd is rooted.
run 'ps aux | grep httpd' and see if httpd says anything about chroot
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
attached mail follows:
Dan Joseph wrote:
>> Ok, I have changed my php.ini and restarted apache. My include_path is set
>> to
>>
>> include_path = ".:/srv/www/html"
>>
>> but when I try from /srv/www/html/library/index.php:
>> require '/Tools/dbtools/dbtool.php';
>> or
>> require 'Tools/dbtools/dbtool.php';
>> or
>> require '../Tools/dbtools/dbtool.php';
>>
>> I get the error:
>> require(/Tools/dbtools/dbtool.php) [function.require]: failed to open
>> stream: No such file or directory /srv/www/html/lib/index.php, line 10
>>
>> require() [function.require]: Failed opening required
>> '/Tools/dbtools/dbtool.php' (include_path='.:/srv/www/html')
>> /srv/www/html/lib/index.php, line 10
>>
>> any thoughts? Am I missing something obvious?
>
> It deosn't look like it updated your path. Output a phpinfo() and make sure
> you have the correct php.ini. web servers tend to have more than one laying
> around.
According to phpinfo() I am working with the correct
php.ini (/etc/php5/php.ini). And looking in the
Configuration : PHP Core section "doc_root" is set to
"/srv/www/html" and "include_path" is set to
".:/srv/www/html".
attached mail follows:
Jim Lucas wrote:
> Possibly that apache is chroot'ed.
>
> I know you said LAMP. But which OS/etc...
>
> Sometimes you can see from the cli if httpd is rooted.
>
> run 'ps aux | grep httpd' and see if httpd says anything about chroot
>
I don't see anything here
root 1937 0.0 5.2 25600 13456 ? Ss
19:50 0:00 /usr/sbin/httpd
raa-web 1956 0.3 0.8 4636 2084 ? S
19:50 0:14 /usr/sbin/lighttpd -f /etc/raa/lighttpd.conf
apache 1987 0.0 4.2 25736 10920 ? S
19:50 0:00 /usr/sbin/httpd
apache 1990 0.0 4.2 25736 10892 ? S
19:50 0:00 /usr/sbin/httpd
apache 1993 0.0 4.3 25736 11048 ? S
19:50 0:00 /usr/sbin/httpd
apache 1995 0.0 4.2 25736 10908 ? S
19:50 0:00 /usr/sbin/httpd
apache 2003 0.0 4.2 25736 10912 ? S
19:50 0:00 /usr/sbin/httpd
apache 2008 0.0 4.2 25736 10908 ? S
19:50 0:00 /usr/sbin/httpd
apache 2011 0.0 4.2 25736 10864 ? S
19:50 0:00 /usr/sbin/httpd
apache 2014 0.0 4.2 25736 10900 ? S
19:50 0:00 /usr/sbin/httpd
root 2644 0.0 0.3 2908 788 tty1 R+
20:57 0:00 grep httpd
attached mail follows:
Hi all,
sorry for the cross post to the general PHP list as well as the SOAP PHP
list, but I'm a little bit desperate...
Ok, for some reason when I am sending the proper objects to the
__soapCall method, it is not including those objects in the XML call
itself...
I am using PHP 5.2.6 now after using 5.2.5 and thinking this may be
fixed in an upgrade, but it is not...
ok, here is a dump of the object I am sending the __soapCall method as
an argument :
[struct] => CreateCustomerPaymentProfile Object
(
[merchantAuthentication] => MerchantAuthenticationType Object
(
[name] => xxxxxxxxx
[transactionKey] => xxxxxxxxxx
)
[customerProfileId] => 181854
[paymentProfile] => CustomerPaymentProfileType Object
(
[payment] => PaymentSimpleType Object
(
[creditCard] => CreditCardType Object
(
[cardNumber] => XXXXXXXXXXXXXXXX
[expirationDate] => XXXX-XX
)
)
[customerType] => individual
[billTo] => CustomerAddressType Object
(
[firstName] => Tim
[lastName] => Traver
)
)
[validationMode] => none
)
And here is the call that is generated :
[__last_request] => <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="https://api.authorize.net/soap/v1/">
<SOAP-ENV:Body>
<ns1:CreateCustomerPaymentProfile>
<ns1:merchantAuthentication>
<ns1:name>xxxxxxxxxxxx</ns1:name>
<ns1:transactionKey>xxxxxxxxxxxxxxxx</ns1:transactionKey>
</ns1:merchantAuthentication>
<ns1:customerProfileId>181854</ns1:customerProfileId>
<ns1:paymentProfile>
<ns1:customerType>individual</ns1:customerType>
<ns1:billTo>
<ns1:firstName>Tim</ns1:firstName>
<ns1:lastName>Traver</ns1:lastName>
</ns1:billTo>
<ns1:payment/>
</ns1:paymentProfile>
<ns1:validationMode>none</ns1:validationMode>
</ns1:CreateCustomerPaymentProfile>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
As you can see, all of the object variables are created correctly,
except that the "payment" object is not. It is simply represented by
<ns1:payment/> and has no start, and no variables that were sent in the
object.
This is very strange, and I can't figure out where to look to try and
solve this problem, but it is a very big problem.
I have tried to changed the order of the objects, what the actual values
of the objects are, but I'm now banging my head as to why the soap
construction is not including these values...
Any help would be greatly appreciated,
Tim.
attached mail follows:
On Fri, May 16, 2008 at 1:04 PM, Tim Traver <tt-list
simplenet.com> wrote:
> Hi all,
>
> sorry for the cross post to the general PHP list as well as the SOAP PHP
> list, but I'm a little bit desperate...
>
> Ok, for some reason when I am sending the proper objects to the __soapCall
> method, it is not including those objects in the XML call itself...
>
> I am using PHP 5.2.6 now after using 5.2.5 and thinking this may be fixed
> in an upgrade, but it is not...
>
> ok, here is a dump of the object I am sending the __soapCall method as an
> argument :
>
> [struct] => CreateCustomerPaymentProfile Object
> (
> [merchantAuthentication] => MerchantAuthenticationType Object
> (
> [name] => xxxxxxxxx
> [transactionKey] => xxxxxxxxxx
> )
> [customerProfileId] => 181854
> [paymentProfile] => CustomerPaymentProfileType Object
> (
> [payment] => PaymentSimpleType Object
> (
> [creditCard] => CreditCardType Object
> (
> [cardNumber] => XXXXXXXXXXXXXXXX
> [expirationDate] => XXXX-XX
> )
> )
> [customerType] => individual
> [billTo] => CustomerAddressType Object
> (
> [firstName] => Tim
> [lastName] => Traver
> )
> )
> [validationMode] => none
> )
>
> And here is the call that is generated :
> [__last_request] => <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="
> https://api.authorize.net/soap/v1/">
> <SOAP-ENV:Body>
> <ns1:CreateCustomerPaymentProfile>
> <ns1:merchantAuthentication>
> <ns1:name>xxxxxxxxxxxx</ns1:name>
> <ns1:transactionKey>xxxxxxxxxxxxxxxx</ns1:transactionKey>
> </ns1:merchantAuthentication>
> <ns1:customerProfileId>181854</ns1:customerProfileId>
> <ns1:paymentProfile>
> <ns1:customerType>individual</ns1:customerType>
> <ns1:billTo>
> <ns1:firstName>Tim</ns1:firstName>
> <ns1:lastName>Traver</ns1:lastName>
> </ns1:billTo>
> <ns1:payment/>
> </ns1:paymentProfile>
> <ns1:validationMode>none</ns1:validationMode>
> </ns1:CreateCustomerPaymentProfile>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> As you can see, all of the object variables are created correctly, except
> that the "payment" object is not. It is simply represented by <ns1:payment/>
> and has no start, and no variables that were sent in the object.
>
> This is very strange, and I can't figure out where to look to try and solve
> this problem, but it is a very big problem.
>
> I have tried to changed the order of the objects, what the actual values of
> the objects are, but I'm now banging my head as to why the soap construction
> is not including these values...
>
> Any help would be greatly appreciated,
>
> Tim.
first thing that comes to mind, the SoapClient::__call() method is
deprecated. have you tried using the SoapClient instance directly? for
example, if you are in WSDL mode and the wsdl defines a method doStuff(),
you can use a SoapClient instance $sc as $sc->doStuff(). i would try that
and see what happens.
-nathan
attached mail follows:
Nathan Nobbe wrote:
> On Fri, May 16, 2008 at 1:04 PM, Tim Traver <tt-list
simplenet.com
> <mailto:tt-list
simplenet.com>> wrote:
>
> Hi all,
>
> sorry for the cross post to the general PHP list as well as the
> SOAP PHP list, but I'm a little bit desperate...
>
> Ok, for some reason when I am sending the proper objects to the
> __soapCall method, it is not including those objects in the XML
> call itself...
>
> I am using PHP 5.2.6 now after using 5.2.5 and thinking this may
> be fixed in an upgrade, but it is not...
>
> ok, here is a dump of the object I am sending the __soapCall
> method as an argument :
>
> [struct] => CreateCustomerPaymentProfile Object
> (
> [merchantAuthentication] => MerchantAuthenticationType
> Object
> (
> [name] => xxxxxxxxx
> [transactionKey] => xxxxxxxxxx
> )
> [customerProfileId] => 181854
> [paymentProfile] => CustomerPaymentProfileType Object
> (
> [payment] => PaymentSimpleType Object
> (
> [creditCard] => CreditCardType Object
> (
> [cardNumber] => XXXXXXXXXXXXXXXX
> [expirationDate] => XXXX-XX
> )
> )
> [customerType] => individual
> [billTo] => CustomerAddressType Object
> (
> [firstName] => Tim
> [lastName] => Traver
> )
> )
> [validationMode] => none
> )
>
> And here is the call that is generated :
> [__last_request] => <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:ns1="https://api.authorize.net/soap/v1/">
> <SOAP-ENV:Body>
> <ns1:CreateCustomerPaymentProfile>
> <ns1:merchantAuthentication>
> <ns1:name>xxxxxxxxxxxx</ns1:name>
> <ns1:transactionKey>xxxxxxxxxxxxxxxx</ns1:transactionKey>
> </ns1:merchantAuthentication>
> <ns1:customerProfileId>181854</ns1:customerProfileId>
> <ns1:paymentProfile>
> <ns1:customerType>individual</ns1:customerType>
> <ns1:billTo>
> <ns1:firstName>Tim</ns1:firstName>
> <ns1:lastName>Traver</ns1:lastName>
> </ns1:billTo>
> <ns1:payment/>
> </ns1:paymentProfile>
> <ns1:validationMode>none</ns1:validationMode>
> </ns1:CreateCustomerPaymentProfile>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> As you can see, all of the object variables are created correctly,
> except that the "payment" object is not. It is simply represented
> by <ns1:payment/> and has no start, and no variables that were
> sent in the object.
>
> This is very strange, and I can't figure out where to look to try
> and solve this problem, but it is a very big problem.
>
> I have tried to changed the order of the objects, what the actual
> values of the objects are, but I'm now banging my head as to why
> the soap construction is not including these values...
>
> Any help would be greatly appreciated,
>
> Tim.
>
>
> first thing that comes to mind, the SoapClient::__call() method is
> deprecated. have you tried using the SoapClient instance directly?
> for example, if you are in WSDL mode and the wsdl defines a method
> doStuff(), you can use a SoapClient instance $sc as $sc->doStuff(). i
> would try that and see what happens.
>
> -nathan
Thanks for the response Nathan, but that doesn't appear to change
anything...
I'm just super confused as to why it would leave an entire object out of
the tree that it is sending...
Anyone else have any suggestions???
Tim.
attached mail follows:
Hello,
Is there a way to have threads in PHP?
--
Best Regards
Cesar D. Rodas
http://www.cesarodas.com
http://www.thyphp.com
http://www.phpajax.org
Phone: +595-961-974165
attached mail follows:
On Fri, May 16, 2008 at 3:10 PM, Cesar D. Rodas <saddor
gmail.com> wrote:
> Hello,
>
> Is there a way to have threads in PHP?
>
>
> --
> Best Regards
>
> Cesar D. Rodas
> http://www.cesarodas.com
> http://www.thyphp.com
> http://www.phpajax.org
> Phone: +595-961-974165
>
Check out: http://pecl.php.net/package/threads
That might help you out.
--
-Dan Joseph
www.canishosting.com - Plans start
$1.99/month. Reseller plans and
Dedicated servers available.
"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."
attached mail follows:
On Fri, May 16, 2008 at 9:10 PM, Cesar D. Rodas <saddor
gmail.com> wrote:
> Hello,
>
> Is there a way to have threads