Re: [PHP] Type of a variable in PHP
Hi, On Fri, 2013-03-15 at 09:55 +, Kevin Peterson wrote: > Have two questions - > 1. How to find type of a variable in PHP. > 2. How to find the type of an array in PHP. > > Please help. > Use this: http://php.net/manual/en/function.gettype.php Regards Karim -- Karim Geiger B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 signature.asc Description: This is a digitally signed message part
Re: [PHP] PHP context editor
Hi Georg, On Thu, 2013-03-14 at 23:10 +0100, georg wrote: > hello, > annyone knows of some good PHP context editor freeware ? > (tired of missing out on trivials like ; ) I don't know exactly what you mean by a context editor but if you want an editor with syntax highlighting try eclipse for an complete IDE (Multiplatform), notepad++ on Windows, textwrangler on Mac or vim on Linux Regards -- Karim Geiger B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 signature.asc Description: This is a digitally signed message part
Re: [PHP] Trying to understand what I've broken to not allow mkdir() to work.
Hi Richard, On 05/16/2013 04:33 PM, Richard Quadling wrote: > Hi. > > I'm running on a Mac with a Centos VM (via VirtualBox). > > Was running from from our SVN server. > > New repo, now running from GIT. > > The checkout is on my local machine (using Netbeans, LESS, etc.) > > The VM is running Apache and PHP V5.4.15 > > During the move, I've got some permissions issues, which I simply don't > understand enough to a) resolve myself, b) know what to ask for to get the > right help in solving the issue. > > I've been told that the permissions on my mac via the shared folder through > VirtualBox to the Centos setup is where my problem lies. But I don't know. > > Is there anyone who can give me definite help here? I can manually create > the directories, but that's just daft. > > Nothing LOOKS any different between the two repos, but I don't know how to > tell beyond comparing ls outputs. > > Any help would be good. What happens if you're making an ls -la in your Terminal on your SVN folder? Could you paste the output? It looks like the owner or permissions of the folder aren't correct. Regards Karim -- Karim Geiger Auszubildender Fachinformatiker AE B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 signature.asc Description: OpenPGP digital signature
Re: [PHP] Making a Timeout Expiration Length to Session Variables
Hi, On 07/08/2013 05:10 AM, dealTek wrote: > Hi all, > > I would like to make a timeout length to session variables, so that if a user > didn't use the browser page for let's say 5 minutes - the session variables > would expire and the user would need to login again. > > > Q: What's the best way to implement this functionality? You can either use cookies or do something like that: http://stackoverflow.com/questions/3068744/php-session-timeout In your case is would be if ($_SESSION['timeout'] + 5 * 60 < time()) { // session timed out } else { // session ok } Karim -- Karim Geiger Auszubildender Fachinformatiker AE B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 signature.asc Description: OpenPGP digital signature
Re: [PHP] Sending headers to server
Hi MiguelOn 08/01/2013 04:04 PM, Miguel Guedes wrote: > Hello List, > > > I'm running PHP 5.4.9 as CGI (via apache 2.2.22) and can't seem to be > able to send headers to the server. > > Both, > > header('Status: 500 Internal Server Error'); > > and, > > header('HTTP/1.1 500 Internal Server Error', true, 500); > > result in nothing happening on the client side. > > What am I missing? > Works for me. What happens exactly? Do you get a 200? Karim -- Karim Geiger Auszubildender Fachinformatiker AE B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 signature.asc Description: OpenPGP digital signature
Re: [PHP] Sending headers to server
Hi Miguel, On 08/02/2013 10:50 AM, Miguel Guedes wrote: > Hi Karim, > > On 01/08/13 15:40, Karim Geiger wrote: >> >> Works for me. What happens exactly? Do you get a 200? >> > > That's exactly right - I always get a 200. How can I diagnose this? > Try getting the complete header by using curl -v http://url.com and paste it here. In my example I'm getting this output: * About to connect() to ** port 80 (#0) * Trying 213.***.***.***... * Connected to ** (213.***.***.***) port 80 (#0) > GET /test.php HTTP/1.1 > User-Agent: curl/7.29.0 > Host: ** > Accept: */* > < HTTP/1.1 500 Internal Server Error < Date: Fri, 02 Aug 2013 14:27:15 GMT < Server: Apache < Content-Length: 6 < Connection: close < Content-Type: text/html; charset=UTF-8 < * Closing connection 0 What is your output? Regards Karim -- Karim Geiger Auszubildender Fachinformatiker AE B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 signature.asc Description: OpenPGP digital signature
Re: [PHP] Sending headers to server
Hi Miguel, On 08/02/2013 04:34 PM, Miguel Guedes wrote: > > Here's my output: > > $ curl -v http://localhost/header-test.php > * About to connect() to localhost port 80 (#0) > * Trying 127.0.0.1... > * Connected to localhost (127.0.0.1) port 80 (#0) >> GET /header-test.php HTTP/1.1 >> User-Agent: curl/7.29.0 >> Host: localhost >> Accept: */* >> > < HTTP/1.1 200 OK > < Date: Fri, 02 Aug 2013 14:32:47 GMT > < Server: Apache/2.2.22 (Ubuntu) > < X-Powered-By: PHP/5.4.9-4ubuntu2.2 > < Status: 500 Internal Server Error > < Vary: Accept-Encoding > < Content-Length: 0 > < Content-Type: text/html > < > * Connection #0 to host localhost left intact > > Using the following test script: > > > header('Status: 500 Internal Server Error'); > header('HTTP/1.1 500 Internal Server Error', true, 500); > > ?> allright, that's weird. I'm currently not able to reproduce your problem but I've found out that some others are experiencing the same problem like you do. They found this solution to work: header($_SERVER["SERVER_PROTOCOL"] . 'HTTP/1.1 500 Internal Server Error'); Might try this one.. Regards Karim -- Karim Geiger Auszubildender Fachinformatiker AE B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 signature.asc Description: OpenPGP digital signature
Re: [PHP] Sending headers to server
Am 02.08.13 18:03, schrieb Miguel Guedes: > This is strange. I've just found out that the headers are sent > correctly if I access the website outside of localhost. I don't > understand why. I also don't. I've tried the exactly same code you posted on my localhost as well and it worked all properly. Weird behaviour, can anyone explain why this happens? Regards Karim -- Karim Geiger Auszubildender Fachinformatiker AE B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 signature.asc Description: OpenPGP digital signature