Sagewire Logo

php programming RSS Feed

Recent Posts View Recent Posts | View Archived Posts

Message from Gilles Ganault
Most recent post: 10/28/2007
8 authors and 14 replies.

Hello

I have been googling for a couple of hours, but still have not found what
I need:
- really simple PHP-based image gallery software. Ideally, just a
single file that I just drop into a directory filled with JPG files
- uses eg. GD to generate thumbnails automagically, and saves them
into a sub-directory for the next time (I do not want thumbnails to be
regenerated every time someone views the pictures)
- as an option, supports slideshow
- free/open-source

Any good recommendation?

Thank you. read more about Simple image gallery?


Message from DiAvOl
Most recent post: 10/28/2007
4 authors and 17 replies.

Hello,

wrote in message and have some questions
related to the resource id's. When a new client connects to the server
or the server opens a file the Resource id number increases normally,
but when the server closes the socket and the file and then a new
client connects or file opens, the Resource id still increases without
reseting to the previous closed id's.

For example:

Client connects to the server...accept();
Client fd: Resource id #1
client quits.... fclose/socket_close
Client connects to the server...accept();
Client fd: Resource id #2
client quits.... fclose/socket_close
...
...
...
Client connects to the server...accept();
Client fd: Resource id #12456

Should not the resource id reset to #1 when the second client
connected ? Can this behaviour cause problems to the server ?

wrote in message a simple socket server and client to demonstrate this:

server:
----------

<?php
set_time_limit(0);

$socket = stream_socket_server("tcp://0.0.0.0:6000", $errno, $errstr);
if (!$socket) {
echo "$errstr ($errno)<br />
\n";
} else {
while ($conn = stream_socket_accept($socket)) {
testme();
testme();
testme();
print("Client fd: ".$conn." \n");
fclose($conn);
echo '$socket is resource = ' . (is_resource($conn) ? 'true':
'false')."\n";
}
fclose($socket);
}

