Re: [PHP] Connecting to MySql with PHP

2010-10-04 Thread mrfroasty
The code execute fine on my LAMP server, but I am wondering does localhost really works on Windows ?As this on MAC you need to actually tell a complete path.On MAC with Zend-Server I had to mention something like /var/tmp/mysql Anyways, by looking on the error it might be mysql server is not

Re: [PHP] Connecting to MySql with PHP

2010-10-04 Thread a...@ashleysheridan.co.uk
Have you installed the php mysql module? Basically, it tells php how to connect to mysql. This question has come up a few times this week, have you tried installing something like xampp or easyphp rather than the individual software components: Apache, php & mysql. Thanks, Ash http://www.ashle

[PHP] Connecting to MySql with PHP

2010-10-04 Thread sueandant
I am running PHP 5.3.3, with Apache 2.0 Handler and MySql Server 5.1. My OS is Vista Home Premium 32 bit with SP2. MySql works fine from the command prompt, Apache is running and PHP works. But I cannot access the mysqli classes. This simple program: produces this error message: Warnin

Re: [PHP] PHPExcel with large files (27,000+ rows)

2010-10-04 Thread chris h
Thanks Jessen/Marc, though the user provided format can be in xls, xlsx, or csv. So i need a solution to support all formats. Thanks for the ideas shiplu I'll get with the team and see if there's anything there we aren't trying. Chris. On Mon, Oct 4, 2010 at 3:01 PM, shiplu wrote: > On Tue,

Re: [PHP] PHPExcel with large files (27,000+ rows)

2010-10-04 Thread shiplu
On Tue, Oct 5, 2010 at 12:39 AM, chris h wrote: > I'm currently working on a project that requires the parsing of excel files. >  Basically the user uploads an excel file, and then a script needs to save a > row in a Postgres database for each row in the excel file.  The issue we are > having is t

Re: [PHP] PHPExcel with large files (27,000+ rows)

2010-10-04 Thread Marc Guay
I use this: http://code.google.com/p/php-csv-parser/ No idea if it's any better than your current solution. I presume you've tried extending PHP's memory limit? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHPExcel with large files (27,000+ rows)

2010-10-04 Thread Per Jessen
chris h wrote: > I'm currently working on a project that requires the parsing of excel > files. Basically the user uploads an excel file, and then a script > needs to save a row in a Postgres database for each row in the excel > file. The issue we are having is that when we task PHPExcel with >

[PHP] PHPExcel with large files (27,000+ rows)

2010-10-04 Thread chris h
I'm currently working on a project that requires the parsing of excel files. Basically the user uploads an excel file, and then a script needs to save a row in a Postgres database for each row in the excel file. The issue we are having is that when we task PHPExcel with parsing an excel file with

Re: [PHP] open .zip from memory...

2010-10-04 Thread Steve Staples
On Mon, 2010-10-04 at 10:12 -0700, Jim Lucas wrote: > Steve Staples wrote: > > Not sure if my subject is misleading or not, but anyway, here it goes... > > > > I am trying to download a file using file_get_contents($url) which > > happens to be a .zip file. > > > > I have no issues downloading th

Re: [PHP] open .zip from memory...

2010-10-04 Thread Jim Lucas
Steve Staples wrote: > Not sure if my subject is misleading or not, but anyway, here it goes... > > I am trying to download a file using file_get_contents($url) which > happens to be a .zip file. > > I have no issues downloading the file, saving it to the harddrive, > opening it, and getting what

Re: [PHP] Little Parsing help...

2010-10-04 Thread Richard Quadling
On 4 October 2010 16:10, Adam Richardson wrote: > On Mon, Oct 4, 2010 at 6:29 AM, Richard Quadling wrote: > >> >> http://pastebin.com/rsV35czb >> >> Code with tests and output. >> >> > Nice code, Richard. > > Adam Thank you. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.

