php-general Digest 2 May 2011 08:55:26 -0000 Issue 7293

2011-05-02 Thread php-general-digest-help
php-general Digest 2 May 2011 08:55:26 - Issue 7293 Topics (messages 312610 through 312618): passing control to a separate script 312610 by: Jim Giner 312611 by: Stuart Dallas 312613 by: Jim Giner 312614 by: Stuart Dallas 312615 by: tedd

php-general Digest 2 May 2011 20:57:48 -0000 Issue 7294

2011-05-02 Thread php-general-digest-help
php-general Digest 2 May 2011 20:57:48 - Issue 7294 Topics (messages 312619 through 312635): Re: postgresql database access failure 312619 by: e-letter 312620 by: Tim Streater 312631 by: Matt Graham Re: passing control to a separate script 312621 by: Jim

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

[PHP] Re: postgresql database access failure

2011-05-02 Thread Florin Jurcovici
Hi. ?php                $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

[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: ?php $db =

Re: [PHP] Re: postgresql database access failure

2011-05-02 Thread Tim Streater
On 02 May 2011 at 11:05, e-letter inp...@gmail.com 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 =

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/ -- PHP

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.

[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 a href=http://www.google.com; target=_selfMy Link/a ?php if (current_user_can('level_10')) : ? ?php print control the world; ? ?php elseif

Re: [PHP] make links

2011-05-02 Thread Adam Preece
hi, then use this. ?php if (current_user_can('level_10')) : ? ?php print a href=\http://www.google.com\; target=\_self\My Link/a; ? ?php elseif (current_user_can('level_6')) : ? ?php print read and comment only; ? ?php else : ? ?php print you gotta log-in to see the goodies; ? ?php

[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

[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 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 to be done.

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 jer...@zeevee.com 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

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

[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”

Re: [PHP] Custom function

2011-05-02 Thread Richard S. Crawford
On Mon, May 2, 2011 at 3:16 PM, Ron Piggott ron.pigg...@actsministries.orgwrote: 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:

Re: [PHP] Custom function

2011-05-02 Thread Ron Piggott
On Mon, May 2, 2011 at 3:16 PM, Ron Piggott ron.pigg...@actsministries.org 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

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 ron.pigg...@actsministries.org 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(

[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

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 possible?

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

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

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

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 requirement

Re: [PHP] php to store data

2011-05-02 Thread Bastien
On 2011-05-02, at 8:21 PM, Ashley Sheridan a...@ashleysheridan.co.uk 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

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 a...@ashleysheridan.co.uk 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 $$$.