FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » php and PDO Error HTTP 500
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: php and PDO Error HTTP 500 [message #179132 is a reply to message #179131] Fri, 14 September 2012 12:46 Go to previous messageGo to previous message
Une Bvue[1] is currently offline  Une Bvue[1]
Messages: 9
Registered: September 2012
Karma:
Junior Member
Le 14/09/2012 13:21, Captain Paralytic a écrit :
> A "page" is what is displayed in a browser.

yes, of course, i did two trials :
- connecting to the php script thru a browser (ie.
http://localhost/yt_tests/index.php);
- executing the php script from CLI (Command Line Interface).

I did the latest because i got an HTTP error 500 when using a browser.
The second way gave more information about what is going on.

>>> i do not got any php error when connecting thru a browser.
> This contradicts what you said above.
> Can you please explain???

I do not get any PHP error rather a "HTTP 500 (Internal Server Error)"
even if all of the PHP reporting error are allowed in my php setup files:
error_reporting = E_ERROR & E_WARNING & E_PARSE & E_NOTICE &
E_CORE_ERROR & E_CORE_WARNING & E_COMPILE_ERROR & E_COMPILE_WARNING &
E_USER_ERROR & E_USER_WARNING & E_USER_NOTICE & E_RECOVERABLE_ERROR &
E_USER_DEPRECATED ;

And, the only php line raising an error is this one :
$db = new PDO("pgsql:dbname=$dbname;host=$host;", $username, $password );

I know that because commenting it suppress the "HTTP 500 (Internal
Server Error)".

Also, this script was working well two months ago, before my hard disk
crashed. After this crash i did rebuild all of my linux (Xubuntu /
Voyager 12.04 LTS) the same way i did it in april.

Also i sohould say i can connect to this database without any prob from
CLI that way :
$ psql -h <IPV4 or IPV6 of the server> -U yt -d yt_tests
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: log of all php's connection
Next Topic: How expensive is glob'ing a dir and including all the files?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 11:57:52 GMT 2024

Total time taken to generate the page: 0.04193 seconds