Re: [PHP] New to PHP and struggling with the basics

2010-10-04 Thread Col Day
In addition, I think I may have got to the bottom of what I was doing wrong in the first place. I recently swapped out my laptop for my wifes one (she upgraded, well I upgraded hers, and I got the old one) and I forgot that this one didn't automatically boot up into the Administrator profile.

Re: [PHP] New to PHP and struggling with the basics

2010-10-04 Thread Col Day
Steve, That's superb, many thanks for the link! I shall give it a go! Yes I did install apache then php, however I tried to follow the instructions in the Dummies book (what does it make me if I can't follow the dummies book?) but to no avail. I have just printed off the first 40 pages so th

Re: [PHP] Little Parsing help...

2010-10-04 Thread Adam Richardson
On Mon, Oct 4, 2010 at 6:29 AM, Richard Quadling wrote: > > http://pastebin.com/rsV35czb > > Code with tests and output. > > Nice code, Richard. Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com

Re: [PHP] file_get_contents() failing on CentOS.

2010-10-04 Thread Richard Quadling
On 4 October 2010 10:48, kranthi wrote: > http_proxy or HTTP_PROXY i m not sure > Thanks. Passing it on (and learning a bit). -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: htt

Re: [PHP] New to PHP and struggling with the basics

2010-10-04 Thread Abah Joseph
Your directory configuration should look like this Order Deny,Allow Allow from all Options Indexes FollowSymLinks Includes ExecCGI # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: #

[PHP] open .zip from memory...

2010-10-04 Thread Steve Staples
Not sure if my subject is misleading or not, but anyway, here it goes... I am trying to download a file using file_get_contents($url) which happens to be a .zip file. I have no issues downloading the file, saving it to the harddrive, opening it, and getting what i need from it... but what I am tr

RES: [PHP] New to PHP and struggling with the basics

2010-10-04 Thread Alejandro Michelin Salomon
Col Day : Go to : "C:\Arquivos de programas\Apache Software Foundation\Apache2.2\conf" or the folder in your machine. Search for this file => httpd.conf Search for DocumentRoot "D:/webroot" put your work folder in my case D:/webroot. Search for this line and apply the same changes make in Docu

Re: [PHP] New to PHP and struggling with the basics

2010-10-04 Thread Steve Staples
Col. Since you're new to php, then an easy way to install apache, is using XAMPP ( http://www.apachefriends.org/en/xampp.html ) I would suggest you remove the apache you have installed, and the php you installed, and install the XAMPP package as it comes prebuilt with mysql, ftp, apache and php,

[PHP] Is it possible to create a global namespace alias?

2010-10-04 Thread Matt Palermo
Is it possible to create a global namespace alias in PHP or does the alias have to be defined in EVERY file that I use? Here is an example: file: main.php file: index.php The above code doesn’t work for me. The namespace alias defined in the main.php file isn’t accessible in the index

Re: [PHP] cant find uploaded file in /tmp.

2010-10-04 Thread tedd
At 7:16 PM +0100 10/3/10, Ashley Sheridan wrote: On Sun, 2010-10-03 at 20:53 +0300, Prekates Alexandros wrote: Hi to the list. Trying to test php upload i used a very simple scrip. I managed to upload files but i dont understand why the dont stay in the /tmp dir where the initialy are put

[PHP] New to PHP and struggling with the basics