function testme() {
$fp = fopen('testfdss','a');

fclose($fp);
echo '$file_pointer is resource = ' . (is_resource($p) ? 'true':
'false')."\ read more about About Resource id's


Message from 182719
Most recent post: 10/28/2007
5 authors and 8 replies.

<?php

$testcase = 'AKLWC139';

if (ctype_upper($testcase)) {
echo "The string $testcase consists of all uppercase letters.
\n";
} else {
echo "The string $testcase doesn't consist of all uppercase
letters.\n";
}

?>


This is some code that will check a string and validate if it consists
of all uppercase letters. I am not too familiar with syntax of PHP as
I am learning, ... can someone please show me a way to make this, so
it dives a little deeper into checking, and instead checks to see if
part of the string contains two or more consecutive uppercase
letters? Like

'akwSKWsm''d return positive,.... but 'aKwskWsm' wouldn't.

I do not know how this'd work, but it seems approachable. Can
someone pls. help me?

Thank you in advance for assistance. Have a very good day. read more about determine of part of string is uppercase, based on requirements


Message from admyc
Most recent post: 10/28/2007
8 authors and 10 replies.

Hello

I am having trouble making PHP web page that uploads an image file and
moves it to a new file name. The problem occurs when the new filename
already exists.

I am using move_uploaded_file().

The fist time an image file is uploaded and moved to a new file name
there is no problem, however if I decide to upload a different image
file, when the script tries to move this to the same filename (which
is what I want as I want the uploaded file to have a specific name) it
does not work and a couple of warning messages are shown one saying
'failed to open stream: No such file or directory in...' and the other
saying 'Unable to move '...\tmp\php42.tmp' to 'htdocs/.../images/
newimagename.jpg' ...'

I have looked at www.w3schools.com and it says 'Note: If the
destination file already exists, it'll be overwritten.' however I
think the problem is that this isn't happening?

Any help very much appreciated

Thanks

AM read more about comp.lang.php


Message from Kevin Blount
Most recent post: 10/28/2007
4 authors and 13 replies.

I'm having a very odd issue, that arose this morning after working
fine yesterday...

here's a very simple script:

1: <?php
2: $test = $_GET['test'];
3: echo "Hello" . $test . "<p>
";
4: ?>

when called using this URL:

http://216.244.107.150/info.php?test=me

the code should just output:

Hello me

but instead the server just hangs, until my browser timesout. If I
remove "?test=me" from the URL, the script works just fine (output:
"Hello "), but for some reason all my PHP scripts now hang when I try
and pass a name/pair on the URL.

Any ideas?? I'm very new to PHP and probably change the config of IIS6
somehow, or just broken it in some other way. Any advice'd be
appreciated.

Beekay read more about cannot pass query string (GET) vars


Message from joanna
Most recent post: 10/28/2007
3 authors and 6 replies.

I'm having some difficulty paginating from the $_GET variable,
because in this instance the string being passed is of a group by
query (one letter). Currently I'm limiting the results using limit,
Here's what I currently have and it works just fine at displaying, I
just need to add pagination.

<?php

if( !isset( $_GET['title'] ) )
{
print 'No Record was Selected';
}
else
{
$query = mysql_query("SELECT ID,Title FROM table WHERE Title LIKE
'" . $_GET['title'] . "%' LIMIT 0, 100")or die(mysql_error());
}
if( mysql_num_rows($query) == 0 )
{
echo 'Sorry no records';
}
else
{
while($row = mysql_fetch_array($query ))
{$title=htmlspecialchars($row['Title']);

echo "<td>
<a href=\"page2.php?title=" .$title. "\"> $title</a></td>
\n<br>";
?> read more about Paginate from group by


Message from jemptymethod
Most recent post: 10/28/2007
2 authors and 4 replies.

I have created the following function for returning only ini keys that
pertain to xdebug. I'm wondering how I might go about doing the same
sort of thing with one or more of the various "array_" functions
instead (e.g. array_filter). Since I'm working with xdebug (if you
can not tell ;) I will respond in kind with trace data comparing the
functions.

Thanks in advance....George Jempty

function ini_get_xdebug() {
$ini_all = ini_get_all();
$ini_xdebug = array();
$xdebug_prefix = 'xdebug.';

foreach ($ini_all as $k=>$v) {
if (substr($k, 0, strlen($xdebug_prefix)) == $xdebug_prefix) {
$ini_xdebug[substr($k, strlen($xdebug_prefix))] = $v;
}
}
return $ini_xdebug;
} read more about filtering xdebug ini keys


Message from mantrid
Most recent post: 10/28/2007
2 authors and 4 replies.

Hello
I have date and time in my mysql table in the form
2007-05-03 00:00:00
which I have dispayed on my webpage using
echo $selldatetime
I want to know how I can display it in the form
03-05-2007

Thanks read more about Formatting a date with php from a mysql table


Message from sw
Most recent post: 10/28/2007
2 authors and 2 replies.

Hi all,

I have a news website tat is developed on joomla 1.5.Login facility is
done thru a login component.On each page,ther s a 'Log In' link that
redirects them to a login page.On successful login,user details are
set in session as well as cookies and then redirected back to d
referring page.The 'Log In' section changes to 'Welcome user',along
wid a 'Log Out' link.All this works d same in IE 6 as well as in FF
2.The difference comes durin log out action.

In FF,on clickin 'Log Out',the required session vars are set '' as
well as cookies in d component and then redirected back to referring
page.The login bar changes back to 'Log in'.But in IE,once redirected
from the component,the page still shows the login bar as 'Welcome
user'.Only if I manually click the refresh button (of IE), the page
gets refreshed and the login bar shows logged out status.

Any help wud be highly appreciated... read more about Session or browser problem??


Message from leonardodiserpierodavinci
Most recent post: 10/28/2007
3 authors and 5 replies.

Hi. Sorry for what is perhaps a neophyte question: is it possible to
pass a variable to a PHP script from inside another PHP piece of code?

For instance, the file test.php (which of course resides on a
webserver that supports PHP) is as such:

[some HTML code...]
<?php
echo("<i>
the variable abc contains " . $_GET['abc'] . "</i>");
?>
[some more HTML code...]

and if I open this file directly i.e. by typing test.php?abc=888 in
the URL line of a web browser, I correctly get the message "the
variable abc contains 888" in italic, surrounded by the HTML content.

Now, let's say that I want to include all this content in another
file, index.php.
I tried to call it as such in index.php

[other HTML...]
<?php
include "test.php?abc=888";
?>

[yet other HTML...]

which isn't the correct way as it gives the following error:

Warning: main(l/test.php?abc=888) [function.main]: failed to open
stream: No such file or directory in /home/www/index.php on line 52
Warning: main() [function.include]: Failed opening 'l/test.php?
abc=888' for inclusion (include_path='.:/usr/share/php:/usr/share/
pear') in /home/www/index.php on line 52

How should I call the file?
Thanks in advance for any hint! read more about Is it possible to pass a variable to a PHP script from inside another PHP piece of code?


Message from Bill H
Most recent post: 10/27/2007
5 authors and 5 replies.

I have changed our web site to use a simple PHP script to send a demo request
to our sales office. We use Postfix and everything is set up properly and
works fine. I have been informed there are some security issues to review.

The script looks like:

<html>
<head><title>PHP Mail Sender</title></head>
<body>
<?php

/* Pre-defined script variables. */
/* $eol = "\r\n"; */
$eol = "\n";
$mailto = 'sales@xxxxxxxxxxx';
$mailfrom = 'webserver@xxxxxxxxxxx';
$subject = 'Company Demo Request';

/* Initialize a clean array to replace $_POST with clean data */
$name = $_POST['name'];
$title = $_POST['name'];
$company = $_POST['name'];
$email = $_POST['name'];
$phone = $_POST['name'];
$message = $_POST['name'];

/* Build HTML $salesmessage variable to pass to mail script */
$salesmessage = "<HTML>
<HEAD></HEAD><BODY>" . $eol;
$salesmessage .= "The following information comes from the company web
site<BR>".$eol;
$salesmessage .= "demonstration link.<BR><BR>".$eol;
$salesmessage .= "<TABLE cols='2'>".$eol;
$salesmessage .= "<TR><TD style='color:blue'>Company Name: </TD><TD>".
$company ."</TD></TR>".$eol;
$salesmes read more about Securing an Email script


Message from Kevin Blount
Most recent post: 10/27/2007
9 authors and 14 replies.

I'm trying to create the forum favorite dynamic sig image, that's
realy PHP script. I have had moderate success with .php files but when I
change the extension to .png I'm prompted to download the file, rather
than it rendering.

My understanding is that this isn't supposed to happen, and that by
adding an.htaccess file I can force .png files to be compiled/parsed/
whatevered by PHP. In my .htaccess file I have:

AddType application/x-httpd-php .png

Any advice?

I'm using heliohost.org as my host, and they basically pointed me to
create the above file (as the first reply to my recent support query).
Googling this I'm not seeing that I'm doing anything wrong.. so what
gives? read more about Trouble with AddType application/x-httpd-php .png


Message from John
Most recent post: 10/27/2007
5 authors and 11 replies.

I need a scroller (JAVA) or whatever that can read a php file and
display it in the script. Does anyone know of any?

I have searched the script sites but did not find anything. read more about Need scroller that reads a php file


Message from dennis.sprengers
Most recent post: 10/27/2007
3 authors and 4 replies.

* I'm trying to work out some rewrite rules that should do the
following:

case 1: a request to mysite.com:
rewrite http://www.mysite.com/files/sheets.ppt
to http://www.mysite.com/sites/default/files/sheets.ppt

case 1 - n: a request to othersite.com:
rewrite http://www.othersite.com/files/sheets.ppt
to http://www.othersite.com/sites/othersite/files/sheets.ppt

So, if a request comes in to mysite.com, /files/-urls need to be
rewritten do /sites/default/files/sheets/ppt, since mysite is the
default website on the server. Surfing to a file on any other website
that is hosted on the server, needs to be rewritten to /sites/
<name_of_site>/files/sheets.ppt

Sheets.ppt is of course just an example of a file file.

* I first tested my CMS (for which I need these rules) on my own
little server @xxxxxxxxxxx, and found these rules to be working OK after
spending hours on forums on apache and mod_rewrite:

# http://localhost/mysite/files/* > /mysite/sites/default/files/*
RewriteCond %{REQUEST_URI}-default ^/mysite/.+-(default)$ [NC,OR]
# http://loclahost/<othersite>/files/* > /<othersite>/sites/
<othersite>/files/*
RewriteCond %{REQUEST_URI}-default ^(.+)(default)$ [NC,OR]

But now I have no clue on where to begin anymore, since it has been a
long time I researched mod_rewrite. Could somebody help me out? Any
help is appreciated :-) read more about mod_rewrite rules for live site


Message from LarsWill
Most recent post: 10/27/2007
4 authors and 5 replies.

As far as I know I can override the php settings for a certain branch of the whole directory tree
by putting a additional, new php.ini in this directory.

Is this true ?

If I assign in this new php.ini only a new value to 1 (!) php variable are then all the
other php parameter values taken from the next php.ini when I go towards the root of
the directory tree? Or - otherwise - are default built-in values from PHP taken in this case ?

Do I have to do something else to activate this new php.ini (e.g. specify something in the
.htaccess file) ?

Lars read more about Does a lower php.ini replace an upper php.ini in the directory tree ? Activation in .htaccess necessary ?


Message from Gustaf
Most recent post: 10/27/2007
6 authors and 9 replies.

I have been working on a membership form for a while, and find it very
tedious to get an acceptable level of form validation. A web search for
solutions revealed some home-brewed solutions, such as these:

http://simonwillison.net/2003/Jun/17/theHolyGrail/
http://samuelsjoberg.com/archive/2004/11/form-validation-on-client-and-server

Quoting from the first link, this is my idea of what form validation is
like from the user's perspective:

1. The form is displayed; you fill it in.
2. You submit the form to the server.
3. If you missed something out or provided invalid input, the form is
redisplayed pre-filled with the valid data you already entered.
4. The redisplayed form tells you what you got wrong. It also flags
the fields that were incorrect.
5. Loop until you fill the form in correctly.

In my membership form, I have found this to be complicated, error-prone
and tedious if coded by hand in PHP. Plus, I find that very little of
the code that comes out of it can be reused. There must be a better way...

I'm all for coding by hand, but in this case, the most productive
environment I can imagine'd be a WYSIWYG IDE environment, where you
draw the form and pick most properties from drop-down lists. The IDE
would then generate all the code for you, and offer to FTP it to the
right location. I believe this is what Microsoft wanted to accomplish
with Web Forms in ASP.NET. The big drawback there (correct me if I'm
w read more about Best solution to tedious form validation?


Message from Fester Bestertester
Most recent post: 10/27/2007
9 authors and 19 replies.

Greetings,

I'm an occasional php/mysql dabbler.

I have a basic data form with a submit button. Unfortunately, it's still
possible for the user to enter data changes and close the window,
without clicking the submit button, thus losing the data.

Can someone point me to a generic example of some code that will trap
and handle this error? read more about Dirty Form Error Trapping?


Message from Royan
Most recent post: 10/27/2007
2 authors and 3 replies.

I'm trying to make use of ssh2_auth_pubkey_file() and login into
remote machine.

I have read somewhere that in order to make that function work I have to
supply it with public key with specific format due to limitation of
libssh2. The public key should look like this: <key_type>{1 space
character}<key_data>

Well it still doesn't work even if I change my public key file. Says
"Authentication failed for <user_name> using public key" Can somebody
help me and perhaps give an idea where to look next?Yes, unfortunately I can not use any other way of logging in to the
remote PC, so username/password isn't an option for me read more about Can not login to remote SSH server using ssh2_auth_pubkey_file


Message from Daniel
Most recent post: 10/27/2007
3 authors and 3 replies.

Hello,

I was wondering if I was missing something simple, an existing
function, that allows me to resample image in size (width and height)
as well as the file size as well.

What I am trying to do is automate importing images and standardize
the saved version to a typical dimension and maximum file sie (80Kb).

I have found numerous scripts for resample the dimensions of an image
but file size seems trickier to find or I'm not looking in the right
places.

Any pointers, help is greatly appreciated. read more about resampling images


Message from Zayde
Most recent post: 10/27/2007
5 authors and 5 replies.

Is there a package of functions to do numerical integration in PHP ? read more about Integration of differential equations in PHP


Message from Dev
Most recent post: 10/26/2007
6 authors and 29 replies.

Dear All,
I have created a website.
in the contact us page I want to send all information (Entered by
visitor in text boxex) directly to my e-mail address.
to do this I have no idea because I am new to PHP.
thanks in advance
Dev read more about send email to me


Message from Kevin Blount
Most recent post: 10/26/2007
2 authors and 2 replies.

I'm getting data from an XML file using this method:

$name = $xml->user_info->user['name'];
$nickname = $xml->user_info->user['nickname'];

&

$age = $xml->user_info->user['age'];
$shoe_size = $xml->user_info->user['show_size'];

I want to compare name & nickname, and age & shoe_size, but I can not
figure out how, as all 4 are objects.

Basically I want to know if age > show_size or name == nickname.

How'd I do that?

I tried:
if ($age > $shoesize)
{
echo "age is higher";
}
else
{
echo "shoesize is higher";
}

but it ALWAYS comes out as "shoesize is higher", mostly I think
because I'm comparing objects, not integers. I just can not find out how
to convert the obj to an int, or compare two like-typed objects. read more about comparing two XML->objects


Message from John Doe
Most recent post: 10/26/2007
4 authors and 5 replies.

Here's my issue: I have an instant messenger type feature for my site, its
basically an ajax IM feature. I run with a mysql backend on the site, I have
a div on my main page that runs a JAVAscript timer to load the php page via
ajax every 15 seconds which checks the "pinguser" table to see if the user
has any chat requests, then echoes them to a div on the page. what I REALLY
want to do is have the ajax page see if there is a ping for the user, and if
so, pop up a JAVAscript alert or somethign to let the user know he has a
chat request. I tried just echo'ing the JAVAscript to do an alert(); , or
even a window.open. It works if I just run the script by itself, but when it
runs in the div on my main page, I get the rest of the feedback (it displays
the message I echo'ed that said "youve got mail", but the alert box doesnt
pop up. Anyone have any idea what Im doing wrong? I have been googling for 3
days straight and going crazy, never thought to check the groups before. read more about Cant figure out ajax/php problem.


Message from maya
Most recent post: 10/26/2007
4 authors and 8 replies.

hi expert php'ers.....;)

is it ok to ask WordPress questions here? I mean if you do not get a
response to your quetion in WP forums where else can you go??
I have WP 2.3 installed on my own hosting server..
I'm tying to do something that should be quite simple yet I can not get it
to work...

I want to do my own form, w/o having to use a plugin.. I tried a contact
plugin, but you can not specify what address to send email to, which
renders the plugin pretty useless.. in readme file for the plugin is
url to a forum for plugin (www.linksback.org/forums) in this forum I
found question on how to change 'to' email address, this is the answer:
"It is set to go to the default wordpress email. [oh really? what
address exactly???] I'll include an option to change that in the next
version" (a joke, if you ask me..) I found a variable for "to" email
address among the code, and changed it there, but it still did not work..

I have my own php-code for sending email, that works fine if the form
submitting is OUTSIDE WP-installation; but if the form is INSIDE the
installation, no info gets passed to my ThankYou.php page, which I have
put outside WP-installation and in 'action' attr inside form tag put an
absolute link to it..

this is my email code, which, again, works fine if form is outside
WP-installation:

$sendername = $_POST['name'];
// echo "name of sender: $sendername<br>";
$email = $_POST['email'];
// read more about WordPress question....


Message from rojelio
Most recent post: 10/26/2007
5 authors and 34 replies.

So I know I can fax from my computer so I'm guessing there is a way to
get PHP to fax.

I have a program that allows for a customer to be emailed or faxed
certain information.

If PHP can not do this maybe you know whether ASP or asp.net can do it.
But basically I just want to click a button and have it fax... read more about PHP to Fax


Message from cmk128
Most recent post: 10/26/2007
14 authors and 147 replies.

Hi
Any free tool I can use to encrypt my php source code?
thanks
from Peter (cmk128@xxxxxxxxxxx) read more about free tool to encrypt php?


Message from bill
Most recent post: 10/26/2007
2 authors and 3 replies.

I found out that I can only set an offset in my session timezone
in my ISP's MySQL server, not a timezone. So I am left with the
task of setting the offset, which will vary, depending on whether
or not DST is in effect.

Is there a way of discovering, from a PHP script is we are in DST
or standard time ?

bill read more about Is it Daylight Savings Time ?


Message from Xav
Most recent post: 10/26/2007
4 authors and 10 replies.

Why does thisn't work ?

$fileDir = '../folder2/';
$content is an array of php files, file1.php file2.php file3.php
etc...

$c = count($content);
for( $x=0; $x<$c; $x++ ){
include( $fileDir.$content[$x] );
}

any ideas'd be appreciated,
thanks.
Xav read more about Include Problem ?


Message from cmk128
Most recent post: 10/26/2007
6 authors and 14 replies.

Hi
PHP's regular expression look like does not support .*? syntax. So I
cannot match the shortest match. For exmaple:

$str="a1b a3b";
$str1=ereg_replace("a.*b", "peter", $str1);
will produce "peter", but I want "peter peter", so how to?

thanks
from Peter (cmk128@xxxxxxxxxxx) read more about php regular expression does not match


Message from Taras_96
Most recent post: 10/26/2007
4 authors and 7 replies.

Hi everyone,

The output of

echo file_get_contents("http://watchout4snakes.com/creativitytools/
RandomWord/RandomWordPlus.aspx");

leaves the browser empty.. no error messages, nothing.

Why is this occurring?

Thanks

Taras read more about file_get_contents outputs nothing


Message from groups2
Most recent post: 10/26/2007
3 authors and 5 replies.

Can someone please explain the results below
We switched to PHP 5
if I make a copy of an object, and then change the variable inside the
object the change is reflected in the copy.

Either the copy is a reference to the object or the variable inside
the object is a static variable, I'm not sure what is going on, but It
does not seem like it should be doing that. Is that because of a
setting on the server or something ?

<?$label=new myObj();
$label->
settext('the text');

$copy=$label;
print_r($copy);
$label->settext('different text');
print_r($copy);

class myObj{
var $text;
function settext($text){
$this->text=$text;
}

}

?>
results:
myObj Object
(
[text] => the text
)
myObj Object
(
[text] => different text
) read more about copy of object is a reference in PHP5


Message from askel
Most recent post: 10/25/2007
3 authors and 4 replies.

I'm developing small extension that deals with resources. If I use
emalloc/efree for allocating freeing resource data I get random memory
corruption errors. If I replace emalloc/efree with malloc/free,
everything works fine. At least there are no errors produced. I'm
using PHP 4.4.8/Zend Engine 1.3.0/no any optimiser.

-------- myext.c ------
static int le_connections;

struct myconn {
...
}

static void _close_connection(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
struct myconn *conn = (struct myconn *) rsrc->ptr;
/*
Memory corruption happens during or after efree call
*** glibc detected *** php: malloc(): memory corruption: 0x082a5940
***
OR
*** glibc detected *** php: free(): invalid next size (fast):
0x082a58e8 ***
*/
efree(conn);
}

PHP_MINIT_FUNCTION(myext)
{
le_connections =
zend_register_list_destructors_ex(_close_connection, NULL, "my
connection", module_number);
}

PHP_FUNCTION(my_connect)
{
struct myconn *conn;
...
conn = emalloc(sizeof(struct myconn));
...
ZEND_REGISTER_RESOURCE(return_value, conn, le_connections);
} read more about efree cause errors during resource de-allocation


Message from Can2002
Most recent post: 10/25/2007
3 authors and 8 replies.

I have been trying to put together an application to change channel on a
media streaming server. The server is able to issue IR commands to
its attached equipment using LIRC, with commands being issued by a
socket connection to TCP/8765.

I put together a basic Python app that issued a command, which worked
fine. I wanted to create a fairly simple web interface and so set
about producing a similar simple PHP application. I have had limited
success so far, with the media server rejecting the connections.
Unfortunately I have limited access to the OS of the media server - I
just know that it recognises the commands from the Python app and
rejects the PHP one. I need to submit the following string:

SEND_ONCE pace_stb_5 rm_power

My PHP app (with all error checking removed) is as follows:

<?php
error_reporting(E_ALL);
echo "<h2>
TCP/IP Connection</h2>\n";
$service_port = '8765';
$address = '192.168.1.100';
$socket = socket_create(AF_INET, SOCK_STREAM, 0);
$result = socket_connect($socket, $address, $service_port);
$out = '';

socket_send($socket, 'SEND_ONCE pace_stb_5 rm_power\n',
strlen('SEND_ONCE pace_stb_5 rm_power\n'));
echo $result . "OK<br />";

$out = socket_read($socket, 1024);
echo $out;

socket_close($socket);
?>

In case it's of use, my Python application is:

#!/usr/bin/python
import socket,string

def send_ir(host, port, command):

ext read more about Problem reading/writing sockets


Message from gezerpunta
Most recent post: 10/25/2007
5 authors and 12 replies.

Hi

I need a regex code for parsing this string to an email array

"mnp test" <celo@xxxxxxxxxxx>,"test testt"
<otur@xxxxxxxxxxx>,sett@xxxxxxxxxxx,test@xxxxxxxxxxx

thanks read more about Regex help for email


Message from laredotornado
Most recent post: 10/25/2007
4 authors and 18 replies.

Hi,

I'm using PHP 4.4.4 with MySQL 5.0. Does anyone have any experience
and/or recommendations about PHP libraries to use that will allow one
to send a fax from our servers? The fax'd contain order receipt
information from a sale.

Thanks, - Dave read more about Using PHP to send a fax?


Message from Kevin Blount
Most recent post: 10/25/2007
2 authors and 4 replies.

"PHP has encountered an Access Violation at 01C21255"

I'm running a very simple script, that fails when I run it, though
other seem to be able to use it (see this thread:
http://groups.google.com/group/comp.lang.php/browse_thread/thread/4b5602c289865a7d/#)

when I run via Firefox, initially I see the above error msg, then I
get the Firefox standard "The connection was reset" message. read more about anyone know this error msg?


Message from Taras_96
Most recent post: 10/25/2007
2 authors and 3 replies.

Hi everyone,

I'm trying to get the code found at http://www.inventory-management.org/
up and running. So far I have created the database, edited the
configuration files to include the database information, renamed the
fputcsv function to f_put_csv. I'm trying to log into the page by
using the suggested user/pass of admin/test. However, I can see by
placing var_dump($_POST) at the top of index.php, that when I submit
the form no data is in the $_POST array?!

When the action is changed to GET, the appropriate variables appear in
the GET array?!

I thought it may have something to do with the configuration of the
web server, but creating a running a test PHP script that posts a
variable to itself shows that variables, from this script, are being
posted.

Does anyone have any ideas of what may be going wrong?

Thanks

Taras read more about why is the $_POST variable empty?


Message from pwiegers
Most recent post: 10/25/2007
3 authors and 3 replies.

L.S.,

I'm in the process of wraping up a 0.9-version of a new reporting-tool
I have been developping for the past months. I want to invite 2 or 3
people to beta-test this new, exciting tool!

My tool is class-based. (ie: you need to be able to use classes, so if
you do not know OOP 1) please learn, you will love it! 2) do not try to
test my new tool :-) )
The users I have in mind are PHP-programmers that create online
applications. (Not CMS'ses, that won't be of much use.) I'd like
my testers to be experience programmers (+5 years programming, +3
years PHP.)

You'd be in the process of creating a online application at the
moment, and the client want LOTS of (complex) reports. You know how to
generate the SQL-code, but creating all those reports is a lot of
work. My tool can make this easy!

(At the moment, my code cannot deliver graphs of any kind. If you need
those, wait till the next version :-) )

I'll send you a date-locked byte-code .php file, and all
documentation (which isn't yet available online.) I'd like from
you bugreports, and a general feeling if this is usefull (to you, or
to others!).

You'll, of course, recieve a free copy of the 1.0-version! (which I
plan to sell for $ 145,-)

If you are interested, please let me know.

Paul Wiegers
pwiegers@xxxxxxxxxxx read more about Seeking beta-testers for a new reportingtool


Message from turnitup
Most recent post: 10/25/2007
5 authors and 5 replies.

I am in the process of transforming a procedural code base into an OO
code base. The code lends itself to this refactoring and it is proving
an effective exercise.

However, I am running into a few irritations.

I am using __autoload to load class files corresponding to code names.

I have cranked up error reporting, but if for some reason there is a
syntax error or whatever in a class, the application crashes with no
explanation. The bug hunt takes ages and lots of echoing.

Is there anything I can do to help myself? Use of assert, or exceptions,
or try-catch handling? read more about General Advice - objects, classes and coding style


Message from Steve Ray
Most recent post: 10/25/2007
6 authors and 10 replies.

Guys

Is there a way to capture via an environment variable the users screen res

Steve read more about Screen Res Question