php-general Digest 31 Aug 2007 16:34:36 -0000 Issue 4992

Topics (messages 261558 through 261563):

PHP/MySQL not playing nicely.  Server drops connection. . .
        261558 by: Michael Williams
        261562 by: brian

Re: How to show proper time to users from around the world
        261559 by: Per Jessen

Chisimba Framework Release
        261560 by: Paul Scott

PHP Developer Required
        261561 by: Greg Gay

Re: Reload page after form submit
        261563 by: brian

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Hi All,

I recently installed PHP, APACHE, MYSQL per the method at the following site:

http://switch.richard5.net/isp-in-a-box-v2/installing-mysql-on-mac-os-x/



. . .I then attempted to connect to a database (but without executing any commands on it), and I keep receiving the following error:



Safari can’t open the page “http://localhost/~michwill/folder/ validate_event.php” because the server unexpectedly dropped the connection, which sometimes occurs when the server is busy. You might be able to open the page later.


I'm really not sure what the problem is or what to do about it. Can anyone help? I've ensured that all passwords and ports are correct. I've also tried using MAMP, but it keeps telling me that I can't access the database with the "connect" commands I'm using (although I've adjusted them. Anyway, any help would be much appreciated.


Regards,
Michael

--- End Message ---
--- Begin Message ---
Michael Williams wrote:
Hi All,

I recently installed PHP, APACHE, MYSQL per the method at the following site:

http://switch.richard5.net/isp-in-a-box-v2/installing-mysql-on-mac-os-x/

. . .I then attempted to connect to a database (but without executing any commands on it), and I keep receiving the following error:

Safari can’t open the page “http://localhost/~michwill/folder/ validate_event.php” because the server unexpectedly dropped the connection, which sometimes occurs when the server is busy. You might be able to open the page later.

I'm really not sure what the problem is or what to do about it. Can anyone help? I've ensured that all passwords and ports are correct. I've also tried using MAMP, but it keeps telling me that I can't access the database with the "connect" commands I'm using (although I've adjusted them. Anyway, any help would be much appreciated.


Are you sure that Apache is running and accepting connections to /~michwill? Does a regular HTML page show up ok?

Have you checked the server error log?

What does your script look like where it connects? Does it simply die() without a message? Try creating a test script with header('Content-type: text/plain') at the top. Then print out messages after each step. (beginning of script, opening a DB connection, etc.)

How are you accessing the database? Whichever method, test for errors after each step and echo out any info there. eg. with MDB2:

$mdb2 =& MDB2::connect($dsn, $options);

if (PEAR::isError($mdb2))
{
  die ('Failed to connect: ' . $mdb2->getMessage());
}

If the MDB2 object is kosher but you have an SQL error:

$result = $stmnt->execute($data);
                
if (PEAR::isError($result))
{
  die('bad query: ' . $result->getUserInfo());
}

Of course, you shouldn't blindly echo out this sort of thing on a production server.

brian

--- End Message ---
--- Begin Message ---
Hemanth wrote:

> Hi friends,
> 
> Is there a solution to showing the proper time and date at user
> browsers and also recording proper USER times in the database
> operations in mysql

I think it's better to record UTC times only, but display them according
to the users timezone.  You can do that by telling mysql which timezone
you want per session.

http://dev.mysql.com/doc/refman/5.0/en/time-zone-support.html


/Per Jessen, Zürich

--- End Message ---
--- Begin Message ---
The next release of the Chisimba PHP5 framework is now available.

Major enhancements included in this release are:

 - Memcache support
 - Better caching of language items
 - Improved database performance
 - Bug fixes
 - Better code documentation
 - API docs
 - First draft of the Chisimba Book for Developers
 - XML-RPC API for the Blog module
 - Context improvements
 - Code cleanup
 
and, of course, new modules to add onto your installation!

Please take a look, download it and give it a test drive! 
 
Chisimba, for those that don't know it already, is a PHP5 framework made
in Africa, for Africa. It is a collaboration between around 16 African
Universities, as well as around 35 active developers from around the
continent.
 
It can be downloaded from AVOIR at:
 

http://cvs2.uwc.ac.za/chisimba_releases/chisimba_framework_1-0-4.tgz
http://cvs2.uwc.ac.za/chisimba_releases/chisimba_modules_1-0-4.tgz

(or .zip if you prefer that format)

and the doc wiki can be found at:
 
http://avoir.uwc.ac.za/avoir/index.php?module=wiki

There are server setup instructions, as well as installation
walkthroughs available linking from the main AVOIR site:
 
http://avoir.uwc.ac.za/avoir/index.php?module=cms&action=page&id=gen12Srv48Nme23_207
 
For those interested in developing a module, or just getting some
additional info please take a look at:
 
http://avoir.uwc.ac.za/avoir/index.php?module=cms&action=page&id=gen12Srv48Nme23_208

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

--- End Message ---
--- Begin Message ---
Title: Web Applications Developer

Open August 30, 2007,

Closing September 14, 2007

Formal Education: University Degree in computer science/engineering or
related discipline

Employer: University of Toronto, Faculty of Information Studies,
Adaptive Technology Resource Centre,

Description: Under the direction of the Project Manager, the successful
applicant will take a leading role in the development of PHP web
applications, and participate through these projects in a number of open
source communities, assisting with community support, assisting clients
developing functional specifications, and assisting with development and
maintenance of a number of open source community Web sites.
Opportunities will also be available to participate in a broad range of
development projects under taken at the centre, working with
international and local groups, government, corporate, health care, and
not for profit sectors, among others.

Experience: At least five years experience working in team programming
environment. Advanced knowledge of PHP web application development.
Working knowledge of SQL, Javascript, AJAX, JAVA, XML, SOAP, HTML, CSS
and working in a distributed programming environment using Subversion.
Comfortable working in both Windows and Linux environments. Working
knowledge of Apache and Tomcat. Understanding of Web accessibility and
working in open source development projects would be an asset

Other: Flexibility, initiative and the ability to work and learn
independently. Excellent communication skills and an ability to
communicate technical details courteously and clearly to non-technical
users.

Starting Rate: $25/hr/CAD + 4% vacation pay

Appointment Type: One year renewable contract

Percentage of FTE: 100

Location: Toronto, Ontario, Canada

Forward Resume to [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Instruct ICC wrote:
From your rough code, I'd say the OP always needs the select block (just remove the "else" keyword and keep the block) for the current info at the present page refresh/load. But I'd like clarification on how the OP thinks about it.


That's close, i think. But the select isn't necessary if the user has submitted a post because, either way, $first & $last will be set to the latest values.

The problem that i see is here:

if (isset($_POST))

This will always return TRUE. It should rather be:

if (isset($_POST['name_of_your_submit_btn']))

or some other form element, at least.

I don't know if this was simply because it was a rough draft of the code or even if it's the cause of the problem (which i still don't quite understand) but, anyway ...

brian

--- End Message ---

Reply via email to