| Detecting if server program running |
|
 |
Index ‹ php-general
|
- Previous
- 2
- OpenSSL error:1408F10B:SSL
OpenSSL Error messages: error:1408F10B:SSL
SSL3_GET_RECORD wrong version
I version check (obviously). This is the only reference that sourceforge
gives on this, but even there they left it as a response to a post'er to
'try ...' with no follow up.
Normal secure comms works as normal (hows that for a poorly formed
sentence).
Seems to have been a common error between openssl and php for quite some
time (early 2004). I can find loads of references to it in groups, but no
actual solutions. But I (think I know) from those same searches that
version problem seemed to be more the version checking code rather
than the versions themselves. I have checked the relevant part in php
compared with the latest and it is up to date.
As both are well used I suspect it has become one of those
things that people somehow fix and then don't bother reporting back. But
also suggests that maybe they just switch it off and go plain text.
So, does anyone have the solution. In my case it is with SquirrelMail/php
and any other attempts to use ssl comms via php such as with xrms.
My setup.
PHP 4.3.10
openssl 0.9.7e
Suse 9.3
Also as above on
FC3
- 6
- php or coldfusion?Hi all,
I need some help, i'm a final year student in IT and must do a project
to finish off! What is the easiest to bring a database(oracle 8i) to a
website, coldfusion or php! I'm running apache as web server but i can't
get mysql to see the oracle odbc! Coldfusion is working under apache and
iis and sees the oracle odbc?
Thanks!
marco
- 7
- [PHP] a stupid questionDownload it and then check it. But if you need to check a lot of files
that's probably to slow.
Jacob Vennervald
On Thu, 2003-07-24 at 06:03, Joe wrote:
> how to check the filetype of remote file
> because is_dir(), is_file() can't work on remote file
> thx a lot
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Venlig hilsen / Best regards,
Jacob Vennervald
System Developer
Proventum Solutions ApS
Tuborg Boulevard 12
2900 Hellerup
Denmark
Phone: +45 36 94 41 66
Mobile: +45 61 68 58 51
- 7
- #40688 [NEW]: php configure errorFrom: ryo dot wong at i010 dot com
Operating system: centos 4.4 i386
PHP version: 5.2.1
PHP Bug Type: *Configuration Issues
Bug description: php configure error
Description:
------------
/usr/bin/ld: cannot find -lgcrypt
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
Reproduce code:
---------------
/usr/bin/ld: cannot find -lgcrypt
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
Expected result:
----------------
/usr/bin/ld: cannot find -lgcrypt
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
Actual result:
--------------
/usr/bin/ld: cannot find -lgcrypt
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
--
Edit bug report at http://bugs.php.net/?id=40688&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40688&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40688&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40688&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40688&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40688&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40688&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40688&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40688&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40688&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40688&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40688&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40688&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40688&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40688&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40688&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40688&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40688&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40688&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40688&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40688&r=mysqlcfg
- 10
- Prevent carraige returns Hi,
Can anybody help, I would like to prevent a carraige return from submitting
a form, is there a way of doing this using a PHP script?
Cheers,
Sandy, new to PHP
- 10
- Checking FieldsWhat would be the if statement to check if a MySQL field = a certain string?
For example (and I know this is probably wrong):
----------------------------
if (ImgURL='None')
{
echo "<img src=\".$MyImageField.\">";
}
---------------------------
I worked out the rest eventually, (with a lot of help).
- 12
- Authentication with $_SESSIONWhat is the best way to implement authentication in PHP?
Do you simply echo html if you have a valid session?
if (validate($_SESSION[var]))
{
[echo the complete page]
}
I'm new to this so I don't know of any other ways to do it. Are there many
other ways? Examples?
Thanks!
- 12
- [PHP] Problem with ocasional blank valueOn Jan 18, 2008 10:12 AM, Joey <email***@***.com> wrote:
> Hi All,
>
>
>
> I have a problem that the below code which is supposed to display a random
> image and on occasion it shows NO image.
>
> I'm not sure what is happening. This is running on linux just in case that
> makes any difference.
>
>
>
> <%
>
> $image_folder = "new_random/";
>
> $dir = $_SERVER['DOCUMENT_ROOT'] . "/" . $image_folder;
>
> $image_array = array();
>
>
>
> # The user doesn"t need to see any errors
>
> $dir_handle = @opendir($dir);
>
>
>
> while (false !== ($file = readdir($dir_handle)))
>
> if (!is_dir($file))
>
> $image_array[] = $file;
>
> #
>
> closedir ($dir_handle);
>
>
>
> #
>
> # The following appears to make things more random
>
> srand((double)microtime()*1000000);
>
> $r = rand(0,sizeof($image_array)-1);
>
>
>
> #
>
> echo "<img src=\"{$image_folder}{$image_array[$r]}\" width = \"561\" height
> = \"400\" >";
>
> %></td>
>
>
>
>
>
>
>
> Thanks!
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Why are you using ASP style tags? PHP doesn't compile on it so what
other advantage does that give you other than not being compatible
with most installs?
Get rid of your error hiding. Suppressing errors means you don't see
them either therefore cannot fix them. The better solution is to turn
display_errors off and leave logging on.
My guess is that it is trying to link to a directory, a . hidden file,
or something else that shouldn't be there. If it were my script I
would probably use a glob() type solution so that I can pick the ext's
I want.
- 13
- SELECT selects too quickIn a database about houses I want the visitor to make a choice by
typing in an address. As a result the database presents one or more
adresses according to the input. So far so good.
However, when arriving on this page I want to present a greeting and
some instructions. So the page starts with:
<?php
if (!isset ($_POST['address'])) {echo "Welcome, Instructions etc.";}
?>
In spite of this I always get a list of all addresses, perfectly as I
want to present them AFTER the input.
What might I do wrong, what is it I'm overlooking?
Any suggestion is appreciated.
- 13
- Advice with some codeHi all,
I'm having a brain freeze with some simple code that I wrote and now trying
to refactor.
I have a block of code that looks like this:
public function backup()
{
$fname = "$this->dbName.sql.$this->zip";
$this->cmd = "mysqldump -Q -u $this->dbUser -p$this->dbPass
$this->dbName 2>&1 > {$this->dest}/{$this->dbName}.{$this->lastId}.sql";
$res = shell_exec("$this->cmd");
error_log("First res: ".$res);
if(!$res) {
$this->cmd = ($this->zip==="bz2") ?
"bzip2
{$this->dest}/{$this->dbName}.{$this->lastId}.sql 2>&1" :
"gzip
{$this->dest}/{$this->dbName}.{$this->lastId}.sql 2>&1";
$res = shell_exec("$this->cmd");
error_log("second error: ".$res);
return !$res;
}
return FALSE;
}
Now instead of that FALSE, is there a way I can pass FALSE with a particular
error message? This is because on the other end I have code that looks like
this:
if($mysqlDump->backup()) {
$success = array('success' => '1');
$sqlres = mysql_query($sql, $link) or
die(json_message('error',mysql_error()));
shell_exec('/usr/bin/touch /tmp/build_transfer');
mysql_close($link);
return '(' . json_encode($success) . ')';
} else {
$fail = array('fail' => $res);
return '(' . json_encode($fail) . ')';
}
I'd ultimately like to be able to deliver a failure message from the return
value...and properly catch that message so I can send it back in JSON format
to the client browser to report what the error is.
Think I should approach this with some try{..} catch code? Am I overlooking
something really simple? :-)
Thanks for your advice.
- 13
- Can not get WAMP working...I have installed WAMP on a XP Home system.
1. Am using the newest releases of Apache Server, MySQL and PHP.
2. Have set the doc_root directory in the php.ini file to...
doc_root = "c:\program files\apache group\apache2\htdocs"
3. Have added the following to the PHP.ini file (recommended version)...
LoadModule php5_module php5_apache2.dll
AddType application/x-httpd-php .php
4. Have copied php5ts.dll, php5apache2.dll and the php.ini file to
"c:\program files, apache group\apache2"
From what I have read these are the essential elements to get PHP
playing on a Apache Server... yet after many attempts and reloads
( I even tried different versions of PHP) I was unable to play a simple
PHP page on the Apache Server.
The Apache Server works OK with standard HTML and PHP works
OK from the DOS prompt.
I realize I am missing something but have no idea what that something
is.
Any help would be appreciated.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.714 / Virus Database: 470 - Release Date: 7/2/2004
- 16
- sessionsup2trouble wrote:
> <?PHP
> session_start();
> $_SESSION["passid"];
> $_SESSION["passcid"];
This doesn't set the session variable to anything.
> ?>
> -----------------------------------------------
> DELETED ON PURPOSE
> -----------------------------------------------
> <?PHP
> $FAIL = " ";
> $TRY = " ";
>
> if(isset($_POST['entersurvey']))
> {
> $id = $_POST['id'];
> $class = $_POST['course'];
>
> $sql = "SELECT * FROM $db_table10 WHERE id = '$id'";
> $result = mysql_query ($sql, $connect) or die('Query 4 failed: ' .
> mysql_error());
> $num = mysql_num_rows($result);
>
> if ($num == 0)
> {
> echo "$id <BR>";
> echo "$class<BR>";
> echo "$num<BR>";
> echo "$result <BR>";
> echo "<meta http-equiv='Refresh' content='1;url=$FAIL'>";
> }
> else
> {
> $passid = $id;
> $passcid = $class;
> echo "<meta http-equiv='Refresh' content='3;url=$TRY'>";
> }
> }
> ?>
>
> <FORM ACTION="survey.php" METHOD="post" NAME="survey" ID="survey">
> <TABLE CELLSPACING="2" CELLPADDING="2" BORDER="0">
> <TR>
> <TD>Enter ID Code</TD>
> <TD><INPUT TYPE="text" NAME="id" SIZE="15" MAXLENGTH="13"></TD>
> </TR>
> <TR>
> <TD VALIGN="top">Select A Course:</TD>
> <TD>
> <INPUT TYPE="radio" NAME="course" VALUE="cita110">Introduction To
> Software Applications<BR>
> <INPUT TYPE="radio" NAME="course" VALUE="cita210">Visual Programming
> & Development Tools<BR>
> <INPUT TYPE="radio" NAME="course" VALUE="cita330">Web Publishing<BR>
> <INPUT TYPE="radio" NAME="course" VALUE="cita405">Project
> Management<BR>
> <INPUT TYPE="radio" NAME="course" VALUE="cita420">Programming For The
> Web<BR>
> </TD>
> </TR>
> <TR>
> <TD></TD>
> <TD><INPUT TYPE="submit" NAME="entersurvey" VALUE="Submit"></TD>
> </TR>
> </TABLE>
> </FORM>
> </FIELDSET>
> </DIV>
> <DIV ID="footer">
> <STRONG><?PHP INCLUDE("../includes/countdown.txt");?></STRONG>
> </DIV>
> </DIV>
> </BODY>
> </HTML>
> ---------------------------------------------------------------------------
> I have it working to the point that it verifies unique id code is in
> the db. Then it takes me to the survey. It is not passing the unique
> id code and course code. In theory, it should carry that info over
> and when survey is submitted the info submitted goes into the db on
> the same row as the unique id code. It enters info on a new row. The
> code below is the action script for the survey page.
> ----------------------------------------------------------------------------
Because nowhere in the above script to you actually set
$_SESSION['passcid'];
> <?PHP include("../includes/connect.php"); ?>
> <?PHP
> if(isset($_POST['surveysubmit']))
> {
> $classid = $passcid;
You never set $passcid. You need to do a session_start() (at the top of
EVERY page which uses session) and get the value of
$_SESSION['passcid'], i.e.
session_start();
$passcid = ifset($_SESSION['passcid']) ? $_SESSION['passcid'] : null;
> $required = $_POST['required'];
> $q1 = $_POST['q1'];
> $q2 = $_POST['q2'];
> $q3 = $_POST['q3'];
> $q4 = $_POST['q4'];
> $q5 = $_POST['q5'];
> $q6 = $_POST['q6'];
> $q7 = $_POST['q7'];
> $q8 = $_POST['q8'];
> $q9 = $_POST['q9'];
> $q10 = $_POST['q10'];
> $comments = $_POST['comments'];
>
> $sql = "SELECT * FROM $db_table10 WHERE id = '$passid'";
> mysql_query ($sql) or die('Query 5 failed because: ' . mysql_error());
>
> $sql2 = " INSERT INTO $db_table10
> (classid, required, q1, q2, q3, q4, q5, q6, q7, q8, q9, q10,
> comments)
> VALUES
> ('$classid', '$required', '$q1', '$q2', '$q3', '$q4', '$q5',
> '$q6', '$q7', '$q8', '$q9', '$q10', '$comments')";
> mysql_query ($sql2) or die('Query 6 failed because: ' .
> mysql_error());
>
> echo "Thank you for completing your course survey.";
> }
> ?>
And you have other problems - for instance, where did you set $classid,
$required, etc.?
> ---------------------------------------------------------------------------
> The code below is from the survey page. I did the session start thing
> at the beginning.
> ----------------------------------------------------------------------------
> <?PHP
> session_start();
> ?>
> <HTML>
> <HEAD>
> <TITLE>Lynne Smith - Courses</TITLE>
> <?PHP INCLUDE("../includes/headsection.txt")?>
> </HEAD>
>
> <BODY>
> <?PHP
> //include varibles from last page
> //also need to include semester in db or by timestamp
> echo "$passid";
> echo "$classid";
>
How are you including the variables from the last page?
> ?>
>
> <?PHP INCLUDE("../includes/connect.php"); ?>
> <DIV ID="wrapper">
> <DIV ID="header">
>
> </DIV>
> <DIV ID="navigation">
> <?PHP INCLUDE("../includes/menu.txt"); ?>
> </DIV>
> <DIV ID="subnavigation">
> <?PHP include("../includes/subnav.txt"); ?>
> </DIV>
> <DIV ID="content">
> <H1 ALIGN="center">End of Class Survey </H1>
> <P CLASS="instruct">
> </P>
> <FORM ACTION="adminsubmitsurvey.php" METHOD="post" NAME="survey"
> ID="survey">
> <FIELDSET>
> <LEGEND>Information</LEGEND>
> Is this course required for your major?<BR>
> <INPUT TYPE="radio" NAME="required" VALUE="yes">Yes<BR>
> <INPUT TYPE="radio" NAME="required" VALUE="no">No<BR>
> <INPUT TYPE="radio" NAME="required" VALUE="dk">Don't Know<BR>
> </FIELDSET>
> <BR><BR>
> ----------------------------------------------------------------
> Help!
> Also, should I try to check for fields not completed in php or
> javascript?
> ---------------------------------------------------------------
>
I think you have a basic misunderstanding of sessions. Any page which
uses a session must call session_start() at the beginning of that page.
Additionally, the data is kept in an array called $_SESSION. To save
items in the array, you assign a value to a specific index in the
$_SESSION array. To retrieve the value, you use it from the appropriate
index in the $_SESSION array (or just use the array element itself).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
email***@***.com
==================
- 16
- help with php.ini include_path?I'm attempting to integrate some PayPalPro supplied modules which come with
their own directory structure. I've installed this "directory" into my
common "working" includes directory.
However, because the supplied code uses so many levels of includes PHP is
not finding the referenced included functions.
Heres an example:
my own working includes:
/cgi-bin/includes
and I've installed the PayPalPro supplied stuff into that directory which
then constructs:
/cgi-bin/includes/PayPal/
/cgi-bin/includes/PayPal/Stuff/
/cgi-bin/includes/PayPal/Stuff/more_stuff/
/cgi-bin/includes/PayPal/Stuff/more_stuff/etc/
and so on.
When I use "include_once("module_name.php"); in my program the compiler
FINDS the module but the module itself then includes more items from
further on down the tree.
I've added the recursed directories to my php.ini include_paths directive
but is this really necessary?
Does one have to include each and every directory explicitly or is there a
method to define "recurse from this directory down" somewhere? I've
searched the docs (books, bibles, groups, php.net, etc) and cannot seem to
come up with any other way.
Please tell me I'm crazy and that there is a more reasonable way to
accomplish this?
Advice, help appreciated!
Bob
- 16
- Support for the Book: Secure PHP DevelopmentHas anybody ever heard of support for the book:
"Secure PHP Development"
by: Mohammed J. Kabir
I'm trying to run one of his PHP solutions called "Web Forms Manager"
I haven't been able to get it up and running.
Thanks in advance!
T_Martin
- 16
- Compare 2 arrayshello :)
I need to compare 2 arrays and get results:
number record with 1 from arrayA/and results coincident from arrayB
(excluding key [0])
example:
6/5
(example)
arrays contains only 0 and 1:
arrayA:
( [0] => 2 [1] => 1 [2] => 0 [3] => 0 [4] => 1 [5] => 0 [6] => 0 [7] => 1
[8] => 0 [9] => 1 [10] => 0 [11] => 0 [12] => 0 [13] => 1 [14] => 0 [15] =>
0 [16] => 1 [17] => 1 [18] => 1 [19] => 1 [20] => 1 [21] => 0 [22] => 0 )
arrayB:
( [0] => 9 [1] => 1 [2] => 1 [3] => 1 [4] => 0 [5] => 0 [6] => 0 [7] => 0
[8] => 1 [9] => 0 [10] => 1 [11] => 0 [12] => 0 [13] => 0 [14] => 0 [15] =>
0 [16] => 0 [17] => 0 [18] => 0 [19] => 0 [20] => 0 [21] => 0 [22] => 0 )
Thanks and sorry for my english
|
| Author |
Message |
Ron Hiler

