|
-
recurrent question
Date: 03/28/05
(Web Development) Keywords: php, mysql, sql, web
i'm looking for a good webhost company to host my website. what are your recomendations?
my needs are pretty standard.
- php (5 would be nice) - mysql - ftp - email - subdomains - +200mbs space - +20gbs bandwith - CPanel, URCHIN statistics are a plus - if possible, ssh access. :)
so far, and based on my past experience, i'm set on using eyow.com. but i want to hear what you guys recommend.
(sorry if there is a list somewhere of recommended webhosts. i've searched the lj communities and nothing has come up.)
crossposted to webdev , php , mysql
Source: http://www.livejournal.com/community/webdev/183770.html
-
Memory management in PHP
Date: 03/28/05
(PHP Community) Keywords: php
I have a question regarding memory management in PHP. I have not been able to find my answer in the documentation at php.net, in books, or searching on the Internet.
My question is simple: how is memory management handled in PHP? Is there garbage collection? Are we supposed to explicitly handle freeing of memory? Or is it neither, and it's just assumed that scripts are small and all memory is freed upon completion of the script? The latter case would seem to be a dangerous assumption should someone write a complex PHP program, but practically speaking it's probably fine for how PHP is generally used.
I did read one reference that implied that unset() would remove the variable/object from memory, but I also saw a user comment that implied that it didn't actually free the memory. The documentation at php.net doesn't seem to say one way or the other.
Practically, the answer to this question isn't going to impact what I'm doing. As long as the memory is freed at the completion of the script, I'll be fine. But I'm curious what the answer to this question is and I can't find the answer after having done due diligence. Can anyone help? Thanks!
Source: http://www.livejournal.com/community/php/278091.html
-
Selling PDFs
Date: 03/29/05
(Web Development) Keywords: php, security, google, shopping
I've got a client who wants to sell prepared legal forms online in PDF format. I have a site model in PHP, an extremely simple shopping cart through PayPal, and Acrobat 5 professional. I've never done it before, and I'd really not like to go into this blind. Google hasn't pulled up anything in the way of specific tutorials. There are only three relatively small files that need to be sold.
It'd be easy enough to, say, redirect the user upon payment or e-mail the link to a document, but this also necessitates changing the link to the document with every download so it doesn't get shared. I know PHP has PDF generation and temp file capacities, but I've never worked with them. We were also looking into PDF security, but I also have no experience with this.
Anyway, I'd like any tips you might have on the matter.
Source: http://www.livejournal.com/community/webdev/184170.html
-
PEAR question
Date: 03/29/05
(PHP Community) Keywords: php, html, web
I can't seem to use any of the PHP PEAR packages except DB. Everytime I try to include the necessary include file, it tells me it can't find it. It doesn't seem to have any trouble finding DB.php though. I'm really confused.
array("Stig", "Bakken"),
"1" => array("Martin", "Jansen"),
"2" => array("Alexander", "Merz")
);
$tpl = new HTML_Template_IT("./templates");
$tpl->loadTemplatefile("main.tpl.htm", true, true);
foreach($data as $name) {
foreach($name as $cell) {
// Assign data to the inner block
$tpl->setCurrentBlock("cell") ;
$tpl->setVariable("DATA", $cell) ;
$tpl->parseCurrentBlock("cell") ;
}
// Assign data and the inner block to the
// outer block
$tpl->setCurrentBlock("row") ;
$tpl->parseCurrentBlock("row") ;
}
// print the output
$tpl->show();
?>
Obviously, this was cribbed from the PEAR website example. Can anyone tell me what I'm doing wrong? I keep getting this error:
Warning: main(HTML/Template/IT.php): failed to open stream: No such file or directory in /home/fiona/vrp/fitp/template_test.php on line 2
Fatal error: main(): Failed opening required 'HTML/Template/IT.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/fiona/vrp/fitp/template_test.php on line 2
Edit:
Haha, I'm a dork. I didn't realise that "pear rl" listed all the remote packages available, not the ones that are actually installed on the system. Turns out the package I wanted wasn't installed anyway.
Feh. Thanks for your help guys.
Source: http://www.livejournal.com/community/php/278925.html
-
sad question for the brainy peeps ~
Date: 03/30/05
(MySQL Communtiy) Keywords: php, mysql, database, sql
hi all ~ i have a vB board out there in cyberland and it's got a "random quote" hack (the UQH by kurafire) ~
anyway, after three years of smooth sailing, it recently developed some kvetchy sickness and i can't figure out the problem.
this is the error message: Database error in vBulletin 2.3.0:
Invalid SQL: SELECT * FROM quotes WHERE 1=1 AND mod!='N' ORDER BY letter,name ASC LIMIT 0,30 mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '!='N' ORDER BY letter,name ASC
mysql error number: 1064
Date: Tuesday 29th of March 2005 07:20:54 PM Script: http://www.lookingland.com/board/board/quotelist.php?s=
where it says "script" ~ that URL is completely wrong and i'm not sure where it's trying to call it from ~ (don't know if that's part of the problem? is that in a template?)
anyway, i'm a complete dummitz about mysql ~ do you think i should just delete the table and rehack the whole thing? (please say no ~ hahahahaha) ~
anyway, sorry if this is obnoxious. any hints would be very much appreciated.
: o (
Source: http://www.livejournal.com/community/mysql/53159.html
-
Timed Process
Date: 03/30/05
(PHP Development) Keywords: php, rss
I have a script that will read and store in my DB a number of RSS feeds. Right now, I have to click a button to perform this process. I'd like to have the code run at a fixed interval on its own, perhaps every 30 minutes.
Is there a method for creating a timed process out of a PHP script, so that it will run automatically at specific intervals?
(I'm using shared server space, with the .bash files. Not a huge Unix guru, but can get by with some direction.)
Source: http://www.livejournal.com/community/php_dev/53608.html
-
The perfect text editor?
Date: 03/31/05
(WebDesign) Keywords: php, java
I've been doing some looking in the last few days for a good text editor that's sufficiently customizable and feature-rich to leave me wanting for nothing. After downloading several programs, I found jEdit.
I was initially wary about it being written in Java, but it's really fairly stable on win98 SE and while it doesn't load terribly fast, it performs well after that. In addition to the features expected of a good editor like syntax highlighting, regex searching, code folding, split view and macros, jEdit has a large community backing it and as such is extensible to provide for most any need: multiple ways of dealing with several open documents (stackable tabs, docked window, buttons, even), FTP plugin, clip system, PHP parser and two different spell-checkers.
Hell, with the right plugins it'll even work as a hex editor. I've gone ahead and taken a screen shot for good measure: http://www.contemptible.org/smack/jedit.jpg
Source: http://www.livejournal.com/community/webdesign/844348.html
-
Open source bundling
Date: 03/31/05
(Open Source) Keywords: php, mysql, database, sql, web, apache
Open source bundling is the new trend. Martin Lamonica's story yesterday about SourceLabs describes one such bundles. Most are aimed at businesses. Many, like the SourceLabs bundle, are AMP Stacks, with the Apache Web Server, MySQL database, and PHP scripting tools. The idea is for a company to give ...
Source: http://blogs.zdnet.com/open-source/index.php?p=215&part=rss&tag=feed&subj=zdblog
-
Probably a stupid question. . .
Date: 04/05/05
(WebDesign) Keywords: php, css
I have a question that I've been dying to know forever. How do you make a site like this, where the header pic/links stay stationary at the top, and the content appears below it without the header pic/links refreshing? I know it can't be a frameset, because the entire page will automatically scroll down, not just the frame in which the content overflows. I'm also pretty sure it's not iframe.
If someone could tell me how this is done and/or point me in the direction of a tutorial that could, I would be eternally grateful.
ETA: Erm, I think I phrased my question a bit wrong. I don't want the header/links to always remain at the top of the screen, like a floating menu or anything like that. What I meant was more of how I can divide the layout into two main portions, where the top portion (the image map or what have you) never reloads, but the bottom portion displays the content? Essentially like a frameset, but without the dozens of setbacks that a frameset has? Is this all just a matter of laying it out in CSS properly, or is the some behind-the-scenes PHP work going on as well? Sorry for the confusion.
Source: http://www.livejournal.com/community/webdesign/846047.html
-
PHP: Simple FAQ Script
Date: 04/06/05
(Web Development) Keywords: php, mysql, sql
Hello Yesterday I started work on a small FAQ or help system, made with PHP, mod_rewrite, and MySQL I really just starting to learn MySQL and I thought that this would be a good place to start. I have not started on the Style yet,
Demo: http://lj.funvill.com/help/ Source: http://lj.funvill.com/help/source/
Tell me what you think. Anything suggestions comments?
Source: http://www.livejournal.com/community/webdev/186580.html
-
php and the nntp protocol
Date: 04/07/05
(PHP Community) Keywords: php, web
so i'm studying ways to implement a web interface with an nntp server, aka newsgroups server.
I've tried the low-level way, opening a socket and fwrite-ing the commands and fget-ing the results.
the thing is, i don't know why, but when the server sends me the list of all the newsgroups available, or the numbers of the msgs in a newsgroup i never get the entire reply! let's say there's 100 newsgroups. I only get 40 or something. It seems like the buffer can't hold that ammount of bytes or something.
Another way to do it, is using the imap functions. I've tried. imap_open, ok. but then i can't figure out how to list the msgs on a newsgroup. i've tried almost every imap function that makes sense, with no avail.
So, bottom line, if there's anyone who has worked with anything like this and would like to point me in the right direction, i'd be most thankful.
i'm putting the code behind a cut.
list_groups.php
Connection failed. \n";
} else {
echo "Connected. ";
$cmd = "mode reader\r\n";
fwrite( $conn, $cmd );
$lista .= fgets( $conn, 128 );
$lista .= " ";
$cmd = "authinfo user $user\r\n";
fwrite( $conn, $cmd );
$lista .= fgets( $conn, 128 );
$lista .= " ";
$cmd = "authinfo pass $passwd\r\n";
fwrite( $conn, $cmd );
$lista .= fgets( $conn, 128 );
echo "Authenticated. ";
$lista .= " ";
$cmd = "list\r\n";
fwrite( $conn, $cmd );
$lista .= fgets( $conn, 128 );
$lista .= " ";
$lista .= fgets( $conn, 256 );
$lista .= "newsgroups list";
$alllist = "";
$alllist .= fread( $conn, 20480 );
// couldn't work with: while( !feof ( $conn ) ) because it never
// reaches the end of file, because i can't get the whole stream :(
$newsgroups = explode("\n", $alllist );
$final_list = Array();
foreach( $newsgroups as $newsgroup ) {
$raw = explode( " ", $newsgroup );
$title = $raw[0];
$num_posts = (int) $raw[1];
$dados = Array( "title" => $title,
"num_posts" => $num_posts );
array_push( $final_list, $dados );
}
echo "";
fclose( $conn );
}
?>
if you want more, ask. but if you could help me with this example, i'd be set.
like i said, i get 48 newsgroups despite the server giving me over 100. (i've tried using telnet and it works, but through php, nothing)
what am i doing wrong? :-\
Source: http://www.livejournal.com/community/php/281112.html
-
An Introduction of Sorts...
Date: 04/07/05
(PHP Community) Keywords: php, software, web
Hi all,
I'm very new to LiveJournal, so this post is just intended to introduce myself to this community and to make myself available to help others should they so wish.
In the daytime I'm a professional software and website developer, working for a systems integrator on big corporate projects. In my spare time I pick at a number of open source projects that are available via my homepage. I guess I tend to do the open source stuff because it's giving something back to the internet community that we all take so much from.
Recently I've been working on a content management system, although I have to admit that it's taken a bit of a back seat recently - probably something to do with Gran Turismo 4 turning up :)
Anyway - if anybody needs help with a PHP project, I'm here. I'm usually online all day in the UK (GMT) via the various means listed on my userinfo page on LiveJournal so feel free to give me a shout.
Source: http://www.livejournal.com/community/php/281061.html
-
Oh no! A message board question!
Date: 04/07/05
(WebDesign) Keywords: php, security, web
Ok, let me start off by saying that I did go back about a month looking through posts to see if this had been discussed recently. Also, there are no community memories to check. So I feel that I've done my best to look before I post. Also, I understand that the "these forums are the best" debate will go on forever and that it's impossible to get an unbiased answer. That's why I just want opinions.
I'm looking for a nice, simple message board package for a client's website. The only feature I absolutely need is the ability to attach files. I don't want anything bloated or full of security holes, and I don't want anything that's not free. So no phpBB, no vBulleting, no Invision PB, etc.
There are three that I am looking at right now: PunBB MyBB SMF
Now, PunBB would be my first choice since it is really simple, trimmed down, and looks nice. However, the File Attachment mod for the newest version isn't done yet.
So I'm looking for opinions on the other two. Anybody use either of them and have good/bad things to say? Also, are there other, better free message boards out there that I'm missing?
Source: http://www.livejournal.com/community/webdesign/848765.html
-
PHP, mod_rewrite and header() - This is a good one.
Date: 04/08/05
(PHP Community) Keywords: php, browser, css, html, web, apache
I'm trying to use mod_rewrite to intercept all requests made to my web server and route them to a php file (index.php) which then parses the request and does what it can to serve the appropriate page. I'm doing this in an effort to use meaningful URLS as opposed to query strings.
I have everything about half-working but I can't send headers from index.php, which is important because not only do I need to be able to generate 404 errors, but the files that will be included by index.php need to set their own headers (content-type, content-language).
These are the lines I'm using in .htaccess for mod_rewrite:
RewriteEngine on
RewriteRule index.php$ - [L]
RewriteRule !\.(jpg|gif|css)$ /index.php [L] And this is the code I'm using in index.php that's causing a problem:
if ($url_array[0] == 'poems') { // POEMS SUBDIRECTORY
require('lists.php'); // GET LISTS
$get = 'poems';
if (array_search($url_array[1], $poem_list)) {
$which = $url_array[1];
include('get.php');
}
else {
if (!headers_sent()) {
header('HTTP/1.1 404 Not Found');
}
}
}
else {
if (!headers_sent()) {
header('HTTP/1.1 404 Not Found');
}
} As you can see, I'm checking to see if headers have been sent before trying to set them, but they don't seem to have been. Whenever I try to set a status header with the syntax HTTP/1.1 XXX (description) an internal server error occurs. I have been able to set status using the header Status: 404, but rather than the standard 404 error page appearing a blank HTML document is served to the browser.
Apache version is 1.3.19 running on Windows 98. PHP version is 4.2.3 running as a cgi.
Any help would be much appreciated, I'm pretty far out of my depth with changing the way Apache works.
Source: http://www.livejournal.com/community/php/281753.html
-
ImageAntiAlias()
Date: 04/09/05
(PHP Community) Keywords: php
I am using the GD library bundled with PHP 4.3.11 to create filled arcs on the fly. I'd like for the arcs to appear decent by using anti aliasing, but though I include "imageantialias($i, true);," it doesn't appear to be working. Hopefully you all can help me out as there is virtually zero information on this function. Thanks.
Source: http://www.livejournal.com/community/php/282465.html
-
Permissions, FTP, and PHP Users
Date: 04/10/05
(PHP Community) Keywords: php
Hi all,
a friend and I are currently creating a content managment system for distribution, and Im running into a problem when it comes to installing it on other hosts.
Basically, here is the issue:
When I install the script and run it on my host, the FTP user is the same as the user running PHP. However, when I install it on other hosts, the FTP user is different than the PHP user. The PHP user, as typical, is "nobody", and of course, has limited writing capabilities.
Now, creating the folders via PHP is not really doable with the script, but is there another way around it?
Changing the main folder permissions in FTP to 777 is possible before the script runs, but this only changes the top level directory permissions. All the subfolders I need to write to arent changed as well.
Is there some way to around this issue?
Thanks in advance :)
Source: http://www.livejournal.com/community/php/283074.html
-
PHP Post
Date: 04/11/05
(PHP Community) Keywords: php
Did anything change in PHP version? I'm using PHP Version 4.3.10-10
I am passing information for the PHP post by using:
<form action="contactuser1.php?name=<? print "$name"; ?>" method="GET"> Name:<INPUT NAME="name" size="60"> <INPUT TYPE=submit Value="Send"> <INPUT TYPE=RESET>
It used to work before, but not anymore. When I pressed the submit button, the information doesn't appear on the next page.
Did something change? I've had a look at the php changelog and didn't find anything obvious. Please kick me and point me the mistake.
Thanks
Source: http://www.livejournal.com/community/php/283247.html
-
Forms that email - help?
Date: 04/12/05
(PHP Community) Keywords: php, web
Hey there.
I was trying to figure out how to make a specific type of form for my website. With this kind of form, when you click on 'submit', the data gets sent to me via email, and the page you filled in the form on, changes to another page (something like 'thank you for filling out the form!', etc).
So far, the only forms I've managed to figure out that send data to me via email doesn't do so as smoothly as the one I want. Instead, a prompt comes up to okay sending the data via email, and then the default email program loads, and then it gets sent that way (that was a rather convoluted description, wasn't it? sorry about that, hope it makes sense...).
Anyway, here's an example of the kind of form I'd like to be able to make (scroll to the bottom): http://www.wolverineandrogue.com/fic/dbfiction.php?fiction_id=241
If you want to test it out, it's configured to send to me, so I don't mind. I just can't figure out how to make something that functions in a similar way, so I'd really appreciate any help anyone can offer me.
Also, does anyone know if Geocities allows PHP? Thank you!
Source: http://www.livejournal.com/community/php/284115.html
-
email attachments in php mail forms ...
Date: 04/14/05
(PHP Community) Keywords: php, virus, web
Is it possible to have a visitor to my website send me an attachment using PHP?
I am working on an idea from my website which would require anonymity from my intended visitors. I want them to be able to send me a small image file, without having to use their email address and therefore remain unknown.
Is this do-able? If it is ... can I specify which kind of files can not be attached (and bypass any gits who try and send viruses)?
If it can't be done, I might have to use http://www.yousendit.com/ whichh seems to be anonymous for the sender.
*edited note* as it is when I get an email form sent via my site, it comes back with the email address "tehsheepie@pro18.abac.com" because I don't ask people to specify - I think it just grabs this from my site somehow. I'm not smart enough to know the how, or why, but I know that is always the email address used when I get my forms back.
Source: http://www.livejournal.com/community/php/284941.html
-
hey guys
Date: 04/14/05
(Web Development) Keywords: php, web
I'm new. Have a few classes left at school. Working full time as a graphic artist/web designer.
Have a question for you guys...
Anyone know how to do this??? http://www.boatlettering.net/boatlettering/BoatLetteringPreviewForm.php
My boss wants me to create something extremely similar except with our fonts and effects...
Source: http://www.livejournal.com/community/webdev/188979.html
|