 |
| Recent blog posts: | |
 |
| They have birthday today: | |
 |
| Forums: | | |
 |
| Discuss: | |
 |
| Recent forum topics: | |
 |
| Recent forum comments: | |
 |
| Модератор: | |
 |
Tuesday, 11 September 2007
|
| Converting a string Jay Blanchard 16:18:26 |
| | I think that we did this before, but I cannot find my notes or in the archive because I am not sure what we called it.
Let us say that that I have a form item (I'll leave out clutter);
<input name="psFirstName">
It arrives in processing as $_POST['psFirstName']
Now, I have one of these for each form item, each with a different name. In my error script I want to say
"Cannot leave First Name blank"
I need to convert psFirstName to First Name. I tried preg_split, but it cuts away the capital letters. Can someone point me in the right direction again? Thanks!
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 23 answer | Add comment |
|
| Authorize.net David Johansen 16:14:20 |
| | I know that this is way off topic, but I was wondering if someone could help me. I couldn't think of anywhere else to look for info. So here are my questions. If someone could help me out or point me in the direction of a good resource I would be very grateful. But here goes. I just started setting everything up with Authorize.net. I've set it up to send all of the information correctly to Authorize.net, but I had some questions about the relay script that recieves the information. How am I supposed to handle the times when x_Response_Code doesn't equal 1? How do I get it so that the input fields reappear? On most sites they pop back up if an invalid credit card number is entered or any other error, but on mine it doesn't. Do I have to set up the fields myself or is there something I can do to make it reput them all back on the page? Also when it's approved and goes through the user can keep hitting refresh and it charges them multiple times and sends them an email each time. Is this just because I'm in test mode or is there something I can do to prevent this? Thanks a ton, Dave
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 12 answers | Add comment |
Friday, 7 September 2007
|
| RE: mail() + attachment Boaz Yahav 14:32:04 |
| | Class for sending mail with MIME attachments in multipart format using external send mail, mime code and zip http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=336
Class to send a file as an attachment with the php mail() function. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1583
How-to send e-mail with attachments ( with some corrections ) http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1260
Sincerely
berber
Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow.
-----Original Message----- From: Wolf-Dietrich von Loeffelholz [mailto:wloeffelholz@xh9.net] Sent: Saturday, April 20, 2002 10:44 PM To: php-general@lists.php.net Subject: [PHP] mail() + attachement
Is it possible to send with mail an attachment .. if yes, how ???
Greetings wolf
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 4 answer | Add comment |
Wednesday, 5 September 2007
|
| Zend Optimizer not installed Ox 12:23:10 |
| | Hey All,
Does anyone know of a hosting company that will provide Zend Optimizer v2.1.0 or later on a VIRTUAL hosting package. (preferably in the UK)
I have been helping a guy out who has had a development done and the developers kindly didnt tell me that they use Zend Optimizer to encode their pages, and the hosting package even after they said it was "perrfect" is now not working cause it doesnt have Zend Optimizer on it :\
Thanks Ox
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 6 answers | Add comment |
|
| upload file Daniel Guerrier 11:26:00 |
| | This should be very simple but it isn't working.
upload.html has this: <form action="upload2.php" method="POST" enctype="multipart/form-data">
<input type="file" name="userfile"> <input type="submit" name="submit" value="submit"> </form>
and
upload2.php has this: <?php
echo("in post"); echo($_POST['userfile]);
?>
Where is the file??
Thanks
__________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 21 answer | Add comment |
Thursday, 30 August 2007
|
| include files Todd 00:12:19 |
| | Hi,
Is it possible under PHP4 to get the name of the file that a function was called from? To clarify, here's an example of what I'd like to do:
--- main.php --- <?php include('include.php'); function foo(){ $include_file=file_that_called_foo(); printf($include_file); } ?> --- include.php --- <?php foo(); ?>
Does anyone know of a way to do this? I've tried several different things, including to constant '__FILE__ ', but they all return the current file, I am needing the included filename.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 12 answers | Add comment |
Monday, 27 August 2007
|
| Re: [PHP-DEV] PHP issues. Antony Dovgal 13:21:31 |
| | On 01/15/2007 12:14 PM, BuildSmart wrote:> -----BEGIN PGP SIGNED MESSAGE-----> Hash: SHA1>
There seems to be a lot of issues in the build process on Mac OS X, > not to mention once you get them squared away the build still doesn't > work without editing the makefile and adding '-framework > ApplicationServices'> Trying to build on Mac OS X, configuring fails if you build ICU in > the manner they instruct for building ICU for Mac OS X. <skip>> From the config.log it appears to have a problem linking the ICU > library and I believe this is related to not saving the runtime > paths, a note for Mac OSX should be included explaining this issue to > prevent unwanted back-chatter, for the faint at heart, the easiest > solution is to build ICU with '--disable-shared --enable-static'. <skip>>
At this time I've reworked the ICU binaries to be Mac OS X > environment complaint and the configure now progresses as expected. Do you think this is PHP problem? It looks like ICU issue to me.
+++++++> The included imap extension fails to build as well as the pdo_dblib > extension.> For the imap extension I had to add:> #ifdef HAVE_NEW_MIME2TEXT> #undef HAVE_NEW_MIME2TEXT> #endif> to get it to build as it complained with:> /SourceCache/php6/ext/imap/php_imap.c:84: error: conflicting types > for 'utf8_mime2text'> /usr/local/imap/include/utf8.h:466: error: previous declaration of > 'utf8_mime2text' was here> and I figured this out to be related to the 2006c1 and newer API and > I'm using the 2004g source so a different check is required to > determine which library API is really valid. PHP looks for "mail_append_set" im mail.h (which is present only in new versions of c-client) and uses new utf8_mime2text() semantics if it's present. If you have BOTH "mail_append_set" and old "utf_mime2text()", then it's likely you have some problems with the headers.
After examining the pdo_dblib code, I found the code supplied with > php-5.2.0 to be newer and seems to build and work without any issues > (some modification required).> GD doesn't appear to work properly, I have a small script that > populates text on a generated png image and serves it but it doesn't > seem to output anything and I'm not seeing any error messages. Could you please elaborate? A short but complete reproduce script would be most welcome.
I tried enabling display_errors and when I do, I see messages about > 'utf8 is not support, assuming iso-8859-1' throughout the phpinfo() > page so I added the following to ext/standard/html.c:> { "utf8", cs_utf_8 },> which seems to have resolved this. Probably, because it's "utf-8", not "utf8". Though, I don't really understand what you're talking about here..
Now that I have PHP-6 built, installed and configured I'm seeing a > lot of errors related to 'Strict Standards' (I thought his could be > turned off but it doesn't) and even worse, pear doesn't appear to > work citing too many issues.> SEE: (example)> http://www.daleenterprise.com:8081/maia/admin/configtest.php So... ? E_STRICT is definitely not PHP problem. but a problem of your code.
The following php script code exhausts memory.> // PHP Modules> ob_start();> phpinfo(INFO_MODULES);> $php_info = ob_get_contents();> ob_end_clean(); Could you please explain what do you mean by "exhausts memory" ?
-- Wbr, Antony Dovgal
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 3 answer | Add comment |
Tuesday, 21 August 2007
|
| Possible bug with imagettftext and imageft text when imagealphablending
is false Ethilien 14:53:03 |
| | I have been attempting to write a dynamic text replacement script that would generate transparent PNGs using gd, and it works fine except when one of the characters in a font has parts of it that overhang into the previous characters. You can see what I mean in this test script:
<?php $img = imagecreatetruecolor(200, 200); imagealphablending($img, false); $trans = imagecolortransparent($img); imagefilledrectangle($img, 0, 0, 400, 400, $trans); $green = imagecolorallocate($img, 6, 68, 0); imagettftext($img, 30, 0, 10, 50, $green, "carolingia.ttf", "Linux"); header("Content-type: image/png"); imagesavealpha($img, true); imagepng($img); imagedestroy($img); ?>
The result can be seen at http://ethilien.net/tests/text.php When you compare the text with what it should look like when I comment out the imagealphablending($img, false); line here http://ethilien.net/tests/text2.php you can see that the end of the 'u' is cut off.
I think that this is because the lower-left slash of the 'x' overlaps it and causes it to be overwritten.
This might be a bug in GD and not PHP, but I wanted to see if anyone has encountered this problem before or if I'm just not doing something right.
Thanks,
-Connor McKay
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 1 answer | Add comment |
Wednesday, 18 July 2007
|
| ORACLE!!! Roberto RamГrez 20:43:30 |
| | Hello, I'm trying to connect to a Oracle Database on a remote server.
I have read a lot of documentation but I can't connnect to the database, I dont have a very clear concept of what i need to connect to the Oracle database.
I'm using Win2kPro / Apache / PHP 4.2.1 / Oracle 8i Client 8.1.5 In the phpinfo() OCI8 and Oracle modules loads perfeclty.
In the documents I've read, I saw that I need environment variables, whats the purpose of those variables? What happens if I dont set the environment variables? Which are the environment variables? (i.e. ORACLE_SID, ORACLE_HOME, etc)
I've using this kind of code, but it doesnВ’t connect me to the server.
putenv("ORACLE_HOME=C:\Program Files\Ora81"); <-- Is this the home directory? putenv("ORACLE_SID=SID");
$connection = ora_logon ("user", "pass") or die("No Connection");
I really donВ’t know why I cant connect, in the SQL Plus I cant connect just by typing the user, password, and Host.
Please TELL ME!
Any help would be appreciated.
Roberto RamГrez
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 7 answers | Add comment |
Friday, 6 July 2007
|
| creating files?? Aidal 11:37:28 |
| | Hi NG.
I'm having problems creating files at a certain location. If I attemt to create a file it gets created in the rootdir (htdocs) even though I add a path infront of the file name. I've tried severel ways of adding a path (with "/" and "\\") but nothing works.
eksample: "/nef/articles/54.txt"
File 54.txt gets created but not at the intented location, instead it gets created in htdocs.
Can anyone help me by telling me how I'm suppose to do this? I'm running PHP on Win98 with Apache.
~ Aidal
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 1 answer | Add comment |
Thursday, 28 June 2007
|
| call a website from a php script Christian Tischler 10:00:09 |
| | can anybody tell me please how to "call" a website from a php script.
meaning if (something happens) {goto www.google.com} else {goto www.yahoo.com}
tanks,
christian
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 3 answer | Add comment |
Friday, 15 June 2007
|
| List Problems Curt Zirzow 23:54:36 |
| | Any body else getting a message back with subject like: [ERR] Re: [PHP] subject of message.
With contents:
Transmit Report:
To: ftbsm@hanmir.com, 402 Local User Inbox Full (ftbsm@hanmir.com)
I tried contacting the list admin and posted a message here ealier this weekend about fixing this (ie unsubing him.)
Or am I the only one getting these bounced mail messages, meanwhile I'll just filter all the mail to /dev/null
Curt -- :0 * Return-Path: .*postmaster@hanmir.com.* /dev/null
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 9 answers | Add comment |
Wednesday, 13 June 2007
|
| browscap.ini Stefan Rusterholz 09:59:57 |
| | Hi
Has anyone got an up to date browscap.ini-file or does someone know where to get one? The most up to date browscap I found got it's last update in October 9, 2001 - since then a lot new browser appeared...
best regards Stefan Rusterholz
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 16 answers | Add comment |
Thursday, 7 June 2007
|
| looping problem? Jas 18:33:00 |
| | Problem with looping over a CSV file (3 results for each line)? Here is the CSV file contents...
MTPC-01,00:02:B3:A2:9D:ED,155.97.15.11 MTPC-02,00:02:B3:A2:B6:F4,155.97.15.12 MTPC-03,00:02:B3:A2:A1:A7,155.97.15.13 MTPC-04,00:02:B3:A2:07:F2,155.97.15.14 MTPC-05,00:02:B3:A2:B8:4D,155.97.15.15
Here is the script... <?php $row = 1; $file = "fa.csv"; $id = fopen("$file","r"); while($data = fgetcsv($id,100,",")) { $num = count($data); $row++; for($c = 0; $c < $num; $c++) { echo "host $data[0] {<br />\nhardware ethernet $data[1];<br />\nfixed-address $data[2];<br />\n}<br />\n"; } } fclose($id); ?>
And this is the output... (notice 3 results for the first line in the CSV file)
host MTPC-01 { hardware ethernet 00:02:B3:A2:9D:ED; fixed-address 155.97.15.11; } host MTPC-01 { hardware ethernet 00:02:B3:A2:9D:ED; fixed-address 155.97.15.11; } host MTPC-01 { hardware ethernet 00:02:B3:A2:9D:ED; fixed-address 155.97.15.11; }
Any help is appreciated... Jas
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 16 answers | Add comment |
Tuesday, 5 June 2007
|
| Web Spider in PHP Arijit Chaudhuri 19:37:02 |
| | Hi all,
I am looking for pointers, code samples etc to build a web spider using php. Any idea where I can get some good help?
Regards, Arijit Chaudhuri
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 1 answer | Add comment |
Thursday, 31 May 2007
|
| Shopping Cart Wendell Frohwein 08:18:15 |
| | Hello everyone. Just want to thank you for all the help you have provided me in the past. I have a new task that I am trying to tackle, but have come into a snag. I am building a customized shopping cart for auto accessories. I have gotten about 90% of the cart worked out except for the search feature. It is not a textual search. It is a vehicle specific search. When products are added to the cart, all the standard information is there along with the vehicle make, model, and year. Example: Honda Civic Si 1999. So this sounds like a peace of cake, as I would think. But in the customized car industry, some products fit on multiple cars. Example: DC Sport 4-1 Header AHS6607s fits all 92-93 Acura Integra's, but also fits 94-99 Acura Integra's GSR Only. When adding a product. I have this option that says, "Select Vehicle Make, Model, and Year". Option for newly created product says, "Not Selected". So they click to add and a window opens that allows you to pick these choices from drop down menus. So for the above examples, you would choose: Make Drop Down: Acura Model Drop Down: Integra Year Text Field: 92-93 Then you click add vehicle to this product. That window stays open and allows you to put another entry for the current product. Make Drop Down: Acura Model Drop Down: Integra Year Text Field: 94-99 Once again, click add vehicle to this product. So all this goes into a table that I called cart_search. Here is the table layout for the cart_search table: CREATE TABLE `cart_search` ( `id` INT( 20 ) NOT NULL AUTO_INCREMENT , `pid` INT( 20 ) NOT NULL , `make` INT( 20 ) NOT NULL , `model` INT( 20 ) NOT NULL , `year` INT( 4 ) NOT NULL , PRIMARY KEY ( `id` ) ); For the above examples, the following rows would be added: (forgive my crappy hand coded mysql output) | id | pid | make | model | year | 1 1234 1 1 1992 2 1234 1 1 1993 3 1234 1 1 1994 4 1234 1 1 1995 5 1234 1 1 1996 6 1234 1 1 1997 7 1234 1 1 1998 8 1234 1 1 1999 in the cart_makes table the id that corresponds with Acura would be 1 in the cart_models table the id that corresponds with Integra would be 1 This is the reason for the 1's in the above simulated mysql output. When that is all done, the window is closed and you are back at the add product page. Click Add Product button at the bottom. A new row is inserted to cart_products and the id row is retrieved with mysql_insert_id(). Then all the cart_search rows that have 1243 as the pid would be set to the respective product id that was retrieved by mysql_insert_id() So now you are a potential customer on the website wishing to search for some products for your 93 acura integra. You go to the search page and select Acura from drop down 1, page refresh's and the model dropdown is populated with all Acura models, you select Integra as the model, Page refreshes again populating the Year drop down with a list of years, You choose 1993. Hit the search button and mysql does a query to the db as so: $query=mysql_query("SELECT * FROM cart_search WHERE make='{$_POST["make"]}' AND model='{$_POST["model"]}' AND year='{$_POST["year"]}'"); If the database was only populated with the entry's from above, It would then return 1 result with a product id for that dc sports header we added. So after all this, I supposed it works. But not like it should, Cause I have no idea how to sort it, and to top it off, this just seems like a really long process just to search a database for some products that match specified make, model and years. Incase you are wondering the search page would return about 3 columns. Product Description, Catalog Number, and Price. It would be pulling all this information out of the cart_products table by its product id number that was returned by the mysql_query above. So I am sorry if this seems like a novel to anyone. I just really believe that there is an easier method to doing all of this. Any help that someone can provide me would be greatly appreciated. I was looking at a lot of websites on the net that sale car accessories and no one really has a search that is this detailed. Most of them are static html pages created by hand. This business has way to many products to make hundreds of static pages like that. So thank you in advanced, and I hope someone could lend a hand. -Wendell Frohwein
|
| | 40 answers | Add comment |
|
| Dynamic extension problem (php 4.1.2) BГҐrd Tommy Nilsen 07:21:54 |
| |
I want to use php_openssl.dll on an windows os with IIS.
The system "halt" when uncommenting the ;extension=php_openssl.dll
In my php.ini it says:
extension_dir = c:\php
And the exension is there : c:\php\php_openssl.dll
Have anyone any idea what could be wrong ??
Regards BГҐrd Tommy Nilsen
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 2 answer | Add comment |
Friday, 18 May 2007
|
| new iconv functions Moriyoshi Koizumi 17:52:23 |
| | Hi,
I've just committed a patch which I mentioned in the previous mail.
http://news.php.net/article.php?group=php.dev&article=92027
But I'm not sure if the function naming really conforms to the standard. If it annoys you, please let me know.
Regards, Moriyoshi
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 1 answer | Add comment |
|
| Quick SQL Question Vernon 13:33:44 |
| | I'm using the "ORDER BY RAND() LIMIT 0,1" to give be a random record from a recordset but it seems like it puts a real heavy load on the server. Is there a better way to pull a random record from a database?
Thanks
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 14 answers | Add comment |
Thursday, 17 May 2007
|
| What is this?? Miguel Brбs 12:17:00 |
| | Hi guys,
I was doing a script to insert data on a table, and the following message appeared me when testing the form for data insertion: Column count doesn't match value count at row 1
I lsaw the PHP manual and some other resources that I have, but couldn't find anything about it...
Any hint from someone??
Cheers Miguel
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 35 answers | Add comment |
|
| Math question Tom Ray 01:34:48 |
| | I'm working on a little shopping cart script and when I get to the checkout portion I show what is in the cart and for each item I show the quanity, price per unit then I show the total cost for that item. So basically it looks like $total = $qty * $price My question is how do I add the value of $total to give the over total of the order? Since there may be one or more different items in the cart I can't seem to pin down the math that will allow for the changing amount of items in the cart. since there may be just one $total variable or 5.
I hope I'm clear enough on this, any ideas or thoughts would be welcome and appreciated.
Thanks!
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 3 answer | Add comment |
Tuesday, 8 May 2007
|
| HTTP or HTTPS Alexander Weber 18:25:45 |
| | Hi!
anybody knows how to find out the connection type (http or httpS)? Tried out $HTTP_SERVER_VARS.
Thanx a lot!
Alex
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 15 answers | Add comment |
|
| Progress Bar Craig Gardner 11:59:03 |
| | I'm working on a script that will automatically download and burn an ISO to a CD, when passed the filename of the ISO and I want to use some sort of progress bar to show how much of the download/burn is complete. I was originally going to use wget to download the file, but I don't know how to get the progress of the download. Before the script processes, I have the filename and filesize. Does anyone know of a way to get the file to download and give me the percentage of the file downloaded or even the filesize of the local copy every couple seconds or so?
Thanks, Craig
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 10 answers | Add comment |
Sunday, 6 May 2007
|
| sessions and global register Pat Johnston 15:48:41 |
| | Hi I've been learning to get through sessions as it appears to be the hardest part of PHP I've come across.
I found that includes must be stated underneath that of a session_start() for example otherwise a warning will appear that it can't start a session because a header has already been sent (or something to that effect).
But a new warning has arose where it is suggesting something, but please note that the code actually executed okay. So, I want to clarify it's meaning and is it safe to just turn of the warning(session.bug_compat_warn ) and do nothing else? (I'm using v 4.3)
Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
Regards, Pat
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 2 answer | Add comment |
|
|