|
Posted: 2003-9-19 10:40:19 |
Top |
php-general, Detecting if server program running
Hi guys,
I'm a C++ programmer, and I have created a game which has a client/server
architecture. What I would like to do is have my web page show if the
server is up and how many people are logged in at the time. Every five
minutes or so, I'd like for the web page to ping for the server, and if the
server is up, it should return a packet with the population number, which I
can then display on the front page. If there is no response from the server
(in, say, 5 seconds), then the page should show it as down.
Unfortunately, I'm a horrible php coder :) I can handle the server end code
no problem, as long as I know what to send such that the php code can read
it. What I don't know is how to send the initial request from the web page
to the server.
Both my web page and my server have fixed IP addresses. My page has a MySQL
database that I could use to store the information between pings if that
helps. Is it possible to do what I'm after with the tools I have?
Any advice/tips/links?
Thanks -Ron
|
| |
|
| |
 |
Randell D.

|
Posted: 2003-9-20 0:18:00 |
Top |
php-general >> Detecting if server program running
"Ron Hiler" <email***@***.com> wrote in message
news:3f6a6bae$1@wobble...
> Hi guys,
>
> I'm a C++ programmer, and I have created a game which has a client/server
> architecture. What I would like to do is have my web page show if the
> server is up and how many people are logged in at the time. Every five
> minutes or so, I'd like for the web page to ping for the server, and if
the
> server is up, it should return a packet with the population number, which
I
> can then display on the front page. If there is no response from the
server
> (in, say, 5 seconds), then the page should show it as down.
>
> Unfortunately, I'm a horrible php coder :) I can handle the server end
code
> no problem, as long as I know what to send such that the php code can read
> it. What I don't know is how to send the initial request from the web
page
> to the server.
>
> Both my web page and my server have fixed IP addresses. My page has a
MySQL
> database that I could use to store the information between pings if that
> helps. Is it possible to do what I'm after with the tools I have?
>
> Any advice/tips/links?
>
> Thanks -Ron
>
>
PHP is a server side meaning the client (web browser) has no access to it.
When a web page link is selected, or a page visited, the server works in the
background to give whatever results your PHP program specifies.
I would think that you need a javascript (or java) based solution for the
client side. To confirm if the server is available or not, you could
perform a test if an image exists or not on the remote server and use it as
a flag file with javascript, but I'm sure java must have some more flexable
and environmentally friendly solutions...
|
| |
|
| |
 |
