1. My Apache server needs washing?

    Date: 10/31/05 (Computer Geeks)    Keywords: php, apache

    After an accidental system crash in which Apache was not shut down properly, I get this message when I try to start Apache: "Unclean shutdown of previous run." Reinstalling either phpdev or Apache 2.0.55 doesn't remove the error. How can I fix my server? *whimper* TIA

    Cross-posted to '[info]'apache.

    Source: http://www.livejournal.com/community/computergeeks/808130.html

  2. sprinit Weirdness

    Date: 11/01/05 (PHP Community)    Keywords: php, linux

    Well, I was coding a BBCode Parser (rather unconventional because the parser will allow multiple attributes to a BBCode tag like [tag attrib1="" attrib2=""]...[/tag])

    Anyway, I was coding to allow escaped characters to appear inside the attribute values and I came across this weird sprintf behaviour which I wonder if it's a PHP bug.
    code:

    PHP Code:
        die(sprintf('%1$s
    ',"ABC",' style=".\"." class="class"'));
    ?>

    Expected Output:
    Code:
    ABC
    Output:
    Code:
    ABC

    It looks like sprintf doesn't like escaped quotes or something. If you add any character after the missing quote, it will appear but the quote will not.

    I tested this on PHP 5.0.4 on Windows and Linux. Can anyone confirm this problem?

    Source: http://www.livejournal.com/community/php/362176.html

  3. Quick question

    Date: 11/01/05 (Web Development)    Keywords: cms, php

    Is it possible to have a php script that will send out an email to a list of people at a certain time (eg. every Friday at noon)? My first thought is to think no because what calls the script but I'm not sure. I'm trying to do up a quote for a CMS system for a client and they want content emailed automatically on a time basis. What could I use for this?

    Source: http://www.livejournal.com/community/webdev/263602.html

  4. Running out of options

    Date: 11/01/05 (WebDesign)    Keywords: php, database, java, web, apache

    Hey, I may not have said this, or I don't say it enough, but I wanted to thank everyone in this community for their continued support and efforts. I would be the first to admit that when I find myself with any questions or in need of an honest (most of the time) professional opinion, this is where I tend to stop first.



    I work for a higher education provider who has recently put a new state wide internet campaign together. This meant that all regions throughout the state came together and had to adhere to a standard format for all web publications. To me, this was a great move, however, we are still very limited to the type of tools we can utilize for creating web documents. For example, right now we are needing to publish our college bookstore book list online. The bookstore is currently using a very large and extensive Access database to handle all bookstore events. Each semester, or when a new book is added/deleted/edited to the book list, we publish an excel version of this book list and push that to our website, as is. We are now finding that this method is difficult to track, manage and keep current. It's a waste of time, really.

    Here's what they are asking me, if we are able to update the database and have it also update the web at the same time?

    Well my answer was yes, then no, and here's why.

    Our network group has restricted all scripting except for Javascript and CGI/Perl. I'm pretty sure we are running Apache on a Unix box, with nothing like PHP installed. I really don't think Javascript could be used for this, however, I don't know it enough to really make anything happen. The same goes for me when it comes to CGI/Perl.

    I do, however, know that I could accomplish this utilizing the Access database and PHP. Somethings I do know. But since I don't have the tools available to me that I know best, what other options could I use? Any suggestions?

    Source: http://www.livejournal.com/community/webdesign/1008804.html

  5. Not really happy with the application I'm building.

    Date: 11/02/05 (PHP Community)    Keywords: php, html

    Although it works, I consider it a bit clunky.

    What I have is a form that accepts certain data, and then uses that data to build an HTML page (it's for HTML formatted marketing emails).

    The form's easy enough, as is the validation, but the problem is this:

    I have a table that needs to be built into the page, and the user needs to select how many rows and columns the table is going to be. Currently I have a structure like this


    ... standard form data...

    Columns: Rows:

    -----

    On the second page (mailout_step2.php) I carry out my validation:

    if ((!is_numeric($_POST['cols'])) || (!is_numeric($_POST['rows'])) || ($_POST['cols'] < '1') || ($_POST['rows'] < '1')) {
    // print a generic error message, an html page with hidden form fields, and a submit button to resubmit all the data back to the first page
    } else {
    $rows = $_POST['rows'];
    $cols = $_POST['cols'];
    }

    if ($rows && $cols) {
    // print a table full of text inputs for the user to fill in, and submit the new form (again will all the hidden fields) to a third and final page to validate and print the final output.
    }

    -----

    Surely there's a better (less clunky) way to do this? I know how to do single-page forms with validation all on one page, but this seems like a "dirty hack".

    Source: http://www.livejournal.com/community/php/362739.html

  6. Quick question

    Date: 11/01/05 (PHP Community)    Keywords: cms, php

    Is it possible to have a php script that will send out an email to a list of people at a certain time (eg. every Friday at noon)? My first thought is to think no because what calls the script but I'm not sure. I'm trying to do up a quote for a CMS system for a client and they want content emailed automatically on a time basis.

    Source: http://www.livejournal.com/community/php/362279.html

  7. Problem with link colors in Firefox

    Date: 11/02/05 (WebDesign)    Keywords: php

    I need a little help here. I did a site for a client using Dreamweaver. Site looks great in IE. Colors all perfect, etc. She is using Firefox. Colors, not so great. The links are showing up blue or violet, and on the MyCalendar php page the popup text is green. I've tried figureing out what the problem is, but I haven't been able to figure it out.

    Please be warned, if going to the site, that it contains adult content. The site is at http://www.bondageexpert.com

    Any suggestions of making the colors for links look right in both IE and Firefox?

    Source: http://www.livejournal.com/community/webdesign/1009268.html

  8. Now I'm really screwed.

    Date: 11/02/05 (Web Development)    Keywords: php, mysql, software, html, technology, database, sql, security, apache

    This is a follow up to the post I made before regarding this database connection problem I'm having. (http://www.livejournal.com/community/php/359304.html)

    After receiving responses from people that suggested I install the MS SQL PHP functions, I inquired with my IT contact (we are a large institution and therefore have ridiculous amounts of red tape to deal with) as to whether or not they could be installed.

    This is what I was told:

    We do not support MSSQL odbc connection on our Sun Solaris server running Apache. mssql_connect would require a staff member who knows the technology, purchase of licensed software (which we do not have), and recompiling of Apache that may potentially break other users code. Also, there would be MSSQL security issues if we were to open up or authorize connections to it from our Sun Server, we host a variety of departmental databases on that SQL server, that could be a potentially serious problem if any of our other databases we to be compromised. Sorry for the inconvenience, but that is the story.


    If I can't connect to that database, the entire project that I'm working on is going to be fucked and I have a 11/21 deadline. I need to know two things, if any of you can discern from all of this:

    1. Is it EVER going to be possible for me to connect to that database? Or should I just stop wasting my time and create another for my personal use?

    2. If it is possible, can someone tell me how? :(

    Thanks everyone.

    Cross posted to PHP/MySQL communities.

    Source: http://www.livejournal.com/community/webdev/263959.html

  9. Now I'm really screwed.

    Date: 11/02/05 (PHP Community)    Keywords: php, mysql, software, html, technology, database, sql, security, apache

    Edit: Thank you all for your help and suggestions. I had a meeting with my server administrators and have found that it would just be easier to dump and import the data into my own little MySQL database. But I learned a lot in this process thanks to you all!

    This is a follow up to the post I made before regarding this database connection problem I'm having. (http://www.livejournal.com/community/php/359304.html)

    After receiving responses from people that suggested I install the MS SQL PHP functions, I inquired with my IT contact (we are a large institution and therefore have ridiculous amounts of red tape to deal with) as to whether or not they could be installed.

    This is what I was told:

    We do not support MSSQL odbc connection on our Sun Solaris server running Apache. mssql_connect would require a staff member who knows the technology, purchase of licensed software (which we do not have), and recompiling of Apache that may potentially break other users code. Also, there would be MSSQL security issues if we were to open up or authorize connections to it from our Sun Server, we host a variety of departmental databases on that SQL server, that could be a potentially serious problem if any of our other databases we to be compromised. Sorry for the inconvenience, but that is the story.


    If I can't connect to that database, the entire project that I'm working on is going to be fucked and I have a 11/21 deadline. I need to know two things, if any of you can discern from all of this:

    1. Is it EVER going to be possible for me to connect to that database? Or should I just stop wasting my time and create another for my personal use?

    2. If it is possible, can someone tell me how? :(

    Thanks everyone.

    Cross posted to PHP/MySQL communities.

    Source: http://www.livejournal.com/community/php/363248.html

  10. PHP AIM knockoff

    Date: 11/02/05 (PHP Community)    Keywords: php, web

    Hi,
    I would like to add a chat program to my company's website. I would like a user to be able to click a button and then a chat window pops up on my bosses/customer service's computer and the user's computer. They can then converse about sales and so on. Each user should have a unique window, not like a chat room full of people.

    Can anyone recommend a free PHP program to handle this or a licensed program. Thanks in advance.

    Source: http://www.livejournal.com/community/php/363000.html

  11. Two questions

    Date: 11/03/05 (PHP Community)    Keywords: php, mysql, sql

    Hello! I am making an online MMORPG using PHP and MySQL. I have two questions.

    First off, how would I make a turn system? As in, for example, I can have up to 100 turns at a time. When I use a turn, stuff happens; I get one turn every 10 seconds or so.

    For example...
    I have 100 turns.
    I use 5. (The stuff the turns do happens.)
    I now have 95 turns.
    20 seconds pass.
    I now have 97 turns.
    40 seconds pass.
    I now have 100 turns. (Not 101, because 100 is max.)

    How could I do something like that using PHP and MySQL?

    Secondly, is there a way using PHP (or MySQL) to automatically empty out a certain table at a certain time, even if a page isn't accessed? Like an auto-refresh if you will. I'm thinking that would be on the server, not in a particular script however...because scripts are only run when they're opened.

    *Shrugs*

    Insight would be helpful. Thank you!

    Source: http://www.livejournal.com/community/php/363690.html

  12. my solution to the whole words problem

    Date: 11/03/05 (MySQL Communtiy)    Keywords: php

    Thanks for all the suggestions in the previous post, but none of them seem to do what I want. After asking another friend, we eventually came up with this query (in PHP, thus the need for the backslashes before the square brackets) which does what I need:

    $site = 'pp';
    $slashedSearch = 'mini';
    $query = "SELECT product_id, name, description, title, manufacturer,
                     warehouse_price, product_markup, supplier_markup, filename,
                     thumbnail_width, thumbnail_height, sell_price, minimum_price,
                     item_number, category_key
              FROM product
              INNER JOIN supplier
                ON supplier_key = supplier_id
              INNER JOIN picture
                ON picture_key = picture_id
              WHERE placement_{$site} = 1 AND
                    product.active > 0 AND
                    (name REGEXP '\[ ,.;:^\]$slashedSearch\[ ,.;:$\]' OR
                     description REGEXP '\[ ,.;:^\]$slashedSearch\[ ,.;:$\]' OR
                     title REGEXP '\[ ,.;:^\]$slashedSearch\[ ,.;:$\]' OR
                     manufacturer REGEXP '\[ ,.;:^\]$slashedSearch\[ ,.;:$\]' OR
                     product_id='$slashedSearch' OR
                     item_number='$slashedSearch')";
    

    Source: http://www.livejournal.com/community/mysql/72426.html

  13. Array Keys?

    Date: 11/03/05 (PHP Community)    Keywords: php

    Hi everyone,

    stupid newbie question alert: What role do keys play in an array? I know I probably already know the answer to this but I can't find it blatantly explained anywhere in PHP documentation or anywhere else online. All I get is an explanation of syntax or array key function explanations.

    Any help would be appreciated.

    Source: http://www.livejournal.com/community/php/364229.html

  14. The Mysterious Case of the Unwilling Variables??

    Date: 11/04/05 (PHP Community)    Keywords: php, mysql, database, sql

    Hi, I'm completely stumped over this. I'm probably missing something quite obvious, and I figure it's to do with using global variables.



    There is a file, PostDisplay.php. It loops through an array of posts from the database and prints them out. It is independent of the posts themselves and is called by scripts that specify the posts to be printed. Before the loop are the queries to put the posts into an array and count the number of rows (used in the loop).

    $array_post = mysql_query($query_post);
    $num_post = mysql_num_rows($array_post);


    There are two files so far to specify what posts to print. This one, LatestPost.php, works perfectly.


    $latest_post = "SELECT * FROM posts ORDER BY id DESC LIMIT 1";
    $query_post = $latest_post;

    include('PostDisplay.php');

    ?>


    This one, MonthsPost.php, doesn't.


    $year = $_GET['year']; # sets the year of the desired posts as a global variable
    $month = $_GET['month']; # sets the month of the desired posts as a global variable

    $month_post = "SELECT * FROM posts WHERE month=$month && year=$year";
    $query_post = $month_post;

    include('PostDisplay.php');

    ?>


    The global variables $year and $month are set in the script months.inc.php. Excerpt:

    November

    The error given upon loading MonthsPost.php is:
    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:\phpdev5\www\new\PostDisplay.php on line 4
    (Line 4 is "$num_post = mysql_num_rows($array_post);".)


    If anyone is brave/bored enough to read all that and help, thank you. ^_^

    Edit: Using mysql_select_db in PostDisplay.php has fixed it, and so I've done something silly with the includes elsewhere. Thanks for all the help ^_^

    Source: http://www.livejournal.com/community/php/364431.html

  15. Need a really good form validator script

    Date: 11/04/05 (Javascript Community)    Keywords: php, java, web

    Hi guys,

    I've spent the last two days sourcing the web for a javascript form validator. I'm pretty decent with php, which is why I've avoided using js for so long (I just did all my validation server-side), but I find myself in need now.

    As you might guess, I've found heaps and heaps of js form validators, but none of them are quite right. In a nutshell, I'm looking for a single function that I can use <form ... onSubmit="return validate(this);"> to validate ANY form across my site. I want to check


    • presence of any data (for required fields)

    • valid date format (dd/mm/yyyy OR mm/yyyy)

    • check that an "EndDate" field is greater than a "StartDate" field

    • valid time format (h:mm or hh:mm or HH:MM)

    • valid currency format ($DD or $DD.cc)

    • valid number format (no alpha characters)

    • valid state (QLD OR NSW OR ACT OR VIC OR TAS OR NT OR SA OR WA)

    • valid 4-digit post code (exactly four numbers)

    • valid email address format

    • valid selection (from a
      Previous page  ||  Next page


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home