Re: [PHP] postgresql database access failure

2011-05-02 Thread e-letter
The query was: $query = 'SELECT * FROM databasetablename'; So, database access seems to be the problem. Using the superuser account 'postgres', a user 'httpd' was created and all privileges were granted to the target database using the postgresql 'grant' command. However the user 'httpd' is not t

[PHP] Re: postgresql database access failure

2011-05-02 Thread Florin Jurcovici
Hi.                $db = pg_connect('dbname=webcuttings user=httpd'); >                $query = 'SELECT * FROM articles'; >                $value=pg_fetch_result($query); >                echo 'all files' $value; >        ?> Maybe a password is set on your database for the user httpd? You have

Re: [PHP] passing control to a separate script

2011-05-02 Thread Stuart Dallas
On Monday, 2 May 2011 at 05:21, Jim Giner wrote: Script 1 calls script 2. Script 2 has several paths in it which is how the > user gets to interact with it. Once the final path has been taken (data > gets written) I don't want to use script 2 any longer - I want script 1 to > begin, by a call fr

[PHP] Re: postgresql database access failure

2011-05-02 Thread e-letter
> >Here's the URL of the relevant manual page: >http://www.php.net/manual/en/function.pg-fetch-result.php > The manual page did not explain the purpose of the text 'die', so was ignored (;)). Anyway, the php code was amended as follows: The result is a web page which shows: list of fil

Re: [PHP] Re: postgresql database access failure

2011-05-02 Thread Tim Streater
On 02 May 2011 at 11:05, e-letter wrote: >> >> Here's the URL of the relevant manual page: >> http://www.php.net/manual/en/function.pg-fetch-result.php >> > > The manual page did not explain the purpose of the text 'die', so was > ignored (;)). What, you mean this? $db = pg_connect("dbnam

Re: [PHP] passing control to a separate script

