Jump to content
Saguna

Problema Require_Once La Conectare Admincp Php

Recommended Posts

Am un script php.
Ma tot chinui cu o erroare care ar trebui sa ma duca la admincp, accesez site-ul  www.youtsite.com/conf/adminSelf/ si imi apare eroarea de mai jos.
EROAREA:

Warning: require_once(/home/u697769081/public_html/inc/admin.inc/.php) [function.require-once]: failed to open stream: No such file or directory in /home/u697769081/public_html/index.php on line 140
 
Fatal error: require_once() [function.require]: Failed opening required '/home/u697769081/public_html/inc/admin.inc/.php' (include_path='.:/opt/php-5.3/pear') in /home/u697769081/public_html/index.php on line 140
 
Daca era sa gresesc conf/adminSelf/ mai ziceam dar codul e bine trecut.
  <div class="panel-body">
            <div class="admin_login_form">
      <form method="post" action="<?php echo ISVIPI_URL.'conf/adminSelf/' ?>" class="login-form">
        <input type="hidden" name="action" value="login">
 

La linia 140 am trecut mai jos, am scris eu 'AICI' acolo intre cele 2 ghilimele ' ' nu era scris nimic si cred ca aceea e problema lipseste ceva dar cum sa imi dau seama ce?
Normal era asa:
else if ($ACTION[0] == 'conf'){
require_once ''.ISVIPI_ADMIN_INC_BASE.''.preg_replace('/[^w]/','',$ACTION[1]).'.php';
}
 

Am modificat in:
else if ($ACTION[0] == 'conf'){
require_once 'adminSelf'.ISVIPI_ADMIN_INC_BASE.''.preg_replace('/[^w]/','',$ACTION[1]).'.php';
}

Si asa, sa duca direct la script.php:
else if ($ACTION[0] == 'conf'){
require_once 'inc/admin.inc/adminSelf'.ISVIPI_ADMIN_INC_BASE.''.preg_replace('/[^w]/','',$ACTION[1]).'.php';
}
 
Dar la fel imi da eroare la linia 140.
COD:
if ($ACTION[0] == 'cron'){
include_once ''.IS_CRON_BASE.'/'.preg_replace('/[^w]/','',$ACTION[0]).'.php';
}
else if ($ACTION[0] == 'auth'){
include_once 'auth/'.preg_replace('/[^w]/','',$ACTION[1]).'.php';
}
else if ($ACTION[0] == 'sitemap'){
include_once preg_replace('/[^w]/','',$ACTION[0]).'.xml';
}
else if ($ACTION[0] == 'users'){
require_once ''.IS_USER_INC_BASE.''.preg_replace('/[^w]/','',$ACTION[1]).'.php';
}
else if ($ACTION[0] == $adminPath){
if (!isset($ACTION[1])){$ACTION[1] = '/login';}
require_once 'admincp/'.preg_replace('/[^w]/','',$ACTION[1]).'.php';
}
else if ($ACTION[0] == 'conf'){
140---linia cu problema---require_once ' AICI '.IS_ADMIN_INC_BASE.''.preg_replace('/[^w]/','',$ACTION[1]).'.php';
}
else if ($ACTION[0] == 'feed'){
require_once 'inc/feeds/'.preg_replace('/[^w]/','',$ACTION[0]).'.php';
}
else if ($ACTION[0] == 'admAddons'){
require_once IS_ADMIN_INC_BASE.'addons/'.preg_replace('/[^w]/','',$ACTION[1]).'.php';
}
else if ($ACTION[0] == 'chat'){
require_once 'inc/mods/chat/'.preg_replace('/[^w]/','',$ACTION[0]).'.php';
}
else if ($ACTION[0] == 'remote'){
require_once IS_THEMES_BASE.'remote/'.preg_replace('/[^w]/','',$ACTION[1]).'.php';
}
else if ($ACTION[0] == "settings" && $ACTION[1] == "addon"){
require_once IS_INC_MODS.$ACTION[2].'/admin/'.rtrim($ACTION[3], '/').'.php';
}
else if (is_file($includeFile)) {
include($includeFile);
}

Share this post


Link to post
Share on other sites

Uitate bine la eroarea ce primesti:

Warning: require_once(/home/u697769081/public_html/inc/admin.inc/.php)

El cauta un fisier si nu il gaseste, din cauza ca este calea gresita:

admin.inc/.php

Cum vezi apare daca nu ma insel chiar ce ai adaugat tu intre ' ', adica apare un simplu .php si gata. Verifica fisieru care ar trebui sa incarce si pune calea corecta la linia 140.


PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

Share this post


Link to post
Share on other sites

Pai nu, asa imi pare cand las scriptu normal adica cu '' libere cum era el cand l-am pus pe root!

