php-general Digest 7 May 2012 01:10:31 -0000 Issue 7804

Topics (messages 317811 through 317815):

Re: PHP Subroutine Call Blowing UP with Strings
        317811 by: Maciek Sokolewicz

Re: code deployment through php
        317812 by: rene7705

IDE
        317813 by: Ethan Rosenberg
        317814 by: Simon Schick
        317815 by: Ethan Rosenberg

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On 06-05-2012 14:54, George R Smith wrote:
root@dellT710:/var/www# php qm_get_clients.php
*** glibc detected *** php: free(): invalid next size (fast): 0x0a2c3998 ***

Sounds like a segfault to me, which is fully the fault of the extension, and not something you're doing in PHP. Try asking the developers of the QM extension for help.

- Tul

--- End Message ---
--- Begin Message ---
On Sat, May 5, 2012 at 5:13 AM, tamouse mailing lists <
tamouse.li...@gmail.com> wrote:

> On Wed, May 2, 2012 at 5:23 AM, rene7705 <rene7...@gmail.com> wrote:
> > On Wed, May 2, 2012 at 11:47 AM, rene7705 <rene7...@gmail.com> wrote:
> >
> >> I can't use anything like git on my shared hoster. But I suppose I could
> >> use something like git at home, and use a sync script like I posted in
> my
> >> OP on the shared hoster.
> >>
> >>
> >>
> > Maybe you git gurus can help me along a bit further.
> >
> > I've managed to install msysgit and get it to work on my windows dev box,
> > so far so good.
> >
> > Now, I'm wondering how to set up my repositories. The last cvs I used was
> > Microsoft's visual source control back in the 90's, so I'm very rusty. At
> > the same time, I'd prefer not to experiment too much..
> >
> > I've got a tree structure in a folder called simply "code", that I have
> in
> > several locations on my windows box.
> >
> > Each site that I develop for has a folder in .../htdocs/sites/
> somedomain.com,
> > and many of these sites will need a copy of the common "code" folder in
> > them. I can restrict myself to developing in one domain's subdir only.
> > The non-common code for each domain is designed to run from any
> > $_SERVER['SERVER_NAME'] and any sub-directory it happens to be in. In
> other
> > words, http://my-dev-box.biz/sites/somedomain.com/ will show the same
> thing
> > from windowze as http://somedomain.com will from shared hosted linux.
> >
> > I would also like to version control the non-common code for each domain.
> >
> > And I would like to store the entire repository on my windows box at home
> > in 2 or 3 specific locations (on seperate disks encrypted with
> truecrypt.org,
> > and also a truecrypted usb disk, if and when that's plugged in).
> >
> > For distributing the common code to the shared hosted live server (my
> > workflow is to check finalized changes on my win box against all my sites
> > that used the common code base, before deploying to the shared hoster
> live
> > server), I can simply FTP one finalized copy and use the simplest of rm
> -rf
> > and cp -r commands in a short script to distribute the changes. I could
> > even do without the PHP filesync code I posted earlier (altho it was fun
> to
> > build! :)
> >
> > That darn hoster of mine won't support git on shared hosting, only on
> much
> > more expensive virtual dedicated and dedicated plans :(
> > But I've also found
> >
> http://serverfault.com/questions/26836/setting-up-a-git-repo-on-my-godaddy-hosting-plan
> >  and
> >
> http://www.lyraphase.com/wp/uncategorized/how-to-build-git-for-a-host-with-no-compiler/
> > that
> > show me how I might get git running on my (kinda lame now) shared hosting
> > account.
> >
> > Maybe a stupid question, but would perhaps copying the common code around
> > with a simple script be faster than multiple pushes by git?
>
>
> Using git, you can set up either publicly hosted repositories on
> github.com or gitorious.org or perhaps other public repo places. If
> you don't want you code to be publicly available, you can set up
> private repositories as well.
>
> Not being familiar with Windows implementations much at all, I can't
> tell you specifically what to do with msysgit, so these will be more
> generic instructions.
>
> I'm going to assume you don't have a host somewhere with ssh access.
> In this case you'll most likely want/need to set up your repository on
> your local system. (Note that it isn't *strictly* necessary to have a
> repository -- you can clone a new tree from the existing code tree,
> however having a repository can ensure a clean code set in case your
> working tree gets out of sync somehow.)
>
> (These instructions are modified from
>
> http://tumblr.intranation.com/post/766290565/how-set-up-your-own-private-git-server-linux
> )
>
> First, create a directory you want to hold all of your local
> repositories (such as C:\User\rene\MyRepositories). Then create a
> subdirectory off that to hold your server/application common code
> (C:\Users\rene\MyRepositories\commoncode).
>
> Make that directory (..\commoncode) a *bare* repository. (Not sure how
> that's done with msysgit, but the basic git command is: "git init
> --bare C:\Users\rene\MyRepositories\commoncode")
>
> Then you add the repository as a remote to the working tree: git
> remote add origin C:\Users\rene\MyRepositories\commoncode
>
> Now you can push commits to your repository with the following sequence:
>
> git add <files you want to commit>
> git commit
> git push origin master
>
> Now, to *deploy*, you can do the following:
>
> Somewhere outside your working tree, create a directory called "deploy":
>
> mkdir C:\Users\rene\deploy
>
> Then clone your the repository of your commond code:
>
> git clone C:\Users\rene\MyRepositories\commoncode cleancode-20120404
>
> Then you can ftp the contents of cleancode-20120404 to your server as
> needed.
>
> Sorry to be unable to tell you the exact steps with msysgit, but I
> hope you can interpolate from the commands above.
>

Thanks for that useful info, tamouse..

I didn't check this list for a few days thinking the thread had gone dead,
but I did manage to figure git on windows out.

I do need a bare repo for my common code, which I've put on a crypted disk
somewhere.
The command on msysgit is btw the same as a linux git command..

In each .../htdocs/sites/someDomain.com, under which I have the common code
in the folder "code", I have a file called .gitignore, which contains;

/cache
/code
*~

this ensures that my cache and common code folders, plus vim backup files,
are not put into the domain repo ("git init" in each
/sites/someDomain.com/).

then, to ease cloning and pushing of the common code, I have 2 .bat scripts
in my %PATH%;

code-c.bat: (fetch from master bare repo) (only to be executed in
.../sites/someDomain.com)
echo Y | rmdir /s code
git clone X:\path\to\myCommonCode.git HEAD

code-p.bat: (push local changes back into master bare repo) (only to be
executed in .../sites/someDomain.com/code)
git push X:\path\to\myCommonCode.git HEAD

to initialize the master bare repo X:\path\to\myCommonCode.git with my
code, I enter the latest code dir; .../htdocs/sites/someSite.com/code, and
do the following there;

git init
git add .
git commit -m "Initial commit"
code-p

Now, if I understand it correctly, I can backup all the relevant
directories and (hopefuly safely?!) backup the git repos all with simple
xcopy /s commands (cp -r on linux).
So that's what I'm doing now, I have a batch script to copy everything with
xcopy to another permanently attached large crypted usb drive in
.../backups/[date-time] category/, and another batch script like it to do
the same to a crypted usb drive (against breakins and such).

--- End Message ---
--- Begin Message ---
Dear List -

Is there any IDE which will let me step thru my code AND give the opportunity to enter data; eg, when a form should be displayed allow me to enter data into the form and then proceed? I realize the forms are either HTML and/or Javascript, but there must be a work-around. I is exceedingly tedious to use echo print var_dump print_r.

Thanks.

Ethan



--- End Message ---
--- Begin Message ---
On Mon, May 7, 2012 at 12:33 AM, Ethan Rosenberg <eth...@earthlink.net> wrote:
>
> Dear List -
>
> Is there any IDE which will let me step thru my code AND give the
> opportunity to enter data; eg, when a form should be displayed allow me to
> enter data into the form and then proceed?  I realize the forms are either
> HTML and/or Javascript, but there must be a work-around.  I is exceedingly
> tedious to use echo print var_dump print_r.
>
> Thanks.
>
> Ethan
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Hi, Ethan

The only thing I can come up with, that would really help you, since
you're just working with var_dump and print_r, is a php-debugger.

The common debugger for php are Zend Debugger and xdebug.

Nearly every IDE can be connected to them and if you set it up
correctly you can browse through your side (using your favourite
browser) and activate the debugger just by setting a cookie. For
several browsers there are plugins that set the cookie by clicking an
icon.
I'm talking about "nearly every IDE" because I saw a screenshot of
someone debugging a php-script using xdebug and vi :)

Just the first two links I found on google ...
* http://xdebug.org/docs/install
* 
http://www.thierryb.net/pdtwiki/index.php?title=Using_PDT_:_Installation_:_Installing_the_Zend_Debugger

Is that what you need?

I'm personally using PhpStorm and a VM with Debian, PHP 5.3 and xdebug
to debug my scripts and am perfectly fine with that. I can send you my
whole xdebug-config if you want :)

The stuff with javascript sounds like something automated to me ...
But I don't think you're talking about auto-form-fill and stuff like
that, are you?

Bye
Simon

--- End Message ---
--- Begin Message ---
At 06:45 PM 5/6/2012, Simon Schick wrote:
On Mon, May 7, 2012 at 12:33 AM, Ethan Rosenberg <eth...@earthlink.net> wrote:
>
> Dear List -
>
> Is there any IDE which will let me step thru my code AND give the
> opportunity to enter data; eg, when a form should be displayed allow me to
> enter data into the form and then proceed? Â I realize the forms are either
> HTML and/or Javascript, but there must be a work-around. Â I is exceedingly
> tedious to use echo print var_dump print_r.
>
> Thanks.
>
> Ethan
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Hi, Ethan

The only thing I can come up with, that would really help you, since
you're just working with var_dump and print_r, is a php-debugger.

The common debugger for php are Zend Debugger and xdebug.

Nearly every IDE can be connected to them and if you set it up
correctly you can browse through your side (using your favourite
browser) and activate the debugger just by setting a cookie. For
several browsers there are plugins that set the cookie by clicking an
icon.
I'm talking about "nearly every IDE" because I saw a screenshot of
someone debugging a php-script using xdebug and vi :)

Just the first two links I found on google ...
* http://xdebug.org/docs/install
* http://www.thierryb.net/pdtwiki/index.php?title=Using_PDT_:_Installation_:_Installing_the_Zend_Debugger

Is that what you need?

I'm personally using PhpStorm and a VM with Debian, PHP 5.3 and xdebug
to debug my scripts and am perfectly fine with that. I can send you my
whole xdebug-config if you want :)

The stuff with javascript sounds like something automated to me ...
But I don't think you're talking about auto-form-fill and stuff like
that, are you?

Bye
Simon
=======
Simon -

Thanks.

I don't think you're talking about auto-form-fill and stuff like
that, are you?

No, I am not.

Please send me your xdebug-config file.

Thanks

Ethan



--- End Message ---

Reply via email to