2011-05-02 Thread Jim Giner
No includes. Period. > To get "script 1 to begin" from script 2 based on a certain path... > > script2.php > --- > if ($path1) > { > // do stuff here > include('script1.php'); > exit; > } > // otherwise do other stuff here > --- > > -Stuart > > -- > Stuart Dallas > 3ft9 Ltd > http://3ft9.com/ > >

Re: [PHP] passing control to a separate script

2011-05-02 Thread Jim Giner
Sorry - I responded directly to the responder - BECAUSE - I lost track of who I was answering. That's what happens when people choose to repond to the poster directly INSTEAD of JUST replying to the list. Tedd gave me the 'header' directive and it works just as I imagined something would do.

Re: [PHP] passing control to a separate script

2011-05-02 Thread Stuart Dallas
I don't understand what you have against includes. Redirecting the browser as tedd suggested will work but it's a waste of resources to bounce the request off the client unless you have a good reason for doing so (eg. changing the URL the browser is showing or preventing reloads htting the initi

Re: [PHP] passing control to a separate script

2011-05-02 Thread tedd
At 2:48 PM +0100 5/2/11, Stuart Dallas wrote: Sent from my leaf blower Leaf blower? I suppose some day soon, we will send stuff from our watches. From a leaf blower would be pushing technologies invasion into our personal lives a bit much -- but I guess that's your point. Cheers, tedd --

Re: Re: [PHP] passing control to a separate script

2011-05-02 Thread Tim Streater
On 02 May 2011 at 15:40, tedd wrote: >> At 2:48 PM +0100 5/2/11, Stuart Dallas wrote: >> Sent from my leaf blower > > Leaf blower? > > I suppose some day soon, we will send stuff from our watches. From a > leaf blower would be pushing technologies invasion into our personal > lives a bit much --

Re: [PHP] passing control to a separate script

2011-05-02 Thread Stuart Dallas
On Monday, 2 May 2011 at 17:23, Tim Streater wrote: On 02 May 2011 at 15:40, tedd wrote: > > > > At 2:48 PM +0100 5/2/11, Stuart Dallas wrote: > > > Sent from my leaf blower > > > > Leaf blower? > > > > I suppose some day soon, we will send stuff from our watches. From a > > leaf blower would

[PHP] make links

2011-05-02 Thread Michael Simiyu
hello, i want to add links to the code below in wordpress ie where it says "control the world" and "read and comment only" i want to make it a link http://www.google.com"; target="_self">My Link Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

Re: [PHP] make links

2011-05-02 Thread Adam Preece
hi, then use this. > if (current_user_can('level_10')) : ?> > http://www.google.com\"; target=\"_self\">My Link"; > ?> > > > > > hope this helps Adam On 2 May 2011, at 17:49, Michael Simiyu wrote: > hello, > > i want to add links to the code below in wordpress ie where it says "control

[PHP] what would be the best way to build a 'add page function' to my cms?

2011-05-02 Thread Adam Preece
Hi, im building a cms and im currently thinking of a way to build an add page function. any one got some ideas on the best way to achieve this? cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] what would be the best way to build a 'add page function' to my cms?

2011-05-02 Thread Ashley Sheridan
On Mon, 2011-05-02 at 17:59 +0100, Adam Preece wrote: > Hi, > > im building a cms and im currently thinking of a way to build an add page > function. > > any one got some ideas on the best way to achieve this? > > cheers That's a bit of an open question, and there are several things that ne

[PHP] Re: postgresql database access failure

2011-05-02 Thread Matt Graham
Florin Jurcovici wrote: > My personal recommendation, however, is to drop old-style procedural > drivers and switch to PDO - it's much more convenient to use, IMO. Just be careful. PDO's implementation of MySQL doesn't implement the mysql_set_charset() function, or at least it didn't a while back

Re: [PHP] what would be the best way to build a 'add page function' to my cms?

2011-05-02 Thread Adam Preece
Hi, sure i will try to be more specific. > Is each page a standalone one based on a template that just allows the main > content to be changed? yes. > Is a page made up of several snippets? could be, depends on what has to be done. > Does the CMS save out the final HTML page, or does it store

Re: [PHP] what would be the best way to build a 'add page function' to my cms?

2011-05-02 Thread Ashley Sheridan
On Mon, 2011-05-02 at 18:43 +0100, Adam Preece wrote: > Hi, > > sure i will try to be more specific. > > > Is each page a standalone one based on a template that just allows the main > > content to be changed? > yes. > > > Is a page made up of several snippets? > could be, depends on what has

Re: [PHP] what would be the best way to build a 'add page function' to my cms?

2011-05-02 Thread Adam Preece
the reason, why i don't want to use word press and any other open source solution, is that i want to learn how it is all done. im sure i can figure it out myself but i would like to ask others and see how they would tackle it. the idea with the modules sounds really cool, template type system.

[PHP] semaphore release before acquire warning

2011-05-02 Thread Jeremy Greene
Hi, I am getting a warning when calling sem_release() before (the same php script) calls sem_acquire(). I am doing this because it's a "signal" to another process. The other process (which happens to be C program) has done, or will do, a semop() to acquire the semaphore/signal. The actual data

Re: [PHP] semaphore release before acquire warning

2011-05-02 Thread Nathan Nobbe
On Mon, May 2, 2011 at 2:57 PM, Jeremy Greene wrote: > Hi, > > > > I am getting a warning when calling sem_release() before (the same php > script) calls sem_acquire(). I am doing this because it's a "signal" to > another process. The other process (which happens to be C program) has > done, or w

RE: [PHP] semaphore release before acquire warning

2011-05-02 Thread Jeremy Greene
I have had really bad luck with signals. They can be “lost” in more than one way. I thought this was the far more reliable and correct way… at least from that point of view. Jeremy From: Nathan Nobbe [mailto:quickshif...@gmail.com] Sent: Monday, May 02, 2011 5:01 PM To: Jeremy Greene Cc

[PHP] Custom function

2011-05-02 Thread Ron Piggott
Is it possible to write a function with an optional flag? What would the syntax look like? So far I have: function load_advertisement( $web_page_reference , $web_advertising_sizes_reference ) { Thanks Ron The Verse of the Day “Encouragement from God’s Word” http://www.TheVerseOfTheDay.info

Re: [PHP] Custom function

2011-05-02 Thread Richard S. Crawford
On Mon, May 2, 2011 at 3:16 PM, Ron Piggott wrote: > > Is it possible to write a function with an optional flag? What would the > syntax look like? > > So far I have: > > function load_advertisement( $web_page_reference , > $web_advertising_sizes_reference ) { > Hi Ron: I'm not sure what you m

Re: [PHP] Custom function

2011-05-02 Thread Ron Piggott
On Mon, May 2, 2011 at 3:16 PM, Ron Piggott wrote: Is it possible to write a function with an optional flag? What would the syntax look like? So far I have: function load_advertisement( $web_page_reference , $web_advertising_sizes_reference ) { Hi Ron: I'm not sure what you mean

Re: [PHP] Custom function

2011-05-02 Thread Ashley Sheridan
On Mon, 2011-05-02 at 18:28 -0400, Ron Piggott wrote: > On Mon, May 2, 2011 at 3:16 PM, Ron Piggott > wrote: > > > Is it possible to write a function with an optional flag? What would the > syntax look like? > > So far I have: > > function load_advertisement( $web_page_reference , >

[PHP] php to store data

2011-05-02 Thread sir wally lewis
I am a complete novice at php. My internet service provider gives me webspace and PHP script execution for free. I would like a simple example of a website that stores data on the server, in simple text files. Is this possible? Kind Regards, Robert -- PHP General Mailing List (http://www.

Re: [PHP] php to store data

2011-05-02 Thread Ashley Sheridan
On Mon, 2011-05-02 at 17:55 +1000, sir wally lewis wrote: > I am a complete novice at php. > My internet service provider gives me webspace and PHP script execution > for free. > > I would like a simple example of a website that stores data on the > server, in simple text files. > > Is this po

Re: [PHP] php to store data

2011-05-02 Thread Sir Wally Lewis
I did not get access to any database system on the ISP's end. I could get access to MySQL for $$$. Initially I just want to test everything works with storing to simple text files. After that has happenned. And if the requirement grows. Then spending $$$ is feasable. As I said I am just a novice.

RE: [PHP] php to store data

2011-05-02 Thread admin
Do your provider offer MySQL or MSSQL? Richard L. Buskirk -Original Message- From: sir wally lewis [mailto:rgilland1...@gmail.com] Sent: Monday, May 02, 2011 3:56 AM To: php-general@lists.php.net Subject: [PHP] php to store data I am a complete novice at php. My internet service provi

RE: [PHP] php to store data

2011-05-02 Thread admin
Sorry just seen posting and thought it was new. Most hosting sites offer MySQL with PHP Richard L. Buskirk -Original Message- From: sir wally lewis [mailto:rgilland1...@gmail.com] Sent: Monday, May 02, 2011 3:56 AM To: php-general@lists.php.net Subject: [PHP] php to store data I am a

Re: [PHP] php to store data

2011-05-02 Thread Ashley Sheridan
On Tue, 2011-05-03 at 09:36 +1000, Sir Wally Lewis wrote: > I did not get access to any database system on the ISP's end. > I could get access to MySQL for $$$. > Initially I just want to test everything works with storing to simple text > files. > After that has happenned. > And if the requireme

Re: [PHP] php to store data

2011-05-02 Thread Bastien
On 2011-05-02, at 8:21 PM, Ashley Sheridan wrote: > On Tue, 2011-05-03 at 09:36 +1000, Sir Wally Lewis wrote: > >> I did not get access to any database system on the ISP's end. >> I could get access to MySQL for $$$. >> Initially I just want to test everything works with storing to simple text

Re: [PHP] php to store data

2011-05-02 Thread Ashley Sheridan
On Mon, 2011-05-02 at 20:35 -0400, Bastien wrote: > > On 2011-05-02, at 8:21 PM, Ashley Sheridan wrote: > > > On Tue, 2011-05-03 at 09:36 +1000, Sir Wally Lewis wrote: > > > >> I did not get access to any database system on the ISP's end. > >> I could get access to MySQL for $$$. > >> Initiall

Re: [PHP] php to store data

2011-05-02 Thread Tamara Temple
On May 2, 2011, at 8:14 PM, Ashley Sheridan wrote: On Mon, 2011-05-02 at 20:35 -0400, Bastien wrote: On 2011-05-02, at 8:21 PM, Ashley Sheridan wrote: On Tue, 2011-05-03 at 09:36 +1000, Sir Wally Lewis wrote: I did not get access to any database system on the ISP's end. I could get a