2010-10-04 Thread Col Day
Hi all, Working with the PHP5 for Dummies book (yup real noob, feel free to ridicule (after telling me what I've done wrong)) and have installed Apache 2.2 and PHP 5.3.3 onto a laptop running Vista. (yes I know!!!). I've had Apache running fine with my basic web site created using Serif's Webplu

Re: [PHP] New to PHP and struggling with the basics

2010-10-04 Thread kranthi
apache error logs will be helpful in this case. Their location varies depending upon your installation. But in any case they'll be insde your server directory (IIRC it is c:/Program Files/Apache Software Foundation/Apache by default) -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] Little Parsing help...

2010-10-04 Thread Richard Quadling
On 4 October 2010 11:26, Richard Quadling wrote: > On 1 October 2010 16:20, Don Wieland wrote: >> The logic I need is pretty straight forward, but I am having a hard time >> replicating it using PHP functions. I will try to break it down to it's >> simplest form: >> >> I have a field that has sev

Re: [PHP] New to PHP and struggling with the basics

2010-10-04 Thread Peter Lind
On 4 October 2010 11:30, Col Day wrote: > Hi all, > > Working with the PHP5 for Dummies book (yup real noob, feel free to ridicule > (after telling me what I've done wrong)) and have installed Apache 2.2 and > PHP 5.3.3 onto a laptop running Vista. (yes I know!!!). > > I've had Apache running fine

Re: [PHP] Little Parsing help...

2010-10-04 Thread Richard Quadling
On 1 October 2010 16:20, Don Wieland wrote: > The logic I need is pretty straight forward, but I am having a hard time > replicating it using PHP functions. I will try to break it down to it's > simplest form: > > I have a field that has several lines of text. Chords and Song Lyrics. > > The "Chor

Re: [PHP] New to PHP and struggling with the basics

2010-10-04 Thread Col Day
Hi Kranthi, No, I just literally get the "HTML" line shown but absolutely nothing beneath it. "kranthi" wrote in message news:aanlktin2xnthqm-pp7qwtgo=sqtkctthtwz+08bbw...@mail.gmail.com... they should be something like error_log-[date] not sure about windows though However I have found t

Re: [PHP] New to PHP and struggling with the basics

2010-10-04 Thread kranthi
they should be something like error_log-[date] not sure about windows though >>However I have found that if I paste the html into my web page created by >>Serif WebPlus 10 I get the "html" line but not the "php" line. are you saying that you are getting the php code in your browser ? This is a P

Re: [PHP] file_get_contents() failing on CentOS.

2010-10-04 Thread kranthi
and if proxxy is the issue http://proxychains.sf.net/ will help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file_get_contents() failing on CentOS.

2010-10-04 Thread Richard Quadling
On 4 October 2010 11:24, Richard Quadling wrote: > On 4 October 2010 10:48, kranthi wrote: >> http_proxy or HTTP_PROXY i m not sure >> > > Thanks. Passing it on (and learning a bit). http://docs.php.net/manual/en/function.stream-context-get-default.php#72086 Could help to some degree. Not sure

Re: [PHP] file_get_contents() failing on CentOS.

2010-10-04 Thread kranthi
http_proxy or HTTP_PROXY i m not sure -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Syntax Error

2010-10-04 Thread kranthi
As pointed out echo $insertSQl should help you locate many trivial problems. But using PDO will avoid these kind of problems -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] New to PHP and struggling with the basics

2010-10-04 Thread Col Day
Kranthi Many thanks, any idea on the name of the error logs? Peter, Yes, browsing to the correct location but still getting the 403. this website requires you to log in. Abah, I've gone to the httpd-userdir.conf file and replaced it with your text (not including the directory tree), restarte

Re: [PHP] file_get_contents() failing on CentOS.

2010-10-04 Thread Richard Quadling
On 1 October 2010 16:19, kranthi wrote: > probably not the issue, but is the php engine behind a proxy server ? > wget uses the environment variable, but PHP does not > > Kranthi. > http://goo.gl/e6t3 > Hopefully getting a reply today on this. What env_var is used by wget? -- Richard Quadling

Re: [PHP] Syntax Error

2010-10-04 Thread a...@ashleysheridan.co.uk
Switching to pdo won't necessarily remove sql errors any more than using a php framework will remove php errors. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "kranthi" Date: Mon, Oct 4, 2010 09:04 Subject: [PHP] Syntax Error To: Cc: "chris h" , "Gary" , As po