else if ($ACTION[0] == 'conf'){
require_once ''.IS_ADMIN_INC_BASE.''.preg_replace('/[^w]/','',$ACTION[1]).'.php';
}

 
Si daca il modific imi apare asa:

Warning: require_once(adminSelf/home/u697769081/public_html/inc/admin.inc/.php) [function.require-once]: failed to open stream: No such file or directory in /home/u697769081/public_html/index.php on line 140

Fatal error: require_once() [function.require]: Failed opening required 'adminSelf/home/u697769081/public_html/inc/admin.inc/.php' (include_path='.:/opt/php-5.3/pear') in /home/u697769081/public_html/index.php on line 140

 
Sincer nu inteleg dece face asa am pus intre acele '' adminSelf normal trebuia sa apara dupa admin.inc/ dar apare in fata la /home si cred ca de aceea imi face probleme dar nu inteleg dece apare inainte.
 
El apare asa:

adminSelf/home/u697769081/public_html/inc/admin.inc/.php

Si normal trebuia asa:

/home/u697769081/public_html/inc/admin.inc/adminSelf.php

Share this post


Link to post
Share on other sites

Daca il modifici cum? Posteaza bucata originala si dupa aia modificata de tine sa vedem mai exact cum il modifici, normal trebuie sa-i zici calea completa de aia iti si apare:

adminSelf/home/u697769081/public_html/inc/admin.inc/.php

Inloc de:

/home/u697769081/public_html/inc/admin.inc/adminSelf.php

Poate nu il modifici cum trebuie.


PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

Share this post


Link to post
Share on other sites

Modifica:

else if ($ACTION[0] == 'conf'){
require_once ''.IS_ADMIN_INC_BASE.''.preg_replace('/[^w]/','',$ACTION[1]).'.php';
} 

Cu asta:

else if ($ACTION[0] == 'conf'){
require_once ''.ISI_ADMIN_INC_BASE.''.preg_replace('/[^w]/','',$ACTION[1]).'adminSelf.php';
}

ISI_ADMIN_INC_BASE este folderu de baza pentru folderu admin inc. Daca tu pui adminSelf in fata la tot, e si normal sa se adauge calea in fata.


PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

Share this post


Link to post
Share on other sites

Ti-am mai explicat si pe celalalt topic. Ai o problema generala cu variabilele si functiile. Ti-am dat si posibile motive.

Share this post


Link to post
Share on other sites

Si ce e de facut am umblat prin el si m-am uitat dupa greseli sau lipsuri dar nu gasesc nimic ne-inregula....sincer scriptu merge perfect cand ma loghez pe el ca user sau stau ca vizitator .. dar cand vreau sa ajung la panou de logare admin nu merge, erori ori pagina alba ..

Share this post


Link to post
Share on other sites

Verifica logu de la apache sa vezi eroarea care primesti.


PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

Share this post


Link to post
Share on other sites

Poftim...

Notice: Undefined offset: 1 in /home/u697769081/public_html/index.php on line 140
Notice: Undefined index: HTTP_REFERER in /home/u697769081/public_html/inc/admin.inc/adminSelf.php on line 25
Notice: Undefined index: action in /home/u697769081/public_html/inc/admin.inc/adminSelf.php on line 26

Share this post


Link to post
Share on other sites

Esti sigur ca exista fisieru adminSelf.php in folderu ala care normal nu se numesc asa "admin.inc"?


PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

Share this post


Link to post
Share on other sites

Am aflat situatia ....deci mai exact am un site de socializare, si are folderul db unde pui fisieru de conectare la bza de date.php daca pun fisieru de conectare a datelor acolo nu imi mai apare sa il instalez si apare deja instalat, daca sterg de acolo fisierul imi apare sa il instalez dar cu o problema asta ... cumsa fac, ca nu mai stiu ..

 

12132132131313213.png

Share this post


Link to post
Share on other sites

Iti trebuie datele de la baza de date. Verifica prin panou daca iti da aceste informatii.

La host poti lasa localhost. La restu iti trebuie username, parola si numele de la baza de date pe care lucrezi.


PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

Share this post


Link to post
Share on other sites

Esti sigur ca ai dat inainte un import in baza de date, la un fisier .sql care vine cu scriptu ala? Eroarea de insert de la query e fin cauza ca nu exista tabla acea sau chiar coloana in baza de date care ai specificat.


PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

Share this post


Link to post
Share on other sites

Da am baza de date sql si am importato am facut si legatura la site ca se face din ea dintr.un tabel site_settings ....nu stiu ce sa ii mai fac am incercat ogroaza de modalitati ...ma chinui de 4 zile cu ea ...

Share this post


Link to post
Share on other sites

@gadges  m-am uitat mai atent si am tabelul contry si cand intru in el are 

exe.png

Ce sa-i mai fac ca nu stiu ...care ma ajuta sau ce sa fac?

 

Am dar reply ca nu merge editat topicul ...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...