Welcome Guest, Not a member yet? Register   Sign In
PHP4 and PHP5
#11

[eluser]cahva[/eluser]
Yep.. Thats it. I checked the libraries/Email.php and it should send the mail without additional parameters if safe mode is set to on, so somethings definately wrong.

It checks if $this->_safe_mode == TRUE. That is set with this:
Code:
$this->_safe_mode = ((boolean)@ini_get("safe_mode") === FALSE) ? FALSE : TRUE;

See what that gives you with this:
Code:
var_dump(ini_get("safe_mode"));

That might give you a clue..
#12

[eluser]Ngulo[/eluser]
hi cahva i've just proved this code and it returns a "string(0) "" "

i have write this in the library:
Code:
$this->_safe_mode = var_dump(ini_get("safe_mode"));

instead of:
Code:
$this->_safe_mode = ((boolean)@ini_get("safe_mode") === FALSE) ? FALSE : TRUE;

was it what i must did?

my code for sending mail is very simple,and is this:
Code:
$this->load->library('email');
            $this->email->from('[email protected]');
            $this->email->to('$email');//post data from input
            $this->email->subject('asd asd');
            $this->email->message('ok is arrived');
            $this->email->send();
#13

[eluser]cahva[/eluser]
Quote:$this->_safe_mode = var_dump(ini_get("safe_mode"));
..no.. var_dump is just to check what was in the ini_get. That output you got says that safe_mode is off, which is funny because the error you got says its on Smile So the server is lying about the safe mode Big Grin

Just set it manually to TRUE:
Code:
$this->_safe_mode = TRUE;
#14

[eluser]Ngulo[/eluser]
ahahaha cahva server is not lying ,me i'm lying Big Grin ,sorry i've proved it on my localhost server and forgot that the problem was on remote Big Grin

i'will check it on remote and say to you what appens Wink

so i will put this : var_dump(ini_get("safe_mode"));

after code email send() on my controller and not on library code Wink

sorry man ehehe
#15

[eluser]cahva[/eluser]
You can put that var_dump(ini_get(“safe_mode”)) to the beginning of the controller. Its just to see what ini_get gives you with safe_mode.

Also I recommend to see what phpinfo(); gives you. Just create a script (for example phpinfo.php):
Code:
<?php
phpinfo();
?>

.. and place it to the server and browset to it and you will see every php setting you have on that server.
#16

[eluser]Unknown[/eluser]
You can make sure that the site works with PHP5 by asking your host to setup webspace and temporary address for you to test it out. And if it does, change the site to point to the new server. This is the usual process for us(I work in a hosting company) to make sure the site works in the new server. If your host dont setup you a webspace with temporary address, they are dicks


Edinburgh Accommodation
NBA and NCAA Picks
#17

[eluser]Ngulo[/eluser]
sorry guys but a serious hoster how can change the php4 setting to php5 on a not dedicated server? if i'm on a condivised server they should change the setting for all members of that server Smile

is just for understanding....maybe you are referring to a personal and dedicated server?
#18

[eluser]cahva[/eluser]
If you are commenting on that last reply, ignore him/her/that spamrobot Smile

But generally, if you are on a PHP 4 server, the site change to a new server goes something like this:

- create the new user/webspace for the new server
- copy files and database from the old server to the new server
- make sure that site works in the new server
- and finally, if it does, make final sync to the new server and point dns to the new server
#19

[eluser]Ngulo[/eluser]
hi i've tested the code you give me and it returns me ,both on php4 and php5 ,this:
Code:
string(1) "0"

again with phpinfo(); the only infos on safe_mode i've found are these:

Code:
Directive                         local Value              Master Value
safe_mode_allowed_env_vars               PHP_                          PHP_
safe_mode_protected_env_vars          LD_LIBRARY_PATH              LD_LIBRARY_PATH

reamain the fact that php4 does send my email instead of php5 which doesn't

..... Smile
#20

[eluser]future987[/eluser]
Hi,

I'd like to start playing with PHP5.
Luckily there's a package available here, so I want to install that.

But I still have some scripts that need to be PHP4 compatible.
Therefore, I need to keep PHP4 running on my localhost too.

Is there a way to have PHP4 & PHP5 both installed, but only have one runnign at a time and then stop PHP4 & start PHP5 up or something.

Would this work if I were to install it under different user accounts?

I really want to start with PHP5, but cannot afford to not have PHP4 unistalled, since none of the webservers I work with will be updated to PHP 5 in the near future.


Hyundai Tiburon Parts




Theme © iAndrew 2016 - Forum software by © MyBB