Log in

No account? Create an account
PHP Development's Journal
[Most Recent Entries] [Calendar View] [Friends]

Below are 20 journal entries, after skipping by the 20 most recent ones recorded in PHP Development's LiveJournal:

[ << Previous 20 -- Next 20 >> ]
Saturday, April 28th, 2007
10:50 pm
SimpleXMLElement Question.
I am connecting to Amazon's S3 web service. I've created 2 buckets, and am now writing a function to get back the list of buckets from S3, and am having problems parsing the XML with simple XML.

I've got down to the bucket Node in a foreach loop as $bucketObj in the XML this Node had "Name" and "CreationDate" as XML nodes.


The problem is when I call them instead of getting a "string" variable, I have a "SimpleXMLElement" If I var dump Name it looks like

    object(SimpleXMLElement)#17 (1) {
      string(13) "JamesTest1234"

How do I get access to [0] I've tried all kinds of things. If it was ['0'] I'd know how to get it, but in this case when I try $bucketObj->Name->0 it fails I've also tried $bucketObj->Name[0].

I'm really confused. I've used SimpleXML before and hadn't had any kinds of issues like this, so any suggestions would be greatly appreaciated.

This is the XML I receive with a little modified info:
<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
        <ID>amazon key data</ID>
Tuesday, April 24th, 2007
1:08 pm
Php5 extending classes and access private variables.
I have a classs.


class BaseClass{

    private $varName = array();