| |
 |
Index ‹ php-general |
- Next
- 1
- parent classesI want to iterate through parents of some class.
The function get_parent_class is not enough since it retrieves only the
first parent of an instance.
Is there a way to retrieve the parents of a class without having an instance
of this class ? And if I have an instance, can I retrieve all parent
classes?
Cristiano Duarte.
- 2
- 3
- [PHP] SQL Source ControlRichard Davey wrote:
> Hi all,
>
> I know a lot of you use various means for PHP source control (CVS, SVN,
> etc), which is all well and fine, but how do you manage source control
> on your databases?
>
> Say you've got an upgrade to a site, all of the new PHP files are
> controlled by SVN, so you can rollback at any time, but say the upgrade
> includes several key modifications to a MySQL table and perhaps the
> changing of some core data.
>
> How (if at all?!) do you handle the versioning of the database and data
> itself, so you can keep both PHP and SQL structure in sync?
lets forget that updating SQL schemas on massive DBs will likely take
so much time that you will have to plan in downtime on the systems involved ...
that's clearly out of the scope of this question.
my strategy is also pretty weak in this regard but generally:
I write my code in such a way that older code can run with newer db schemas,
which basically means I add stuff but never remove it (tables, fields, etc) ...
schema updates are always 'expansive'.
If I'm feeling very tidy I'll create a seperate CVS module for the schema and
updates/rollbacks. this involves writing sql files that update for each version of
the project I have/will rollout ... and also sql files that perform the reverse/rollback
actions between project versions. (when I'm being tidy I always do DB schema update when
the major version number of a project changes) I end up with files named something like:
v1-to-v2.sql
v2-to-v3.sql
v2-to-v1.sql
v3-to-v2.sql
then I include a script which I can call with the desired version number and it works
out which sql files it needs to run and in which order (the current version is
either stored in the DB or stored in a txt file outside of CVS) ... I have considered making
this 'change version' script also automatically perform the required 'cvs up -r Foo' command on the
actual project files but I have not got round to ever actually do it (time, money, inspiration, lackof)
- maybe that brainfart inspires somewhat, then again maybe you'll pass out fom the smell :-)
>
> Cheers,
>
> Rich
- 4
- This, then that.Hi gang:
I would like to run a php script that creates a web page and AFTER it
is finished creating the page, then it runs another php script -- how
you do that?
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
- 5
- [PHP] Standard Address Book?Timothy Murphy wrote:
> Is there any kind of standard
> for a PHP/SQL/XML addressbook?
>
Are you asking if there is any type of standard for building an address book in general?
That you are using PHP/SQL/XML is your preference.
With a few clicks from Google, I found these:
http://groupware.openoffice.org/ab_schema/index.html
http://developer.apple.com/documentation/AppleApplications/Reference/SyncServicesSchemaRef/Articles/Contacts.html
Hope this helps
--
Enjoy,
Jim Lucas
Different eyes see different things. Different hearts beat on different strings. But there are times
for you and me when all such things agree.
- Rush
- 6
- PHP page from several serversI have a PHP web page hosted by a server I do not control. I would like
to add some more advanced functionality, specifically using XML-RPC,
that is not supported by this server. I can host this extra content on
a web server I do control. I don't want to migrate the whole site,
because my server is an experimental box and may be subject to
downtime; in this case, I don't mind losing the extra content, but I
want the main page to stay in place.
My question is about the best way to embed pages from an external
server. I guess I can use fopen (or similar) to display the page
itself, but I also need the external server to respond to get and post
variables. Could I write a wrapping page to perform this functionality?
Any other suggestions?
Peter
- 7
- SEO World News!!! Info for 2008Well, the new year is finally here. If it wasn't clear enough in 2007
that phone books and print advertising is a thing of the past like the
obsolete telegram. In 2008 it is part of the average businesses
everyday budget to waste big money on Pay Per Click, the cold hard
facts are 70% of payper click is FRAUD. Just ask any advertiser that
got billed 120.00 dollars or more, and didn't get one single lead. The
only answer to the dilema is organic search engine development. The
main benefits of getting the best seo company http://www.atomicseo.net
is that when you finally do decide to terminate services with an seo
company all the link popularity and Page Rank is still there and won't
just dissapear over night, it might take a few months, therefore
giving you a window of advertising that you do not get when you stop
paying Google.
http://www.atomicseo.net
- 8
- [PHP] pack it inOn Jan 24, 2008 6:20 PM, Jochem Maas <email***@***.com> wrote:
> someone asked about checksum values in another thread, I believe
> he got his answer no thanks to me. but whilst I was trying to help
> I got stuck playing with pack/unpack.
>
> so now I have the broadbrush question of what would one use
> pack/unpack for? can anyone point at some realworld examples/code that
> might help me broaden my horizons?
here is an awesome one.
so for ldap, you have to ensure data meets a specific 'format' for
all the different 'syntax'es it supports. these are each represented
by a particular syntax oid, and the syntax is written in backus noir form.
i wish i could say its reasonable to cipher out the syntax of those things,
but then id be lying; at least for me, i struggle .. =/
anyways; for the password field, you have to supply ldap an appropriate
syntax.
the field has this syntax oid
1.3.6.1.4.1.1466.115.121.1.40
which is described as an Octet String.
in order to get a password into ldap, i had to use the following
$attrs['userPassword'] = '{MD5}' . base64_encode(pack('H*', $userPassword));
per this article:
http://logout.sh/computers/ldap/
-nathan
- 9
- kodana stranica win1250 u UTF8Imam probema sa prebacivanjem iz kodne stranica win1250 u UTF8
Kod prebacivanja nasi zankovi su stalno kucice.
Moze li mi ko pomoci?
Puno hvala
Leo
- 10
- 11
- Problem building PHP with GCC 4.1.1Hi folks,
Trying to build php 4.4.4 on a RHEL4 (64-bit) box using GCC 4.1.1 (binutils
2.17) that I built on this box (default compiler was gcc 3.4.6).
Compiling under 3.4.6 works fine. However, when compiling under 4.1.1, I get
the following error:
..
/usr/local/gcc411/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/../../../../x86_64-unknown-linux-gnu/bin/ld:
main/output.lo: relocation R_X86_64_PC32 against `php_default_output_func'
can not be used when making a shared object; recompile with -fPIC
/usr/local/gcc411/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/../../../../x86_64-unknown-linux-gnu/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1
The object, however, IS built with -fPIC:
...
/bin/sh /home/jonathan/sw/vdx_ostk/build/php-4.4.4/libtool --silent
--preserve-dup-deps --mode=compile gcc -Imain/
-I/home/jonathan/sw/build/php-4.4.4/main/ -DPHP_ATOM_INC
-I/home/jonathan/sw/build/php-4.4.4/include
-I/home/jonathan/sw/build/php-4.4.4/main
-I/home/jonathan/sw/build/php-4.4.4
-I/root/tools/openssl/include
-I/root/tools/zlib/include
-I/home/jonathan/sw/build/pgclient/
-I/home/jonathan/sw/build/php-4.4.4/ext/xml/expat
-I/home/jonathan/sw/build/php-4.4.4/TSRM
-I/home/jonathan/sw/build/php-4.4.4/Zend -m64 -fPIC -c
/home/jonathan/sw/build/php-4.4.4/main/output.c -o main/output.lo
...
This is how I'm building PHP (operation is scripted):
options="--prefix=${PFX_PHP} \
--with-xsl=${PFX_LIBXSLT} \
--with-openssl=${PFX_OPENSSL} \
--with-libxml-dir=${PFX_LIBXML2} \
--with-zlib=${PFX_ZLIB} \
--without-xmlrpc \
--without-bz2 \
--with-mysql \
--without-sqlite \
--enable-force-cgi-redirect \
--enable-memory-limit \
--disable-pear \
--disable-ipv6 \
--with-pgsql=${BUILD}/${SD_PGCLIENT} \
--with-apxs=${APACHEBIN}/apxs"
./configure $options
I have no idea what to make of the above error. Seems to refer to a function
(pointer?) Perhaps something to do with it being a global?
Anyone else run into this or have an idea how to get around it?
Cheers!
Jon
- 12
- password characters with eregHi,
I want to use the ereg function for the right input of password characters.
The password must be minimal one character and one number and a length of
minimal 6.
This expression: ereg('[A-Za-z]{1}[0-9]{1}', $str) don't accept a number on
the first position. Can sombody help me for the right expression?
thanks,
Rick
- 13
- http_requestGreetings on New Year :)
We have a script, say layer.php, which uses HTTP_REQUEST package to
authenticate a user to an existing application (viz., wordpress,
mediawiki etc.)
I would like help on the following two fronts:
1. How do I return the cookies, headers etc. from the layer (which are
being sent from the application) to the browser?
2. How do I redirect browser from the layer.php to a page of the application.
I was thinking that if I could find a way to send the headers and
cookies to the browser, I could also send a 302 status code, along
with the cookies, to redirect the user to a page of the app.
--
Thanks and Regards
Peeyush Gulati
+91-9916304135
- 14
- password problem installing Zend Server 5WhenI try to install Zend Server 5 on a localhost, I am asked for a
password twice.
I type some password and then the machine seems to hang.
Everytime I try.
What is going on there ?
WinXP, btw.,
- 15
- peer review (was php framework vs just php?)I did a quick and dirty of just one of those functions. This function
takes a table and creates a form based on the table. It needs quite a
bit of refining, but I am willing to share and let you guys and gals
throw suggestions;
function formCreate($database, $table, $action, $excludeCols,
$recordID){
/*
* This function is used to create forms on the fly based on
tables within
* the database. The minimal arguments are database name and
table name.
* Additional arguements may be supplied to indicate columns to
be excluded
* from form and an action (CRUD) to be performed once the form
* is filled out. If wanting to do an update, read or delete you
can specify
* a record to retrieve to populate the form. Default values
will be provided
* for arguements not included.
*/
/* database connection in global variable */
global $dc;
/* number of arguements sent to function */
$numArgs = func_num_args();
/* test to make sure that you have the minial two arguements */
if(2 > $numArgs){
/* not enough arguments */
$errMsg = "not enough arguements supplied, please supply
database and table name";
return($errMsg);
} else {
/*
* Supply default values for optional arguements if they
are not set.
* An interesting note here: the action can be anything
that the user
* specifies, it is not strictly limited to CRUD and it
will be output
* in a hidden form field;
* <input type="hidden" name="action" value="whatever
action is called">
* That way when the user clicks 'Submit' the programmer
can have a
* switch action in his or her processing script to
handle this form.
*/
if(!isset($action)) { $action = 'read'; }
if(!isset($recordID)) { $recordID = ''; }
if(!isset($excludeCols)){
$excludeCols = '';
} else {
/* create an array of excluded columns */
$arrExcludeCols = explode(",", $excludeCols);
}
/* describe the table */
$sqlDesc = "DESCRIBE `".$database."`.`".$table."` ";
if(!($dbInfo = mysql_query($sqlDesc, $dc))){
return mysql_error();
} else {
while($tableInfo = mysql_fetch_array($dbInfo)){
/*
* regular expression - we need the data
that exists between the
* parentheses in the Type column of the
database being described
* so that we can use for length values
of form fields
*/
if(!(in_array($tableInfo['Field'],
$arrExcludeCols))){
if(preg_match (
"/\((\d{1,}.*?)\)/", $tableInfo[1], $regs )){
/* handle numerical
values in parentheses to create form element lengths */
echo
"<label>".$tableInfo['Field']."</label>";
echo "<input
type=\"text\" name=\"".$tableInfo['Field']."\" size=\"".$regs[1]."\"
maxlength=\"".$regs[1]."\"><br />\n";
} elseif("text" ==
$tableInfo[1]) {
/* handle text columns
*/
echo
"<label>".$tableInfo['Field']."</label>";
echo "<textarea
name=\"".$tableInfo['Field']."\" cols=\"80\" rows=\"10\"></textarea><br
/>\n";
} elseif("enum" ==
substr($tableInfo[1], 0, 4)){
/* handle enumerated
columns and creat drop downs */
echo
"<label>".$tableInfo['Field']."</label> ";
/*
* regular expression -
we need the data that
* exists between the
single quotes in the Type column of the
* database being
described so that we can use for option
* values in a drop-down
on the form
*/
preg_match_all(
"/'(.*)'/U", $tableInfo[1], $matches);
echo "<select
name=\"".$tableInfo['Field']."\">\n";
echo
"<option></option>\n";
for($i = 0; $i <
count($matches[1]); $i++){
echo
"<option>".$matches[1][$i]."</option>\n";
}
echo "</select><br
/>\n";
}//end if preg
}//end if in_array
}//end while tableInfo
/* set up the hidden action field */
echo "<input type=\"hidden\" name=\"action\"
value=\"".$action."\">\n";
/* provide a submit and reset button */
echo "<input type=\"submit\" name=\"submit\"
value=\"Submit\"> ";
echo "<input type=\"reset\" name=\"reset\"
value=\"Clear\"><br />\n";
return;
}// end if dbInfo
}// end if numArgs
}//end function formCreate
With this I need one function call to create the form on the page. I can
exclude columns and set an action to be taken once the form is filled
out.
There are several other functions and what I end up with is a set of
functions that do make up a form handling framework. This can also be
done in the context of OOP, I just want to show some procedural code.
This assumes MySQL as the database.
Let the laughter begin.....
|
|
|