[PHP] Problems when running Java program
Hello, I have a Java program that gives me a string. When i run this program on the shell everything works fine but when i try to run using shell_exec i get Error occurred during initialization of VM Could not reserve enough space for code cache This script is currently on a VPS server with php4 running as CGI and phpsuexec enabled. What am i doing wrong? Thanks, Fernando. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: date() and timezone
Hello, But like i said i have lots of scripts inside this folder, is there a way to set something on .htaccess to change the timezone? why? ;-) Because i can't set the timezone for every single script. Inside this folder and subfolders i guess there are about 10,000 scripts. What you were pointed to before + http://us3.php.net/manual/de/ini.php#ini.list ah, now you've gone and made it easy for him :-) Actually i don't have access to php.ini file. Are there any other ways to do this? -- Blog: http://blog.forumdebian.com.br/fernando Contato: http://www.forumdebian.com.br/fernando/contato.php
[PHP] Curl and cookies
Hello, I have just started using curl and i have some question about cookies. The website i'm logging in controls everything using cookies (from login to the actions inside it). Is there a way to store the cookie values into a php session variable ($_SESSION['cookie'])? How do i make curl receive the cookie and store in this variable? How do i make curl send it? Thanks, Fernando. -- Blog: http://blog.forumdebian.com.br/fernando Contato: http://www.forumdebian.com.br/fernando/contato.php
Re: [PHP] Re: date() and timezone
that will teach not to use global include files to init your apps. even if you we stuck with editing 10,000 scripts (btw it sounds very fishy to 10,000 scripts with date() calls in them - can anyone say 'code reuse'?) exactly how hard would it be to write something that would go through all those php files and add a single line ( ini_set('date.timezone', 'Europe/Amsterdam'); ) to the top of the script (i.e. just after the first '?php' | '?') ? Those scripts are uploaded by a lot of people. Unfortunately i can't make all of them change this conf. But now i know that i can change this on .htaccess if you RTFM (and I mean actually READ) then you would know that you can set the relevant date related ini settings in a .htaccess file here is the relevant link again: http://php.net/manual/en/ref.datetime.php#ini.date.timezone Sorry, i have read it but i was reading the portuguese version and it seens like it is not completely translated. Just changed to the english version and NOW i can read it :) Thanks, Fernando. -- Blog: http://blog.forumdebian.com.br/fernando Contato: http://www.forumdebian.com.br/fernando/contato.php
[PHP] date() and timezone
Hello, I have a lot of php scripts that uses date() for some important operations. Yesterday those scripts were moved to another server which is on an different timezone. I haven't predicted this so my scripts aren't working anymore. The servers timezone is GMT -4 and mine is GMT -2. Is there a way to change the default timezone for all scripts within a folder? And what about changing just one? I appreciate any help. Thanks, Fernando. -- Blog: http://blog.forumdebian.com.br/fernando Contato: http://www.forumdebian.com.br/fernando/contato.php
Re: [PHP] date() and timezone
I´m using php5 here. But like i said i have lots of scripts inside this folder, is there a way to set something on .htaccess to change the timezone? Fernando M. M. wrote: Hello, I have a lot of php scripts that uses date() for some important operations. Yesterday those scripts were moved to another server which is on an different timezone. I haven't predicted this so my scripts aren't working anymore. The servers timezone is GMT -4 and mine is GMT -2. Is there a way to change the default timezone for all scripts within a folder? And what about changing just one? it depends on what version of php. php5: http://php.net/manual/en/function.date-default-timezone-set.php http://php.net/manual/en/function.date-timezone-set.php php4: er ... I believe your stuck with settings the TZ environment var OR doing some gnarly hack in userland to account for the difference in timezones. (try this page and search for 'TZ': http://php.net/manual/en/ref.datetime.php) I appreciate any help. Thanks, Fernando. -- Blog: http://blog.forumdebian.com.br/fernando Contato: http://www.forumdebian.com.br/fernando/contato.php
[PHP] Retransmiting post variables
Hello, I have a script called redir.php that is used only for redirecting using the following code: header('Location: ', $_GET['url']); But now i need to redirect post varibles too. Example: If someone access redir.php?url=my_page.php and post: a=1b=2 I need to send this post string (as post) to my_page.php. How can i do this? Thanks. -- Blog: http://blog.forumdebian.com.br/fernando Contato: http://www.forumdebian.com.br/fernando/contato.php
[PHP] Error with array and include
Hi, I'm having a strange problem when trying to show a array after its value was defined on a file that was included. Something like this: ?php $lang = 'pt_BR'; include('lang/'. $lang .'/login.php'); echo $lang['Username']; ? On the file lang/pt_BR/login.php i have this... ?php $lang['Username'] = 'Usuário'; ? But the result of the first script is 'S' (without quotes). If i change lang/pt_BR/login.php to ?php $lang['Username'] = 'Usuário'; echo $lang['Username']; ? I get 'Usuário' (without quotes again). Why does this happens? Thanks, Fernando. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error with array and include
T.Lensselink, Ok, problem solved. I didn't realized that i was using the same variable. Thanks for the help! T.Lensselink escreveu: How can you use an array as string in the include statement and two lines lower as array? Think it echo's 'S' because it see's $lang as a string and not an array. On Tue, 05 Dec 2006 13:11:12 -0200, Fernando M. M. [EMAIL PROTECTED] wrote: Hi, I'm having a strange problem when trying to show a array after its value was defined on a file that was included. Something like this: ?php $lang = 'pt_BR'; include('lang/'. $lang .'/login.php'); echo $lang['Username']; ? On the file lang/pt_BR/login.php i have this... ?php $lang['Username'] = 'Usuário'; ? But the result of the first script is 'S' (without quotes). If i change lang/pt_BR/login.php to ?php $lang['Username'] = 'Usuário'; echo $lang['Username']; ? I get 'Usuário' (without quotes again). Why does this happens? Thanks, Fernando. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php