    function BaseClass(){
        // not doing anything.



class MyClass extends BaseClass{

    function BaseClass(){
        print '<pre>';
        print '</pre>';


Why don't I get access to $varName from the parent object? I am extending a class I should have access to all private variables because it's an extension of the class. If I make it public it works fine....
Monday, March 5th, 2007
1:31 pm
Please don't run away because of the title. I'm working on a template which would include a sidebar with the ability to leave comments without refreshing...hence the AJAX implication.

Now, the big issue at hand is I have NO knowledge on how to do this. Here is the template I'm working with. ( clicky )

On the right you'll see the comment box, and above is a small bg image which looks like a quote bubble. So I want the submissions to appear over the bubble. And here is the catch, only three comments are to be allowed on the page. It needs to auto delete any (older) comments beyond 3. And a maximum of 100 characters per submission.


Of course it is. But I don't know how to do it. I've googled and ... damn it's a big world out there.

Suggestions or offers?

EDIT: Link fixed.
Saturday, February 17th, 2007
1:31 pm
Job Posting: Lead PHP developer position

Lead PHP DeveloperCollapse )

[cross posted] My apologies if you receive this post more then once.
Wednesday, January 3rd, 2007
12:48 pm
Давайте писать PHP игрушку.
Ищу людей для создания на общественных началах PHP BBMMOG. Понимаю, что это велосипед, который не гоже изобретать. Но важна не только цель, но и процесс!!!

Приветствуются: графика, вебдезайн, идеи, желание создать свой игровой мир и управлять им.
Предполагаемые направления:
  • бизнес / финансы
  • сельское хозяйство (по мотивам Harvest the moon - от нинтендо)
  • околодайвинговая тема
  • любые другие направления

    Что есть:
  • Желание творить
  • Хостинг с поддержкой PHP5 и MySql
  • Множество идей
  • Опыт в ООП, PHP, SQL и т.п.

    Можно писать напрямую мне.
  • Thursday, December 21st, 2006
    12:04 am
    Writing a SOAP server
    Hello everyone. I have a web service sort of like a gallery written in PHP, and I'd like to make it externally accessible to use in other remote applications. I was thinking of using the SOAP protocol, but it's hard to find how to write a SOAP server in PHP (everything I can find is making a SOAP client.)

    Anyone that could point me to a tutorial, give me a simple example, or point me to another protocol that's easier to write for (XML-RPC) would be great help. Thanks!

    P.S.  This will all be for internal use, so functions don't need to be exposed, and such.

    X-Posted to php.
    Sunday, December 3rd, 2006
    9:07 pm
    upload issues.
    ok here's the deal. I work for a company that has this client. The client has an application for uploading PDFs to our servers, and we send those PDFs to the printers. We've had this running for a couple months, with little issues here and there, but suddenly we ran into an issue. Some customers get dropped connections, or their temp file that php makes isn't there when it goes to copy it to it's permenant home. This started happening after the volume of uploads started to go up.

    I have tweaked the php settings so that the max file size is like 250MB the max post is 300MB and the memory is cranked to like 600MB. Not sure where to go, I am totally lost. The sad thing is I can't even replicate the problem. Advice?
    Thursday, November 23rd, 2006
    12:41 pm
    Will turning on SSL affect my scripts?

    I've got a website that I developed in PHP and it connects to an oracle db. I'm running it in an environment with Apache Tomcat....

    My question is, if I activate SSL for Tomcat...will this affect the scripts I've already written? In other words, will I have to rewrite my scripts in order to have the site run properly with SSL? Or does turning on the SSL do nothing to my code...

    Tuesday, November 21st, 2006
    8:00 pm
    New to PEAR
    Hi all

    am Pretty new to using PEAR, facing some pbms here lately ,
    I ve installed pear with the following setup : windows /apache 2/mysql /php5
    now while execute the following code :

    I am getting the following error :

    "Warning: require_once(DB.php) [function.require-once]: failed to open stream: No such file or directory in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\pear.php on line 3

    Fatal error: require_once() [function.require]: Failed opening required 'DB.php' (include_path='C:\PHP\pear') in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\pear.php on line 3"

    please let me know how to fix this.thx alot.
    Thursday, November 16th, 2006
    2:41 pm
    Text Wrapping in Drop Down Boxes

    I have a drop down menu where one of the items is EXTREMELY long, and because of this, the overall size of the drop down box is the size of this item. I found a way to shrink the size of the drop down box via:

    This works in shrinking the overall size, but what happens is that the really long item is now longer than the width of the box and the text for the item doesn't wrap around down to the line below. So you don't actually see the whole item in the list.

    Do you know how I can wrap this item so that the text falls down to the line below?

    1:51 pm
    Нужен толковый программист PHP

    Други, срочно требуется web-программист.
    От 1000 (по результатам собеседования).

    Wednesday, November 8th, 2006
    11:32 am
    Problem with fopen on remote image with http
    I'm attempting to grab a web cam image, which has its own server/URL, and display it on a page on our server.

    This works:

    print ("<img src=\"http://" . $user . ":" . $password . "@" . $ip . "/" . $filename . "\" alt=\"Webcam image from " . date("m-d-Y H:i:s") . "\" />\n");

    But I'd like to grab the file for later saving/manipulating, and also avoid having the auth amd IP info in the HTML source - so I tried:

    $camimage = fopen("http://" . $user . ":" . $password . "@" . $ip . "/" . $filename, "rb");

    and it times out with:

    Warning: fopen(http://...@ [function.fopen]: failed to open stream: Connection timed out on line 24.

    Anyone have any clue why? Is it the username/password that's the problem? The explicit port number? (I can't get around needing the authentication, but I might be able to redo to use port 80)

    Current Mood: confused
    Friday, October 27th, 2006
    11:24 am
    Does anyone know Subversion well? I just started using it and I am having some problems with file permissions and user groups. Is it possible to check files in, then out, and have the files have the same permissions they were checked in with? It does not seem to be the default behaviour for SVN so it may not be the way to go. However in my situation it seems that its what I need. I read through most of the online manual at http://svnbook.red-bean.com and I either missed it or it does not say anything about it.

    Any pointers would be appreciated.

    Subversion version 1.1.4

    Monday, October 9th, 2006
    1:20 pm
    Image Gallery
    Currently I am using Coppermine's Photo Gallery and have been quite pleased with it. The only thing is I have body parimiters set in my CSS and I don't want to distort my pages with large images so I have them resized from original. http://www.moojoobee.com/gallery/index.php

    I limit my image width to 640px to stay within these boundries.

    I guess I'm looking for a PHP gallery that preserves the actual image size (8 Mega Pixel and Up) so that upon clicking on the resized image it links you to the original image. Hoping this makes sense.
    Thursday, October 5th, 2006
    4:10 pm
    Some help on approaching CMS systems
    I am looking for some opinions on how to best approach creating a web site with a CMS system.

    I was originally thinking of implementing various bits of code freely available online and then merging them to play nicely together as one for a client of mine but came across some rather unique-looking packages on the web. One of these packages is Typo3, although I have some concerns about it.

    Typo3 seems to be amazing in the sense that it literally "has it all"--guestbooks, galleries, tracking, comments, CMS, easy editors, etc.--but this is also what worries me. As a web designer and developer, I adhere to strict XHTML/CSS standards and to the separation of content and representation for web design. My concern is that as a huge monolithic package, it looks terribly susceptable to some terrible, broken HTML and design-procedures that would be near impossible to fix.

    I have also come across CMS Made Simple but haven't had much of an opportunity to delve into it. It is very likely to suffer from these same things, although I do not think, from memory, that it was as full blown a project.

    Now keep in mind, I am a much stronger designer than developer but I am quite able to dive into code and hack and adjust things as needed as I have experience in PHP, MySQL, and the like. Does anyone have any experience with these packages or others like them? Would it make more sense for me to develop an entire system from scratch or by piecing smaller works together?

    Any recommendations or opinions would be very much appreciated.

    PS. If this was a due-by-next-week thing, it would be a no-brainer. The client wants this done ASAP, but not necessarily so fast as to comprimise quality.
    Monday, September 25th, 2006
    4:01 pm
    Вакансия: Web-разработчик (PHP 5) г. Москва
    В настоящий момент мы ищем ведущего web программиста c серьезным опытом и отличным знанием PHP 5, MySQL, XML/XSLT, ООП для участия в разработке и развитии web проекта, основаного на концепции web 2.0 - www.comby.com.

    Что мы предлагаем?
    Работа с технологиями нового поколения, по-настоящему дружный коллектив, а также достойный профессионала уровень оплаты труда позволят Вам в полной мере реализовать свой профессиональный потенциал*.
    *Заработная плата от 2000$
    **На постоянную работу, полный рабочий день.

    Контактная информация:

    E-mail: comby-personal@comby.com
    Тел: (495) 245-63-70
    Контактное лицо: Антон
    Web Life - Интернет компания c многолетним опытом создания и развития Интернет проектов в области телекоммуникаций.
    Основное направление деятельности в России– развитие и продвижение проектов www.comby.com  и www.comfi.com .
    Saturday, September 23rd, 2006
    2:20 am
    php4 question.
    ok, so I am going to start with, this is a php4 based machine and I can't upgrade to 5 so I need a php4 solution.

    I have some XML that I am parsing and creating an array object out of. a var_dump of the object gives me this.

    object(stdClass)(1) {
      array(1) {
        &object(stdClass)(5) {
          array(1) {
            string(6) "create"
          array(1) {
            string(4) "testing"
          array(1) {
            string(4) "testing"
          array(1) {
            string(19) "2006-09-21 00:00:00"

    This is the deal. I want to add to this list, but I am not sure how to do it. I am parsing using the XmlC class example from php.net I want to add a [errors] object with a few sub object (which will all be turned back into XML string afterwards and returned to the end users). I am not sure how to programmatically add this. Help please..

    [edit]: I should add more information. I want to add [errors] to the same level as [timestamp] in the same object without having to rebuild the object.
    Sunday, August 13th, 2006
    10:15 am
    minimum number of queries?

    I've got a bit of a problem that I'm not quite understanding.

    I'm working in PHP with an Oracle database. I need to have 12 queries in my program because I have 12 drop down menus representing each field in my Oracle table. For some reason, I cannot have more than 5 queries. Anymore than 5 and my drop down menus remain completely blank. I can't find any information about this...I can't even imagine why I can't have my 6th, 7th, etc. number of queries.

    Any idea why this is happening?

    Thursday, August 3rd, 2006
    11:05 am
    Passing values to a pop-up window
    I'm not sure if this is where I should post my problem, but I'll give it a shot.

    I'm developing a php website and I need to pass some values to a pop-up window. The user enters their information like their name, age, and address into a form. When they press the submit I want that information to be displayed in a pop-up window. I can get a pop-up window to appear but using $_POST does not work. I've been doing some searching and have seen something about using $_GET and appending the values to the URL but I want to try and avoid that.

    Any help would be great thanks :)

    Wednesday, July 26th, 2006
    5:24 pm
    HTTP_RAW_POST_DATA = null even though php.ini is told to pass it... help
    I'm at a loss here. I want to look at the raw http post data, but for some reason it's not coming through.

    print $HTTP_RAW_POST_DATA; returns null

    in the php.ini always_populate_raw_post_data = On

    why doesn't it work?


    OK so it doesn't work because it's a multipart/form data. It doesn't work with fopen('php://input','r') either. ANy suggestions how I can view the raw http post?
    [ << Previous 20 -- Next 20 >> ]
    About LiveJournal.com