|
-
galleries!
Date: 03/10/05
(Web Development) Keywords: php, mysql, sql, java, web
so, my quest for the perfect gallery continues. my question to you all is this: what gallery applications do you use and what do you think of them? I prefer php and no need for mysql, but I'm open to other options. the only thing I'm adamant about is not using javascript. ;)
x-posted to webdesign and webdev.
Source: http://www.livejournal.com/community/webdev/179032.html
-
Thunderbird extensions problem
Date: 03/10/05
(Mozilla) Keywords: php, html
A friend of mine tried installing extensions on Thunderbird and told me he couldn't. Naturally, I thought he wasn't following the directions, so I was going to walk him through.
The directions - on the official extensions site for Thunderbird - say this:
Extension Install Instructions for Thunderbird Users: (1) Right-Click the link above and choose "Save Link As..." to Download and save the file to your hard disk. (2) In Mozilla Thunderbird, open the extension manager (Tools Menu/Extensions) (3) Click the Install button, and locate/select the file you downloaded and click "OK"
However, when right clicking as directed, and choosing "Save Link As...", also as directed, it tries to download and save 'install.php.html', and not the extension! What's the proper method, and why the hell do they have instructions that don't work on the official site?
Source: http://www.livejournal.com/community/mozilla/259871.html
-
Apache2 in chroot jail, sigfaulting child process
Date: 03/11/05
(Apache) Keywords: php, linux, apache
I upgraded apache from 2.0.52 to 2.0.53 in my chroot jail, on linux.
it took forever to start, and then segfaulted the child processes whenever I hit the server.
I eventually tracked the startup delay to an insufficient quantity of entropy for /dev/random. I gave it a lot more entropy and it still blocked occasionaly, so I moved to /dev/urandom.
I moved ldd and strace into the jail to double check things. I do not appear to be missing any libraries. I ran strace. I ran it with a bunch of different flags, I end up with child process straces that look just fine, a couple errors that are expected due to the jail, then, BAM, SIGSEGV, with no warning or explaination.
It doesn't segfault if I remove -D PHP5 and -D SSL... but again, I don't seem to be missing any libraries.
child process stack trace:
getpid() = 16013 rt_sigaction(SIGHUP, {0xb7ca7dc0, [], SA_INTERRUPT}, {0xb7ca7dc0, [HUP USR1], 0}, 8) = 0 rt_sigaction(SIGTERM, {0xb7ca7dc0, [], SA_INTERRUPT}, {0xb7ca7dc0, [], 0}, 8) = 0 rt_sigaction(SIGUSR1, {SIG_IGN}, {0xb7ca7dc0, [HUP USR1], 0}, 8) = 0 getpid() = 16013 getpid() = 16013 geteuid32() = 0 setgid32(81) = 0 open("/proc/sys/kernel/ngroups_max", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/group", O_RDONLY) = 13 fcntl64(13, F_GETFD) = 0 fcntl64(13, F_SETFD, FD_CLOEXEC) = 0 fstat64(13, {st_mode=S_IFREG|0644, st_size=13, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fea000 _llseek(13, 0, [0], SEEK_CUR) = 0 read(13, "apache:x:81:\n", 4096) = 13 read(13, "", 4096) = 0 close(13) = 0 munmap(0xb7fea000, 4096) = 0 setgroups32(1, [81]) = 0 geteuid32() = 0 setuid32(81) = 0 getpid() = 16013 gettimeofday({1110440023, 141397}, NULL) = 0 getpid() = 16013 brk(0x82f8000) = 0x82f8000 getpid() = 16013 time(NULL) = 1110440023 gettimeofday({1110440023, 142945}, NULL) = 0 gettimeofday({1110440023, 143359}, NULL) = 0 semop(3014687, 0xb7d866ec, 1) = 0 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN, revents=POLLIN}], 2, -1) = 1 accept(3, {sa_family=AF_INET, sin_port=htons(1467), sin_addr=inet_addr("xx.xx.xx.xx")}, [16]) = 13 semop(3014687, 0xb7d866f2, 1) = 0 gettimeofday({1110440031, 271384}, NULL) = 0 getsockname(13, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("xx.xx.xx.xx")}, [16]) = 0 time(NULL) = 1110440031 gettimeofday({1110440031, 272605}, NULL) = 0 fcntl64(13, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(13, F_SETFL, O_RDWR|O_NONBLOCK) = 0 time(NULL) = 1110440031 read(13, 0x82f49d8, 8000) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=13, events=POLLIN, revents=POLLIN}], 1, 300000) = 1 read(13, "\200g\1\3\0\0N\0\0\0\20\1\0\200\3\0\200\7\0\300\6\0@\2"..., 8000) = 105 --- SIGSEGV (Segmentation fault) @ 0 (0) --- chdir("/usr/lib/apache2") = 0 rt_sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}, 8) = 0 getpid() = 16013 getpid() = 16013 kill(16013, SIGSEGV) = 0 sigreturn() = ? (mask now [RTMIN]) --- SIGSEGV (Segmentation fault) @ 0 (0) ---
Maybe I'm missing something?
Source: http://www.livejournal.com/community/apache/17724.html
-
php4 class extending and shared variables
Date: 03/11/05
(PHP Community) Keywords: php, mysql, database, sql
I have a base class in which I'd like to extend. The thing is, the base class connects to a database. How can I make it so any classes I extend from base class will share the one connection to the database and not make a duplicate connection for each object i make?
example:
class base {
var $connection;
function base(){
$this->connection = mysql_connection("server","user","password");
mysql_select_db("database",$this->connection);
}
function exec($query){
return mysql_query($query,$this->connection);
}
}
class child extends base {
var $foo;
var $bar;
function child(){
$this->foo = mysql_result($this->exec("select foo from foobar"),0);
}
}
I'd like it so no matter how many objects i make of the child class, they all share the same database connection. I think in PHP5 you can do something like "shared $connection" but i'm using php4.
tia
-ryan
Source: http://www.livejournal.com/community/php/271677.html
-
Running php 5.x on windows using tomcat 4.x or 5.x
Date: 12/11/04
(Java Web) Keywords: php, web
Using php 5.x is not documented in the manual, there are lots of questions with few answers, redundant hints etc. Even php 4.x users will benefit from this as it shows how to enable php only in a single web application, instead of all web applications as all the existing docs state. Enjoy!
Source: http://blog.taragana.com/index.php/archive/running-php-5x-on-windows-using-tomcat-4x-or-5x/
-
Relevancy and Context in Web Pages with CSS2 and PHP
Date: 03/12/05
(Web Development) Keywords: php, browser, css, html, sql, web
Hi all. This will be my first post to the community, so before anything I'd just like to say how educational its been reading your posts all this time. Now then, here's my contribution.
I've recently been playing with what I think is an interesting technique for adding relevancy and context to my pages. Basically, I embed a small, invisible message within the HTML of a page or within the link to that page which is only visible to people who follow special links. This enables me to embed certain so-called "relevancy messages" on the destination page of a link that helps keep visitors oriented when browsing through my site. (This is exceptionally beneficial when back-linking to old blog posts!)
A much more detailed explanation of what I'm talking about is on my site. A brief explanation of what I first did is this:
- When I write links that reference my old pages, I go back to those old pages and insert a named anchor (or tag the element with an id to reference in my link with a fragment identifier).
- I add a title to that element so I can hide it within the HTML for visitors who browse normally, but show it to visitors who follow links to that fragment.
- I've added a style rule in my pages to display that title text before the fragment only for visitors who follow the special links, specifically,
*:target::before { content: attr(title); }
(See an example in action on my test pages.)
This means when visitors click on a link to a fragment within a page, they see a clear, short message explaining its relevance. Especially on long pages where my link only references a small part of it, this is an enormous enhancement to usability because it ensures a smooth transition of context between one page and the next. Coupled with helpful title text on the source link itself, it can help create an extremely smooth yet still unobtrusive browsing experience.
As an extension and major enhancement, I've also been experimenting with "dynamic relevancy messages" as a sort of mini-API to allow anyone to include their own relevancy message into my pages when they link to me. The crux of this technique uses a variable within a GET query-string to plug into the above CSS content-before rule.
So what do you think about this technique? Useless? Great? Superfluous? All feedback welcome.
I'd be especially interested to hear from web accessibility gurus who can test the accessibility of this technique and PHP gurus who can help break my site by using XSS attacks for the dynamically generated CSS rule. As I'm somewhat of a novice in that area (that is XSS in the context of CSS, since it's usually an HTML/SQL thing), I'd appreciate it if you can help me fortify my defenses against what is potentially a very obvious attack vector on my site now.
Thanks for your time. :)
(Oh yeah, and, um, you gotta use Firefox or another CSS2-compliant browser such as Safari, or a recent version of Netscape, or Mozilla in order for the CSS to work, obviously. It won't work with any version of Internet Explorer or Opera. Sorry.)
Source: http://www.livejournal.com/community/webdev/180840.html
-
Session Destroy
Date: 03/12/05
(PHP Community) Keywords: php
On my server, I seem to be unable to destroy sessions and I can't tell what's wrong with my php.ini file.
As I imagine it would help: My phpinfo page which has all the configuration settings and version numbers and wonderful stuff. Just do find for session and it will take you to the right section.
Any help is great.
Source: http://www.livejournal.com/community/php/272608.html
-
i have some questions
Date: 03/12/05
(PHP Community) Keywords: php, blogging, html, java, security, web
i'm building my own blogging system for my website, and i was interested in having a bit of security when it comes to code in the comments.
- disallow html code
- disallow javascript
- special tags (standard BBcode - [quote][url][img])
- keep it xhtml1.1 compliant
so, i have achieved the first 3 points, but i was wondering which php functions would you recommend for filtering the comments text?
plus, is there any way to garantee that the document keeps xhtml compliant?
(cross-posted to webdev and php)
Source: http://www.livejournal.com/community/php/272239.html
-
i have some questions
Date: 03/12/05
(Web Development) Keywords: php, blogging, html, java, security, web
i'm building my own blogging system for my website, and i was interested in having a bit of security when it comes to code in the comments.
- disallow html code
- disallow javascript
- special tags (standard BBcode - [quote][url][img])
- keep it xhtml1.1 compliant
so, i have achieved the first 3 points, but i was wondering which php functions would you recommend for filtering the comments text?
plus, is there any way to garantee that the document keeps xhtml compliant?
(cross-posted to webdev and php)
Source: http://www.livejournal.com/community/webdev/181116.html
-
3 Tier Web development and Code Generation
Date: 03/15/05
(Web Development) Keywords: php, mysql, html, database, sql, java, web
This is long so a cut tag...
So recently I’ve been working on some new stuff. In recent versions of Mozilla (including Firefox) there is now a SOAP client. This means that a web application can access the server at any time, and not just when the page loads. This means a huge amount of flexibility is now available to the developer in a DHTML application. I have been playing with this for several months and realized that a large amount of the code is very repetitive.
I am working on a application to build these applications. I have a DHTML page which lets you model your application. It pulls table and index definitions from a MySQL database, and then it lets you set up validation rules for each field, set up custom SQL queries (In addition to a number of automatically generated ones), set field labels, and change other things about the data model.
So far I can auto generate * DHTML Forms * Javascript glue for the forms * Javascript to wrap the soap functions into simple javascript methods. * PHP classes to access a mysql database * A wrapper to serve the PHP classes up as SOAP.
Still to do
* Data validation * Unit test frameworks * Installer scripts for a generated application
For more information see my wiki I plan to have the code on source forge (project “xulbuilder”) today or tomorrow
Source: http://www.livejournal.com/community/webdev/181661.html
-
Timestamping and datetime
Date: 03/15/05
(MySQL Communtiy) Keywords: php, mysql, database, sql
I'm working on a database table and am having trouble getting the dates added properly. I want two date fields, one to store the date the record was created, the other to store the date it was last modified. However, I can't figure out how to get the fields to hold anything but a bunch of zeros. I've tried TIMESTAMP and DATETIME and using the PHP time function and reading through the mysql.com documentation and am still in the dark. Any help would be appreciated.
Source: http://www.livejournal.com/community/mysql/50849.html
-
ack!
Date: 03/16/05
(HTML Help) Keywords: php, web
Ok I have a pretty simple problem I think. I can't remember the code for something. My webpage layout is similar to this one. http://www.kadeliah.com/greencandy/main.php I need to move my iframes around the site so that they fit into the green rectangles. I'm pretty sure that I need to use a div tag, but I'm lost at this point. [teacup]p
Source: http://www.livejournal.com/community/htmlhelp/1846637.html
-
PHP and J2EE: connection's pool
Date: 03/16/05
(PHP Community) Keywords: php, mysql, sql, java
Does anybody read about creating MySql connection's pool in PHP like in Java2EE. I have read a LOT about mysql_connect and mysql_pconnect but no one word about pools.
Source: http://www.livejournal.com/community/php/273139.html
-
Converting MYSQL timestamps?
Date: 03/16/05
(PHP Community) Keywords: php, mysql, database, sql
I have a timestamp in my MySQL database. I grab the information along with the other table information using a select, then want to display it in my PHP pages. However, everything I've tried turns up really funny displays. Is there a way in PHP to format MySQL timestamps?
Source: http://www.livejournal.com/community/php/273803.html
-
What a Day...
Date: 03/16/05
(PHP Community) Keywords: php, sql
Now, code I use all the time for news is creating a new entry correctly, but also creating a blank entry? Ideas?
Here is the code...
add_content.php confirm_content.php noc_news.sql
Source: http://www.livejournal.com/community/php/273592.html
-
displaying Japanese from mysql with php?
Date: 03/17/05
(PHP Community) Keywords: php, mysql, browser, database, sql, web
Hi, thanks in advance for any advice.
I am working on a website on my PC, and I don't know anything about servers but I wanted to develop locally, so I am using a WAMP package. I would like the site to be able to display database entries from mysql that are in Japanese, but when I call them I just see question marks instead of the Japanese (using various browsers and encoding options). I can, however, just echo Japanese text in the php file and it will display properly. Also, in phpmyadmin where I am creating the database the Japanese is displaying correctly.
I don't know if it's a problem with the server, mysql, or the script, so I don't even know where to start. I have tried it with the db, table and fields collated in both sjis_japanese_ci and utf8_unicode_ci, with the same results.
Does anyone know what the problem could be? Thanks!
Source: http://www.livejournal.com/community/php/274046.html
-
Do you want to learn Web Design?
Date: 03/17/05
(Web Development) Keywords: php, css, html, java, web
I'm teaching a one day course in Web Design in New York City on Saturday. All those who can attend are welcome to register for it. Basically I'm going over most of what's done in webdesign. I don't expect anyone to become an expert after this course, but I think a lot of very valuable info is here for webdesigners at all levels, even if someone has never designed a webpage before and has no idea how to do it. It's a very ambitious course that I've never seen attempted before.
For only $59 with pre-registration by March 15, this is a huge bargain at twice the price. ($69 for late registrants) To register, phone 212-643-7005, or e-mail education@nypc.org
Location: NYPC Offices, Suite 1560 in the Hotel New Yorker, 481 8th Avenue (34/35 Sts)
Class Description:
Web Xtreme: Webmastering Overview (For all levels) Web Xtreme (For all levels) This class removes the mystery from website development! A full day overview of the many, many options you have to create or enhance a website. Whether you have never tried to build a website or are a professional designer, there is something for everyone here. Learn what you can do and how to go about doing it. Among the topics to be covered are
* HTML * CSS * Javascript * PHP * Dreamweaver * Flash * Streaming Video * Graphic Options (Photoshop, Fireworks, Illustrator, etc.) * 3ds max * More...
Bring in any questions you may have about the web. If making a web page has confused you or you think you can do much more with the web, this course is for you.
Our terrific web guru Jeff Frankel will guide us. Jeff is an outstanding instructor, with a very clear presentation style. He regularly teaches Flash at NYPC, and you can see some of his sites at www.webbrooklyn.com
Read Comments Add a comment
Source: http://www.livejournal.com/community/webdev/182528.html
-
The sad plight of VB6 developers
Date: 03/17/05
(Open Source) Keywords: php, microsoft
Despite pleas from its developers, Microsoft is ending free support for Visual Basic 6 this month.For the open source community, this is no great loss. Actually, it's not even a blip on the radar -- open source developers will continue to chug along, writing code in Perl, Python, PHP, Ruby ...
Source: http://blogs.zdnet.com/open-source/index.php?p=191&part=rss&tag=feed&subj=zdblog
-
Do you want to learn Web Design?
Date: 03/17/05
(WebDesign) Keywords: php, css, html, java, web
I'm teaching a one day course in Web Design in New York City on Saturday. All those who can attend are welcome to register for it. Basically I'm going over most of what's done in webdesign. I don't expect anyone to become an expert after this course, but I think a lot of very valuable info is here for webdesigners at all levels, even if someone has never designed a webpage before and has no idea how to do it. It's a very ambitious course that I've never seen attempted before.
For only $59 with pre-registration by March 15, this is a huge bargain at twice the price. ($69 for late registrants) To register, phone 212-643-7005, or e-mail education@nypc.org
Location: NYPC Offices, Suite 1560 in the Hotel New Yorker, 481 8th Avenue (34/35 Sts)
Class Description:
Web Xtreme: Webmastering Overview (For all levels) Web Xtreme (For all levels) This class removes the mystery from website development! A full day overview of the many, many options you have to create or enhance a website. Whether you have never tried to build a website or are a professional designer, there is something for everyone here. Learn what you can do and how to go about doing it. Among the topics to be covered are
* HTML * CSS * Javascript * PHP * Dreamweaver * Flash * Streaming Video * Graphic Options (Photoshop, Fireworks, Illustrator, etc.) * 3ds max * More...
Bring in any questions you may have about the web. If making a web page has confused you or you think you can do much more with the web, this course is for you.
Our terrific web guru Jeff Frankel will guide us. Jeff is an outstanding instructor, with a very clear presentation style. He regularly teaches Flash at NYPC, and you can see some of his sites at www.webbrooklyn.com
Read Comments Add a comment
Source: http://www.livejournal.com/community/webdesign/834316.html
-
New to MySQL
Date: 03/17/05
(MySQL Communtiy) Keywords: php, mysql, database, sql
Alright, so I'm a bit new to MySQL. I haven't had to work with databases much, and when I have done them, it was with Access (Ick!). Anyway, i've got a php page that I'm trying to connect to a MySQL database. This isn't how the data's going to be displayed, obviously, but I'm unsure where to go from here.
// Connecting, selecting database $connect = mysql_connect('localhost', 'mannsye', 'nickmann1169'); if (!$connect) die('Could not connect: ' . mysql_error()); else echo "Connected successfully
"; $category = 1; mysql_select_db("mannsye_conigeninformation") or die("Could not select database"); // Performing SQL query $query = "SELECT * FROM residental_links, residental_types "; $query += "WHERE ((residental_links.section)=(residental_types.type)) ";
$query += "ORDER BY residental_types.index, residental_links.name;"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); // Free resultset mysql_free_result($result); // Closing connection mysql_close($connect); ?>
I've got my query seperated from the code, but as I know very little about MySQL, I don't know if the syntax is correct or not.
SELECT * FROM residental_links, residental_types WHERE ((residental_links.section)=(residental_types.type)) ORDER BY residental_types.index, residental_links.name;
Whenever I try and access the database and the tables, I can connect, but I can't display any data.
Connected successfully
Query failed: 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 '0' at line 1
Please, any help would be appreciated.
Many thanks! --Lisa
Source: http://www.livejournal.com/community/mysql/50953.html
|